Skip to content

Commit

Permalink
Clean up and doc for release
Browse files Browse the repository at this point in the history
  • Loading branch information
brittanyb committed Nov 30, 2020
1 parent 9889710 commit 8971485
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 52 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
.vscode/.cortex-debug.*
1 change: 0 additions & 1 deletion .vscode/.cortex-debug.peripherals.state.json

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/.cortex-debug.registers.state.json

This file was deleted.

12 changes: 6 additions & 6 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
64 changes: 32 additions & 32 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -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": []
}
]
}
// 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": []
}
]
}
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
######################################
# target
######################################
TARGET = fakefirm
TARGET = panel_firmware


######################################
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions Src/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8971485

Please sign in to comment.