Difference between revisions of "STM32"
(→STM32F429i-Discovery) |
(→STM32F429i-Discovery) |
||
Line 16: | Line 16: | ||
<gallery> | <gallery> | ||
− | File:Stm32f429 disco.jpg | + | File:Stm32f429 disco.jpg |
</gallery> | </gallery> | ||
Revision as of 02:10, 9 July 2015
Contents
Introduction
This is starting page for Linux on STMicroelectronics STM32 microcontrollers family. These pages are not meant to replace official STMicroelectronics support.
Supported Boards
STM32F429i-Discovery
The STM32F429 Discovery kit has the following features:
- STM32F429 MCU (ARM Cortex-M4 up to 180MHz, 2MB internal flash, 256KB internal RAM)
- 8MB SDRAM
- USB OTG Full-Speed
- 2.4" LCD
- MEMS motion sensor
- STLink/V2 (debugging)
- Extension headers
Toolchain
Bare-metal toolchain
Bare-metal toolchain is used to compile Bootloader and Kernel. Version known to work here.
uClibc toolchain
ToDo
Bootloaders
AFBoot-STM32
AFBoot-STM32 has been developed by Andreas Färber and is available on his GitHub page.
The main advantage of this bootloader is its size (lees than 2KB). Indeed, the STM32F429 only has 2MB internal flash for Bootloader, Kernel, Rootfs and DTB.
A fork compatible with mainline Kernel (from v4.2-rc1) is available here.
The following commands cover the later version.
git clone https://github.com/mcoquelin-stm32/afboot-stm32.git cd afboot-stm32 make stm32f429i-disco make flash_stm32f429i-disco
U-Boot
U-Boot STM32 port to mainline has been done by Kamil Lulko. The port is based on U-Boot fork from Emcraft, distributed on their GitHub page
git clone git://git.denx.de/u-boot.git cd u-boot make ARCH=arm CROSS_COMPILE=arm-none-eabi- stm32f429-discovery_defconfig make ARCH=arm CROSS_COMPILE=arm-none-eabi-
Note that mainline Kernel requires some patches on top to work with U-Boot port, these patches are available on Kamil GitHub.
Linux Kernel
User Space
Busybox
Below link is a prebuilt minimal Busybox to be used as a Ramdisk:
File:Stm32 mini rootfs.cpio.bz2
Buildroot
A fork of Buildroot has been done by Kamil Lulko to add STM32 support. The git repo is available here. It builds Kernel, U-Boot and RootFS (busybox).
Debug
OpenOCD in combination with GDB can be used to debug through the STLink interface.
Flash Tools
OpenOCD
OpenOCD can be used to write binaries to internal flash.
Usage example
openocd -f board/stm32f429discovery.cfg \ -c "init" \ -c "reset init" \ -c "flash probe 0" \ -c "flash info 0" \ -c "flash write_image erase arch/arm/boot/dts/stm32f429-disco.dtb 0x08004000" \ -c "flash write_image erase arch/arm/boot/xipImage 0x08008000" \ -c "reset run" \ -c "shutdown"
Texane
STlink tool from Texane can be found here.
Usage example
st-flash write arch/arm/boot/dts/stm32f429-disco.dtb 0x08004000 st-flash write arch/arm/boot/xipImage 0x08008000