2. Quick start

This section describes how to build and execute the ‘blinky’ demo on a STM32F407 Discovery board. It summarises informations thoroughly detailed here:

2.1. Pre-requisites

2.1.1. Install the dependencies

To compile and to run the project, some dependencies need to be installed. Please check the Dependencies section to fetch them.

2.1.2. Fetch the project files

Once the dependencies are installed, create a working directory and then fetch the project with repo

mkdir wookey
cd wookey
repo init -u https://github.com/wookey-project/manifest.git -m wookey.xml
repo sync

For the discovery board, it is possible to test some basic apps with another manifest file

mkdir disco407
cd disco407
repo init -u https://github.com/wookey-project/manifest.git -m disco407.xml
repo sync


Nightly built versions are still unstable and are for developping purposes

2.2. Build the firmware

2.2.1. Set the environment

Set the needed environment variables by sourcing the setenv.sh script

. setenv.sh

2.2.2. Configuration

List the predefined configuration profiles

make defconfig_list

To configure the Wookey board firmware, please use one of the following

make boards/wookey/configs/wookey2_graphic_ada_hs_defconfig
make boards/wookey/configs/wookey2_production_defconfig


During the Wookey project development, various revisions of the hardware design have emerged. The current stable public version is refered to as wookey2. Nonetheless, we still provide config files and sources compatible with the previous revisions. Hence, if you use any hardware referenced upto wookey 1.4 on the board, use wookey prefixed defconfig instead (This will not be the case if you use the publicly available OpenHardwae design)

When using the Disco target, two demo examples are described in section Demo examples. To build the blinky project, choose the disco_blinky_ada_defconfig profile

make boards/32f407disco/configs/disco_blinky_ada_defconfig

2.2.3. Build the binary files

Then, you can launch the compilation


2.3. Flash the firmware

Once the firmware is built, you can flash a target board using the procedure described in Flashing a new firmware

openocd -f tools/stm32f4disco1.cfg -f tools/ocd.cfg

If you build the discovery board demo profile, use

openocd -f tools/stm32f4disco1.cfg -f tools/ocd_demo.cfg

2.4. Execute the new firmware

Press the black reset button to reset the board. You should see the leds blinking. When the blue button is pressed, the blinking pattern changes.

2.5. Debug

2.5.1. Read the USART with minicom

The demo examples are compiled with output traces sent to USART1. This USART uses GPIOs PB6 (TX, transmit) and PB7 (RX, receive). You can connect a USB-to-TTL converter to read those outputs from your host. At least, you must connect the PB6 pin to the receive part of the USB-to-TTL converter.

On Linux, the device /dev/ttyUSB0 should be automatically created after the USB-to-TTL is succesfully connected. Then, you can use minicom to read the messages from the USART and to have some insight about what’s happening

minicom -c on -D /dev/ttyUSB0

2.5.2. Debug with gdb

To debug the new firmware, launch arm-eabi-gdb


Then, inside GDB, execute the following commands

target extended-remote
mon reset halt
symbol-file build/armv7-m/32f407discovery/kernel/kernel.fw1.elf
b main

2.6. Going further

Read the Demo examples section that roughly describes the user code executed by the tasks. You can adapt it to run your own examples.

2.7. Troubleshooting

If you any problem while trying to build a new demo firmware, be sure that you have carefully read the following: