STM32 Buildroot distribution

This guide targets the STM32F407 discovery board with the DISBB backbone board.

We have created a modified buildroot distribution for the STM32 Cortex-M series ARM processors. This will provide:

GNU Toolchain for the Cortex-M4 target
Library support
RTOS
Filesystem automatically integrated into RTOS binary
On chip debugger
GDB debugger

If you have questions or comments you can email cjwfirmware (at) vxmdesign (dot) com

System Dependencies

These are the basic system requirements, and generic package commonly used in most linux environments

sudo apt-get install build-essential git flex bison texinfo gettext libusb-1.0.0 libncurses5-dev minicom

Building the toolchain

Installing the toolchain is very simple. It will not modify any other part of system. Everything in generates will be placed in the buildroot output directory. Root privilages are not required.

git clone https://github.com/vxmdesign/prjpluto.git
cd prjpluto
make vdsc_defconfig
make

This will take about an hour to finish depending on your system

Adding the toolchain to the path

Buildroot will generate the arm-none-eabi- toolchain. It is located in output/host/usr/bin

From the top of the prjpluto tree

cd output/host/usr/bin
export PATH="$PATH:$PWD"

Starting the on Chip Debugger

If you are using an a ST discovery based board that uses ST link, you can use openocd to start the remote debugger operating. This is built with buildroot. Depending

From the top of the prjpluto tree

cd output/host/usr/bin
sudo ./openocd -f board/stm32f4discovery.cfg

Start GDB and load image

The VXM Design buildroot distribution will automatically build an RTOS for the STM32 processor. This RTOS is a highly modified Nuttx RTOS. It comes with two images. The nuttx image and the yartos image. Nuttx is generic, and yartos is the same code, but it includes the filesystem.

From the top of the prjpluto tree

cd output/images
arm-none-eabi-gdb yartos

This will start gdb

(gdb) tar remote localhost:3333
(gdb) load

Now start the application (Gdb continue)

(gdb) c