From 9e822663cbbb841ee7636cfd169426e91d8fa643 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 26 Sep 2021 16:59:03 +0200 Subject: Add Helper Scripts and Documentation --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 0306080..070c535 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,40 @@ A firmware project for the STM32F103C8T6 to control LED strips. +## Usage + +Install the necessary software. For Arch Linux this works like this: +``` +sudo pacman -S \ + base-devel \ + arm-none-eabi-binutils \ + arm-none-eabi-gcc \ + arm-none-eabi-gdb \ + arm-none-eabi-newlib +``` + +Clone this repository with all Git submodules: +``` +git clone --recurse-submodules https://gitea.xengineering.eu/xengineering/ledcontrol.git +``` + +Enter the repository and build the software +``` +cd ledcontrol +make +``` + +Connect your STM32F103C8T6 with an STLINK V2 debugger and flash the firmware: +``` +bash ocd.sh +# switch to a second terminal in the same folder +bash gdb.sh build/ledcontrol.elf +load +run +# CTRL + C will stop the execution +# leave GDB with CTRL + D +``` + ## External References - Nice [Tutorial](https://jacobmossberg.se/posts/2018/08/11/run-c-program-bare-metal-on-arm-cortex-m3.html) about C programs on bare-metal ARM chips -- cgit v1.2.3-70-g09d2