84 lines
2.8 KiB
Markdown
84 lines
2.8 KiB
Markdown
This firmware for the [BusVoodoo](https://wiki.cuvoodoo.info/doku.php?id=busvoodoo).
|
|
|
|
project
|
|
=======
|
|
|
|
summary
|
|
-------
|
|
|
|
The BusVoodoo is a multi-protocol debugging adapter.
|
|
This tool allows to quickly communicate with various other electronic devices.
|
|
|
|
board
|
|
=====
|
|
|
|
The BusVoodoo uses a [custom board](https://wiki.cuvoodoo.info/doku.php?id=busvoodoo#software_hardware) based on a [STM32F103RC](http://www.st.com/en/microcontrollers/stm32f103rc.html) micro-controller.
|
|
|
|
connections
|
|
===========
|
|
|
|
The BusVoodoo provides:
|
|
|
|
- a USB port for a connection to the PC
|
|
- an I/O port for the 0-5V protocols
|
|
- an I2C port to control an OLED display
|
|
- a programming port for debugging usindg SWD and UART
|
|
|
|
Check the [BusVoodoo hardware](https://git.cuvoodoo.info/busvoodoo_hardware/about/) files for more details.
|
|
|
|
All pins are configured using `define`s in the corresponding source code.
|
|
|
|
code
|
|
====
|
|
|
|
dependencies
|
|
------------
|
|
|
|
The source code uses the [libopencm3](http://libopencm3.org/) 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 run `rake`.
|
|
|
|
documentation
|
|
-------------
|
|
|
|
To generate doxygen documentation run `rake doc`.
|
|
|
|
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.
|