Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Getting Started with NuttX – Nucleo STM32F303 (Arch Linux)

Here we will try to set up a functional Nuttx environment on a STM32F303 Nucleo-64 evaluation board on Arch Linux OS.

We will install the required software components, configure the board in order to be able to display the "hello world !" string on a serial terminal to the emulated ST-LINK/V2-1 serial port (through the USB cable).

Installing the ARM tool chain

Install the following Arch software packages:

...

Packaging from AUR, despite being very simple, is out of scope of this document. Please refer to Arch Wiki and install these above packages.

Install Nuttx
Code Block
$ mkdir nucleo; cd nucleo
$ git clone https://bitbucket.org/nuttx/nuttx
$ git clone https://bitbucket.org/nuttx/apps

$ cd nuttx
$ tools/configure.sh nucleo-f303re:hello

...

One can see the firmware nuttx.hex has been successfully generated.

Flash & debug with openocd and gdb

The good thing with the nucleo kit is that it embarks the latest st-link/V2-1 which may be used as a JTAG programmer/debugger, and also a USB to serial bridge which is already routed to the STM32 UART1. Therefore one can use it to redirect sdtout and the Nuttx console.

...

For more information on openocd: http://openocd.org/doc/html/index.htmlImage RemovedImage Added
and for GNU gdb: https://www.chemie.fu-berlin.de/chemnet/use/info/gdb/gdb_toc.htmlImage RemovedImage Added

GNU Make doc may be also valuable: https://www.gnu.org/software/make/manual/make.htmlImage RemovedImage Added

Connect to the STLINK serial console

Open a new terminal and run the mintermminiterm:

Code Block
$ miniterm.py /dev/ttyACM0 115200
miniterm.py /dev/ttyACM0 115200
--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

...

Congratulation! You are started with Nuttx NuttX!