NuttX RTOS

Some information, tutorials and howtos for the NuttX RTOS. In general, I assume that Debian Jessie is used. Debian provides the necessary packages for building.

aptitude install binutils-arm-none-eabi gcc-arm-none-eabi

Compilation:

make menuconfig
make

For the installation a programmer is required. Openocd is part of Debian Jessie and can help us here.

aptitude install openocd

The installation on the STM32F4Discovery board can be now done with openocd, after a USB cable is plugged to the on-board programmer.

sudo openocd \
   -f /usr/share/openocd/scripts/board/stm32f4discovery.cfg \
   -c "init" \
   -c "reset halt" \
   -c "sleep 100" \
   -c "wait_halt 2" \
   -c "echo \"--- Writing \"" \
   -c "flash write_image erase nuttx.bin 0x08000000" \
   -c "sleep 100" \
   -c "echo \"--- Verifying\"" \
   -c "verify_image nuttx.bin 0x08000000" \
   -c "sleep 100" \
   -c "echo \"--- Done\"" \
   -c "resume" \
   -c "shutdown"