A full ostest run never reached the end on esp32-devkitc:knsh. It stopped in the barrier test: barrier_test: ERROR thread 6 create, status=12 ostest_main: Exiting with status 256 The cause is the interaction of two settings that are each reasonable on their own. CONFIG_TLS_ALIGNED is set and CONFIG_TLS_LOG2_MAXSTACK is 13, so every pthread stack must start on an 8 KiB boundary. The barrier threads take the 2 KiB default stack, so each one occupies an 8 KiB aligned slot. Eight of them do not fit the 96 KiB user heap of a protected build once the tests before them have fragmented it, and up_create_stack() fails: up_create_stack: ERROR: Failed to allocate stack, size 2048 The flat build has the same two settings and passes, because its heap is 320 KiB against 96 KiB here. So this lowers the barrier thread count for this configuration only. Four threads still test a barrier, and they leave margin: six was the most that ever started, so six would pass with none. The user heap cannot grow far. User data has to sit in the MMU governed window of SRAM2, which is 128 KiB in total, and the kernel holds the first 32 KiB of it. Verified on an ESP32-DevKitC V4, ESP32-D0WD-V3 revision 3.1. All four threads reach the barrier and ostest reports "Exiting with status 0". Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
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.