STM32F1xx micro-controller C firmware template
Go to file
King Kévin 67b232f96e ld: fix SRAM size 2018-04-07 11:15:29 +02:00
lib USB: fix BV comment 2018-04-07 11:13:53 +02:00
libopencm3@ad5ec6af08 add libopencm3 and STM32duino-bootloader submodules dependencies 2016-01-15 15:36:00 +01:00
.gitignore ignore vim and gdb files 2018-01-14 13:35:28 +01: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
LICENSE.txt add GPLv3 license file 2018-02-13 15:14:55 +01:00
README.md README: add link to manual 2018-03-11 13:19:24 +01:00
Rakefile Rakefile: fix typo 2018-04-03 16:50:09 +02:00
application.c application: ony prevent clock halt when in debugging mode 2018-04-07 11:15:05 +02:00
application.ld ld: fix SRAM size 2018-04-07 11:15:29 +02:00
bootloader.c bootloader: fix SRAM comment 2018-04-07 11:13:08 +02:00
bootloader.ld ld: fix SRAM size 2018-04-07 11:15:29 +02:00
global.c global: re-enable sleep in sleep_ms 2018-04-04 17:13:02 +02:00
global.h flash internal: check enforced flash size 2018-04-06 19:58:16 +02:00

README.md

This firmware for the BusVoodoo.

project

summary

The BusVoodoo is a multi-protocol debugging adapter. This tool allows to quickly communicate with various other electronic devices.

An overview of the BusVoodoo can be found here A more detailed manual is available here. The following information will focus on the software development.

board

The BusVoodoo uses a custom board based on a STM32F103RC micro-controller.

code

dependencies

To develop the firmware, following Linux packages are required:

  • arm-none-eabi-gcc to compile the source code
  • arm-none-eabi-binutils to create the firmware binaries
  • arm-none-eabi-gdb to debug the firmware
  • rake automate development steps
  • openocd to flash and debug over SWD (when using an ST-Link V2 adapter)
  • doxygen to compile the documentation

The source code uses the libopencm3 library. The projects is already a git submodules. It will be initialized when compiling the firmware. Alternatively you can run once: git submodule init and git submodule update.

firmware

To compile the firmware files run rake. This will generate two firmware:

  • bootloader: a USB DFU bootlaoder
  • application: the main application

documentation

To generate doxygen documentation run rake doc. The documentation describing all files, functions, and variables will be available in the doc folder.

Further comments are in the source code.

flash

There are two firmware images: bootloader and application. The bootloader image allows to flash the application over USB using the DFU protocol. The bootloader is started first and immediately jumps to the application if it is valid and the DFU mode is not forced. The application image is the main application and is implemented in application.c.

The bootloader image 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 the booltoader using SWD run rake flash_booloader.

Once the bootloader is flashed it is possible to flash the application over USB using the DFU protocol by running rake flash. The application advertises USB DFU support (along with the USB CDC ACM class). If the application is broken, force the bootloader to start the DFU mode by shorting the contacts marked as DFU on the board while powering up. It is also possible to flash the application image using SWD by running rake flash_application.

debug

SWD also allows to debug the code running on the micro-controller using GDB. To start the debugging session run rake 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 rake reset. This only works if provided USB CDC ACM is running correctly and the micro-controller isn't stuck.