STM32F1xx micro-controller C firmware template
Go to file
King Kévin 5a2a0130c8 add DFU bootloader 2017-04-15 13:51:24 +02:00
lib add MAX7219 7-segment display library from clapperboard project 2017-04-03 13:09:06 +02:00
libopencm3@ad5ec6af08 add libopencm3 and STM32duino-bootloader submodules dependencies 2016-01-15 15:36:00 +01:00
.gitignore ignore generated documentation 2016-08-14 19:26:46 +02:00
.gitmodules remove STM32duino-bootloader 2016-08-14 19:03:17 +02:00
Doxyfile add changes from spark abacus project 2016-10-23 17:42:27 +02:00
Makefile add DFU bootloader 2017-04-15 13:51:24 +02:00
README.md add core board 2017-04-03 13:12:18 +02:00
application.c add DFU bootloader 2017-04-15 13:51:24 +02:00
application.ld add DFU bootloader 2017-04-15 13:51:24 +02:00
bootloader.c add DFU bootloader 2017-04-15 13:51:24 +02:00
bootloader.ld add DFU bootloader 2017-04-15 13:51:24 +02:00
global.c add core board methods 2017-04-03 13:03:29 +02:00
global.h add DFU bootloader 2017-04-15 13:51:24 +02:00
usb_dfu.c add DFU bootloader 2017-04-15 13:51:24 +02:00
usb_dfu.h add DFU bootloader 2017-04-15 13:51:24 +02:00

README.md

this firmware template is designed for development boards based around STM32 F1 series micro-controller.

project

summary

describe project purpose

technology

described electronic details

board

The current implementation uses a core board.

The underlying template also supports following board:

Which board is used is defined in the Makefile. This is required:

  • for the linker script to know the memory layout (flash and RAM)
  • map the user LED and button provided on the board

connections

Connect the peripherals the following way (STM32F10X signal; STM32F10X pin; peripheral pin; peripheral signal; comment):

  • list board to preipheral pin connections

All pins are configured using defines in the corresponding source code.

code

dependencies

The source code uses the libopencm3 library. The projects is already a git submodules. To initialize and it you just need to run once: git submodule init and git submodule update.

firmware

To compile the firmware run make.

documentation

To generate doxygen documentation run make doc.

flash

The firmware will be flashed using SWD (Serial Wire Debug). For that you need an SWD adapter. The Makefile uses a Black Magic Probe (per default), or a ST-Link V2 along OpenOCD software. To flash using SWD run make flash.

debug

SWD also allows to debug the code running on the micro-controller using GDB. To start the debugging session run make debug.

USB

The firmware offers serial communication over USART1 and USB (using the CDC ACM device class).

You can also reset the board by setting the serial width to 5 bits over USB. To reset the board run make reset. This only works if the USB CDC ACM is running correctly and the micro-controller isn't stuck.