STMicroelectronics STM32F1 Cortex-M3 ARM Microcontroller Framework

../
CMSIS/   512   Jan 11 2018
Makefile   1453   Jan 11 2018
README.html   2733   Mar 15 2017
README.txt   2454   Mar 15 2017
boards.mk   3015   Apr 6 2019
cpu.c   5406   Jan 11 2018
cpu.h   1559   Jan 11 2018
gpio.c   9168   Jan 11 2018
gpio.h   21190   Jan 11 2018
i2c.c   5022   Jan 11 2018
serial.c   17027   Mar 26 2019
spi.c   6796   Jan 11 2018
stm32f1.flashocd*   1813   Jan 11 2018
stm32f1.mk   1845   Jan 11 2018
stm32f1.openocd   1471   Jan 11 2018
stm32f100rb.S   6169   Jan 11 2018
stm32f100rb.debugjlink   1498   Jan 11 2018
stm32f100rb.ld   2880   Jan 11 2018
stm32f103c8.S   6235   Jan 11 2018
stm32f103c8.debugjlink   1498   Jan 11 2018
stm32f103c8.ld   2881   Jan 11 2018
stm32f103rb.S   6235   Jan 11 2018
stm32f103rb.debugjlink   1498   Jan 11 2018
stm32f103rb.ld   2881   Jan 11 2018
stm32f107rb.S   6336   Jan 11 2018
stm32f107rb.debugjlink   1498   Jan 11 2018
stm32f107rb.ld   2882   Jan 11 2018

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.