Code Confidencebuild



Setup -- Preparing for eCos Development with the STM32F4-Discovery board


In a typical development environment the STM32F4-Discovery board is halted on reset using OpenOCD communicating via the ST-LINK/V2 SWD interface. eCos applications are configured for JTAG startup, then downloaded to the board and executed via the arm-eabi-gdb debugger.

OpenOCD may be configured for use with the STM32F4-Discovery board using the board configuration script stm32f4discovery.cfg provided with the tool. It is also necessary to define a handler for GDB attach events which will halt the board. A suitable OpenOCD script is provided at misc/openocd-misc.cfg in the STM32F4-Discovery platform HAL package. Both scripts may be specified on the OpenOCD command line.

Diagnostic output

For diagnostic output, a SparkFun FTDI 3.3v Basic Breakout board or similar may be connected to UART4 of the STM32F4-Discovery board using jumper wires as follows:

FunctionSTM32F4-Discovery headerSparkFun FTDI breakout board socket

The UART is configured at 115200 baud by default and runs with 8 bits, no parity, and 1 stop bit. The baud rate can be changed via the configuration option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD.