Skip to content

Running on STM targets

Daniele Lacamera edited this page Jul 30, 2016 · 5 revisions

#Running on Actual Hardware#

##Pre-defined targets##

Pre-defined configuration files exist for most popular evaluation board. If your board has a corresponding kernel configuration file under defconfig/, you can import it to the current configuration. E.g. to configure frosted for a STM32F407 Discovery evaluation board, type:

make defconfig TARGET=stm32f407

##Kernel Configuration##

  • Verify that you have the correct settings for your hardware in the Platform selection section:
  • Architecture
  • MCU
  • Clock speed
  • Board (if applicable)
  • Customize the Device Drivers section. E.g. in order to enable UART1, you will need to select it under Subsystems > Devices > Generic UART driver > UART 1

##System Configuration## You should also select the userland programs to build. In order to do so, enter the frosted-userland directory and run make menuconfig there as well. Afterwards, go up one directory to the frosted root again and run make.

##Build images## The binaries produced by the build are:

  • kernel.elf : kernel executable in ELF format
  • kernel.img : kernel executable in BIN format (to be placed at the beginning of the flash)
  • apps.img : userspace XIPFS filesystem image generated by frosted-userland

The two images are concatenated into a single file: image.bin

##Flashing to target## Flashing mechanism may differ depending on boards/brands.

  • If the board supports st-link:

  • Connect the st-link port of your board to USB

  • Run st-flash write image.bin 0x08000000

  • For a board with MBED bootloader:

  • Connect the DBG port to the USB

  • A storage device should appear

  • copy the image.bin file to the USB storage

  • Using dfu: (TODO)

Clone this wiki locally