Go to file
fangxinyong 6da525704d toolchain/ghs: fix the inline assembly code register alloc compile error
The following are the compile error that reported
by GreenHills compiler:

"/mnt/yang/qixinwei_commit/nuttx/include/arch/syscall.h", line 156 (col. 17): error #2036-D:
          cannot allocate "reg0" to specified caller-saved register

 "/mnt/yang/qixinwei_commit/nuttx/include/arch/syscall.h", line 157 (col. 17): error #2036-D:
          cannot allocate "reg1" to specified caller-saved register

Then we fix this greenhills compilation error by explicitly specifying
the registers in the clobber list in the inline assembly code.
This fix is successful in compiling on the
nuttx/boards/arm/mps/mps2-an500/configs/nsh platform and passes
the ostest test.
However, if we keep the implementation the same for both the default
and Greenhills compilers, the default compiler will report the
following two issues:
1. the "sys_call6" function will report compile error when
compiling on "./vendor/qemu/boards/smartspeaker/configs/smartspeaker-knsh"
platform, the detailed error info:

CC:  proxies/PROXY_mq_getattr.c In file included from /home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/sys/syscall.h:35,
                 from /home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/syscall.h:30,
                 from proxies/PROXY_mmap.c:5:
In function 'sys_call6',
    inlined from 'mmap' at proxies/PROXY_mmap.c:9:22:
/home/guoshichao/work_profile/vela_os/vela_qemu_1/nuttx/include/arch/syscall.h:297:3: error: 'asm' operand has impossible constraints
  297 |   __asm__ __volatile__
      |   ^~~~~~~

2. when running on qemu-armv7-a platform, the modification to
"smh_call()" function will make the system fail to boot up, so
we need to keep the default compiler implementation and greenhills
compiler implementation separate

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
(cherry picked from commit cb48b749b1c9cad8cfb96bff7c5e9b6ebf20fc8a)
2024-08-11 14:28:12 -03:00
.github ISSUE_TEMPLATE: Fixed incorrect links for issue forms 2024-08-05 15:35:48 -03:00
arch toolchain/ghs: fix the inline assembly code register alloc compile error 2024-08-11 14:28:12 -03:00
audio Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
binfmt binfmt/elf_loadfile: Set sh_addr even if SHF_ALLOC == 0 2024-08-07 08:45:50 +08:00
boards board/lm3s6965-ek: restore 128K kflash 2024-08-11 19:00:18 +08:00
cmake cmake/boards: fix build break on custom board 2024-07-17 15:09:07 +08:00
crypto fix(Kconfig): spellcheck "randon" to "random" 2024-06-15 17:40:18 +08:00
Documentation arm/stm32f401rc-rs485: Add support to BMP280 sensor 2024-08-11 03:09:14 +08:00
drivers arm/stm32f401rc-rs485: Add support to BMP280 sensor 2024-08-11 03:09:14 +08:00
dummy build: add initial cmake build system 2023-07-08 13:50:48 +08:00
fs fs/mnemofs: Refactor path logic, direntry size bug fix, open free bug fix 2024-08-09 09:00:17 +02:00
graphics video/vnc: add vnc_fb_register 2024-04-12 17:42:49 +08:00
include fs/mnemofs: Refactor path logic, direntry size bug fix, open free bug fix 2024-08-09 09:00:17 +02:00
libs build: Fix libc/pwd CMakeLists.txt 2024-08-07 08:45:19 +08:00
mm mm/mm.h: add mm_free_delaylist interface 2024-08-03 01:30:04 +08:00
net Fix greater-than-or-equal-to-zero issue 2024-08-08 17:19:42 +08:00
openamp libmetal/atomic: enable 64-bit atomic by toolchain builtin flags 2024-06-29 22:38:48 +08:00
pass1
sched spinlock: inline irqsaved spinlock 2024-08-05 16:20:47 +08:00
syscall sem_open: return error code, sem returned by parameter 2024-06-06 02:40:50 +08:00
tools tools/ci: Add Rust Target for QEMU RISC-V 64-bit 2024-08-07 19:59:56 +08:00
video build: add initial cmake build system 2023-07-08 13:50:48 +08:00
wireless Remove the back slash from long literal string 2024-02-19 16:43:15 +01:00
.asf.yaml
.gitignore fs/mnemofs: Refactor path logic, direntry size bug fix, open free bug fix 2024-08-09 09:00:17 +02:00
.yamllint
AUTHORS AUTHORS: add Tomek CEDRO to the list 2023-03-07 14:15:55 +01:00
CMakeLists.txt build: set CMake policy to allow FetchContent_Populate 2024-08-11 03:03:57 +08:00
CONTRIBUTING.md Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00
INVIOLABLES.md
Kconfig Kconfig/style: fix Kconfig style issue 2024-08-04 23:16:15 +08:00
LICENSE libc/x86_64: port string functions from bionic 2024-07-02 23:59:18 +08:00
Makefile tools:fix some error use of shell command in Windows native build 2022-11-06 16:41:49 +08:00
NOTICE Remove the double blank line from source files 2022-02-20 20:10:14 +01:00
README.md Gathering community recommendations 2023-10-28 13:55:56 +08:00
ReleaseNotes Documentation: move ReleaseNotes 2023-09-26 20:41:00 +08:00

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.