NuttX code samples for www.railab.me
To initialize the repository use this:
git clone https://github.com/railab/nuttx external/nuttx git clone https://github.com/railab/nuttx-apps external/nuttx-apps ln -sr apps external/nuttx-apps/external
Examples for www.railab.me/posts/2024/11/nuttx-and-small-systems-hello-world/
The common command to build examples is:
cmake -B build -S external/nuttx -DBOARD_CONFIG=../../boards/arm/stm32/nucleo-f302r8-mini/config/{CONFIG_NAME} -GNinja cmake --build build
Where CONFIG_NAME
for a given example are given below:
mini_hello
- minimal "Hello, world!":mini_hello_opt
- minimal, optimized "Hello, world!":
Examples for www.railab.me/posts/2024/12/nuttx-and-small-systems-core-os/
The common command to build examples is:
cmake -B build -S external/nuttx -DBOARD_CONFIG=../../boards/arm/stm32/nucleo-f302r8-mini/config/{CONFIG_NAME} -GNinja cmake --build build
Where CONFIG_NAME
for a given example are given below:
mini_core1
- minimal NuttX image with serial port enabled:mini_core2
- minimal NuttX image with serial port disabled:mini_core3
- minimal NuttX image with serial port disabled and no/dev/null
:mini_blinky1
- blinky with files:mini_blinky2
- blinky with arch-specific code:
Examples for www.railab.me/posts/2025/1/nuttx-and-small-systems-os-components/
The common command to build examples is:
cmake -B build -S external/nuttx -DBOARD_CONFIG=../../boards/arm/stm32/nucleo-f302r8-mini/config/{CONFIG_NAME} -GNinja cmake --build build
Where CONFIG_NAME
for a given example are given below:
- Application 1 - DEFAULT_SMALL influence:
mini_components1
- base configurationmini_components1_env
- environment variable support enabledmini_components1_tim
- POSIX timers support enabledmini_components1_pth
- Pthreads support enabledmini_components1_mq
- POSIX message queue support enabledmini_components1_mqsys
- System V message queue support enabledmini_components1_osall
- enable all OS interfacesmini_components1_fstream
- FILE stream support enabled
- Application 2 - poll() and epoll():
mini_components2
- base configurationmini_components2_busy
- busy wait for timermini_components2_poll
- poll wait for timermini_components2_epoll
- epoll wait for timer
- Application 3 - thread data protection:
mini_components3
- base configurationmini_components3_pth
- threads onlymini_components3_atomic
- thread data as atomicmini_components3_mut
- thread data protected with mutexmini_components3_cond
- thread data with condition variablemini_components3_rwlock
- thread data protected with rwlock
- Application 4 - signaling:
mini_components4
- base configurationmini_components4_pth
- notify main with thread and semaphoremini_components4_tim
- notify main with POSIX timer signalmini_components4_tim_sigev
- notify main with POSIX timer signal and SIGEV_THREAD
- Application 5 - printf and libm:
mini_components5
- base configurationmini_components5_float_nofpu
- printf with floating point support and FPU disabledmini_components5_float_fpu
- printf with floating point support and FPU enabledmini_components5_long
- printf with long long supportmini_components5_libm_nx_nofpu
- libm from NuttX with FPU disabledmini_components5_libm_nx_fpu
- libm from NuttX with FPU enabledmini_components5_libm_newlib_nofpu
- libm from Newlib with FPU disabledmini_components5_libm_newlib_fpu
- libm from Newlib with FPU enabledmini_components5_libm_fixedmath
- fixed math testmini_components5_libm_floatmath_nofpu
- float math test with FPU disabled and NuttX libmmini_components5_libm_floatmath_fpu
- float math test with FPU enabled and NuttX libm