STMicroelectronics STM32F1 Cortex-M3 ARM Microcontroller Framework

../
CMSIS/  512Jan 11 02:20:19 2018
Makefile  1453Jan 11 02:20:19 2018
README.txt  2454Mar 15 05:15:58 2017
boards.mk  3015Apr 6 06:46:45 2019
cpu.c  5406Jan 11 02:20:19 2018
cpu.h  1559Jan 11 02:20:19 2018
gpio.c  9168Jan 11 02:20:19 2018
gpio.h  21190Jan 11 02:20:19 2018
i2c.c  5022Jan 11 02:20:19 2018
serial.c  17027Mar 26 06:23:45 2019
spi.c  6796Jan 11 02:20:19 2018
stm32f1.flashocd  1813Jan 11 02:20:19 2018
stm32f1.mk  1845Jan 11 02:20:19 2018
stm32f1.openocd  1471Jan 11 02:20:19 2018
stm32f100rb.S  6228Jan 25 11:01:21 2021
stm32f100rb.debugjlink  1498Jan 11 02:20:19 2018
stm32f100rb.ld  2880Jan 11 02:20:19 2018
stm32f103c8.S  6294Jan 25 11:01:21 2021
stm32f103c8.debugjlink  1498Jan 11 02:20:19 2018
stm32f103c8.ld  2881Jan 11 02:20:19 2018
stm32f103rb.S  6294Jan 25 11:01:21 2021
stm32f103rb.debugjlink  1498Jan 11 02:20:19 2018
stm32f103rb.ld  2881Jan 11 02:20:19 2018
stm32f107rb.S  6395Jan 25 11:01:21 2021
stm32f107rb.debugjlink  1498Jan 11 02:20:19 2018
stm32f107rb.ld  2882Jan 11 02:20:19 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.