STMicroelectronics STM32F1 Cortex-M3 ARM Microcontroller Framework

Credits

The C run time startup code stm32f1xxxx.S and linker scripts stm32f1xxxx.ld were written by myself based on various examples on the Internet and in The Definitive Guide to the ARM Cortex-M3.

The CMSIS library came from STMicroelectronics, extracted from the STM32CubeF1 software package.

Other files are original works by myself.

Memory Map (STM32F103RB)

Code Flash: 0x00000000 to 0x0001FFFF 128 KB
Data RAM: 0x20000000 to 0x20004FFF 20 KB

The STM32F1 microcontrollers can have any of code flash at 0x08000000, system ROM (boot loader) at 0x1FFFF000, or data RAM at 0x20000000 mapped to address 0x00000000, depending on the BOOT0 and BOOT1 pins. This framework assumes BOOT0 is strapped low, mapping code flash to 0x00000000.

This framework assumes a single stack for both thread and handler modes, using MSP (Main Stack Pointer) at the top of RAM. The C heap is placed at the end of BSS data.

Other Devices

This framework may be used for other devices in the STM32F1 family, provided the following files are modified:

stm32f1xxxx.ld The RAM and ROM sizes must match the device.
stm32f1xxxx.S The interrupt vector table must match the device.
stm32f1xxxx.debugjlink The memory regions reported to GDB must match the device.

Test Platform

This framework is validated on the following STM32F1xx development boards:

Tested on 10 June 2015 with gcc 4.9.2.


Questions or comments to Philip Munts phil@munts.net

I am available for custom system development (hardware and software) of products using the STM32F1 or other microcontrollers.