From 8971485538b5f58dad8932d523139366f59931b9 Mon Sep 17 00:00:00 2001 From: Brittany Barrett Date: Mon, 30 Nov 2020 16:25:45 +0000 Subject: [PATCH] Clean up and doc for release --- .gitignore | 1 + .vscode/.cortex-debug.peripherals.state.json | 1 - .vscode/.cortex-debug.registers.state.json | 1 - .vscode/c_cpp_properties.json | 12 ++-- .vscode/launch.json | 2 +- .vscode/tasks.json | 64 ++++++++++---------- LICENSE | 7 +++ Makefile | 2 +- README.md | 21 ++++++- Src/led.c | 7 --- 10 files changed, 66 insertions(+), 52 deletions(-) delete mode 100644 .vscode/.cortex-debug.peripherals.state.json delete mode 100644 .vscode/.cortex-debug.registers.state.json create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore index 567609b..445d9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build/ +.vscode/.cortex-debug.* \ No newline at end of file diff --git a/.vscode/.cortex-debug.peripherals.state.json b/.vscode/.cortex-debug.peripherals.state.json deleted file mode 100644 index c95d541..0000000 --- a/.vscode/.cortex-debug.peripherals.state.json +++ /dev/null @@ -1 +0,0 @@ -[{"node":"GPIOB","expanded":true,"format":0}] \ No newline at end of file diff --git a/.vscode/.cortex-debug.registers.state.json b/.vscode/.cortex-debug.registers.state.json deleted file mode 100644 index 0637a08..0000000 --- a/.vscode/.cortex-debug.registers.state.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index d4490c0..7a82e75 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -3,12 +3,12 @@ { "name": "STM32 Debug", "includePath": [ - "/opt/vsarm/armcc/arm-none-eabi/include/c++/9.3.1", - "/opt/vsarm/armcc/arm-none-eabi/include/c++/9.3.1/arm-none-eabi", - "/opt/vsarm/armcc/arm-none-eabi/include/c++/9.3.1/backward", - "/opt/vsarm/armcc/lib/gcc/arm-none-eabi/9.3.1/include", - "/opt/vsarm/armcc/lib/gcc/arm-none-eabi/9.3.1/include-fixed", - "/opt/vsarm/armcc/arm-none-eabi/include", + "${env:VSARM}/armcc/arm-none-eabi/include/c++/9.2.1", + "${env:VSARM}/armcc/arm-none-eabi/include/c++/9.2.1/arm-none-eabi", + "${env:VSARM}/armcc/arm-none-eabi/include/c++/9.2.1/backward", + "${env:VSARM}/armcc/lib/gcc/arm-none-eabi/9.2.1/include", + "${env:VSARM}/armcc/lib/gcc/arm-none-eabi/9.2.1/include-fixed", + "${env:VSARM}/armcc/arm-none-eabi/include", "${workspaceRoot}/Drivers/CMSIS/Include/", "${workspaceRoot}/Drivers/CMSIS/Device/ST/STM32F3xx/Include/", "${workspaceRoot}/Inc", diff --git a/.vscode/launch.json b/.vscode/launch.json index 4c0e564..6c0fbc6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,7 +3,7 @@ { "showDevDebugOutput": true, "cwd": "${workspaceRoot}", - "executable": "./build/vsarm_firmware.elf", + "executable": "./build/panel_firmware.elf", "name": "Debug STM32", "request": "launch", "type": "cortex-debug", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6103920..fe6b5ac 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,33 +1,33 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "Make Firmware", - "type": "shell", - "command": "PATH=\"$PATH:/opt/vsarm/armcc/bin\" make -j8 all TARGET=vsarm_firmware OPT=\"-O2\" BINPATH=\"/opt/vsarm/armcc\/bin\"", - "options": { - "cwd": "${workspaceRoot}" - }, - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - }, - { - "label": "Load Firmware", - "type": "shell", - "command": "st-flash write ./build/vsarm_firmware.bin 0x08000000 && st-flash reset || sleep 0.2 && st-flash write ./build/vsarm_firmare.bin 0x08000000 && st-flash reset", - "options": { - "cwd": "${workspaceRoot}" - }, - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - } - ] -} \ No newline at end of file + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Make Firmware", + "type": "shell", + "command": "mingw32-make -j8 all TARGET=panel_firmware OPT=\"-O2\" BINPATH=\"${env:VSARM}\/armcc\/bin\"", + "options": { + "cwd": "${workspaceRoot}" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Load Firmware", + "type": "shell", + "command": "st-flash write ./build/panel_firmware.bin 0x08000000", + "options": { + "cwd": "${workspaceRoot}" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + } + ] + } \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cdf988f --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 Impulse Creations Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this hardware, software, and associated documentation files (the "Product"), to deal in the Product without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Product, and to permit persons to whom the Product is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Product. + +THE PRODUCT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PRODUCT OR THE USE OR OTHER DEALINGS IN THE PRODUCT. \ No newline at end of file diff --git a/Makefile b/Makefile index 7a0ddcb..d20dfd6 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ###################################### # target ###################################### -TARGET = fakefirm +TARGET = panel_firmware ###################################### diff --git a/README.md b/README.md index b0b3dd5..be0088e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,19 @@ -# dance-panel-firmware-wip -work in progress dance panel firmware +# RE:Flex Dance Panel v2 Firmware -The .vscode folder contains my hardcoded vsarm paths, so make sure you swap in a .vscode folder from your own project to fix it up +# Source + +This repository contains source files for the firmware of the RE:Flex Dance Panel board. I suggest the cross-platform editor [Visual Studio Code](https://code.visualstudio.com/) to work with this project. The environment used in this project can be configured using [this tutorial](https://hbfsrobotics.com/blog/configuring-vs-code-arm-development-stm32cubemx) as a template, without the need for the 'STM32 Workspace Setup' or 'CubeMX Blink Example' sections. + +- **panel-board.ioc / .mxproject** - These files are projects files for [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html). They are used in generating initial skeleton code of the project if a new project is desired from the base requirements. +- **Makefile / STM32F334K8Tx_FLASH.ld / startup_stm32f334x8.s** - The makefile / linker script build and correctly flash the executable to the microcontroller. The startup script will initialize the microcontroller and its peripherals on boot, and will then jump to the main code execution. +- **STM32F3x4.svd** - This file contains a list of register maps and device information for the microcontroller. It allows the cortex-debug extension to monitor the microcontroller's internal values for the sake of debugging. +- **Src/Inc/Drivers Folders** - These are the source code files for the project. Everything in here is the meat of the project, driving peripherals and defining core behaviour. All code is eventually built into an executable that runs solely on the microcontroller in the Panel board. +- **.vscode** - This folder contains files for Visual Studio Code's plugins to build, debug and flash the project. I've included my setup as an example, however your files here may vary from mine depending on your build environment. + +# Release + +The release contains firmware to program the RE:Flex Dance Panel board. At current, this is best accomplished via an [ST-Link/V2 programmer](https://www.st.com/en/development-tools/st-link-v2.html). You may find further instructions on the [firmware installation page](https://reflex.dance/firmware-installation). + +## License + +For license details, see LICENSE file \ No newline at end of file diff --git a/Src/led.c b/Src/led.c index e02fd4d..7b9fd90 100644 --- a/Src/led.c +++ b/Src/led.c @@ -338,13 +338,6 @@ static void transfer_complete_handler(DMA_HandleTypeDef *dma_handle){ LED_PORT->BRR |= led_pin_pos; - // Clear LED data - // This is also done elsewhere, but leaving it here reduces LED flickering - // too. - /*for (uint16_t address = 0; address < LEN_BUFFER; address++){ - led_data[address] |= led_pin_pos; - }*/ - sending_buffer = false; DBG_LED3_OFF();