hujun260 opened a new pull request, #21858:
URL: https://github.com/apache/nuttx/pull/21858
# ARMv8-R AArch32 support for QEMU Cortex-R52
## Summary
This pull request adds the missing ARMv8-R AArch32 support required to build
and run the QEMU Cortex-R52 target. It also adds the QEMU ARMv8-R board
configuration and aligns the Make and CMake build descriptions.
## Changes
- Add the QEMU Cortex-R52 architecture and board support.
- Add ARMv8-R integration to the QEMU architecture build.
- Add ARM GIC version handling and Cortex-R52 GIC base definitions.
- Fix ARMv8-R security-state configuration.
- Rename the ARMv8-R GIC header to the generic `gic.h` name.
- Move FPU configuration to the chip-side initialization path.
- Add the `qemu-armv8r-aarch32` board configuration.
- Keep the ARMv8-R Make and CMake source lists in sync.
- Remove obsolete `EXTERN` macro definitions from the board header and
retain portable C++ linkage guards.
## Testing
The following checks were run from the `nuttx` directory.
### Checkpatch
```text
$ git diff --check
$ tools/checkpatch.sh -g apache/master..HEAD
✔️ All checks pass.
```
### CMake/Ninja build
Configuration:
```text
$ rm -rf build
$ cmake -B build -DBOARD_CONFIG=qemu-armv8r-aarch32:nsh -GNinja
```
Build:
```text
$ cmake --build build
```
Result: build completed successfully. The link completed at 1188/1192 and
`nuttx.hex` was generated at 1191/1192. The linker emitted only the existing
`tls_dupinfo.c.o` executable-stack and RWX LOAD-segment warnings.
### OSTest
The QEMU ARMv8-R NSH configuration enables the OS test application:
```text
CONFIG_TESTING_OSTEST=y
```
The image was run with the QEMU Cortex-R52 model:
```text
$ /path/to/qemu-system-arm \
-M virt,virtualization=on,highmem=off \
-semihosting -nographic -cpu cortex-r52 \
-device loader,file=build/nuttx
```
The runtime test completed successfully. Representative output:
```text
NuttShell (NSH) NuttX-12.7.2
nsh> ostest
stdio_test: Standard I/O Check: printf
stdio_test: Standard I/O Check: fprintf to stderr
fpu_test: Succeeded
mutex_test: PASSED
sigprocmask_test: SUCCESS
sched_lock: PASSED No pre-emption occurred while scheduler was locked.
user_main: Exiting
ostest_main: Exiting with status 0
nsh> QEMU: Terminated
```
The complete OSTest run exercised standard I/O, environment handling, libc,
FPU, task restart, wait/waitid, work queues, mutexes, cancellation, robust
mutexes, semaphores, condition variables, pthreads, message queues, signals,
spinlocks, watchdogs, high-resolution timers, POSIX timers, round-robin
scheduling, barriers, scheduler locking, and `vfork()`.
## Commits
The branch contains 10 commits on top of `apache/master`, covering the
ARMv8-R architecture support, QEMU Cortex-R52 integration, FVP/QEMU board
configuration, and related build fixes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]