Add platformio.ini file, update README.md, and .gitignore

new_hw
Simon Hailes 4 years ago
parent 28287b9acc
commit b21e6dd3f9
  1. 5
      .gitignore
  2. 10
      README.md
  3. 17
      platformio.ini

5
.gitignore vendored

@ -1,2 +1,7 @@
build/*
!build/hover.hex
.pioenvs
.piolibdeps
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json

@ -21,8 +21,16 @@ http://vocke.tv/lib/exe/fetch.php?media=20150722_hoverboard_sch.pdf
---
## Building
To build the firmware, just type "make". Make sure you have specified your gcc-arm-none-eabi binary (version 7 works, there is a version that does not!) location in the Makefile ("PREFIX = ...").
The firmware will also build (and flash) very easily from platform.io, plaformio.ini file included. Simply open the folder in the IDE of choice (vscode or Atom), and press the 'PlatformIO:Build' or the 'PlatformIO:Upload' button (bottom left in vscode).
(Note: if you have no buttons, use Debug/Add Configuration, and select 'PlatformIO Debugger'; seems to kick it into life).
## Flashing
To build the firmware, just type "make". Make sure you have specified your gcc-arm-none-eabi binary (version 7 works, there is a version that does not!) location in the Makefile ("PREFIX = ..."). Right to the STM32, there is a debugging header with GND, 3V3, SWDIO and SWCLK. Connect GND, SWDIO and SWCLK to your SWD programmer, like the ST-Link found on many STM devboards.
Right to the STM32, there is a debugging header with GND, 3V3, SWDIO and SWCLK. Connect GND, SWDIO and SWCLK to your SWD programmer, like the ST-Link found on many STM devboards.
Make sure you hold the powerbutton or connect a jumper to the power button pins while flashing the firmware, as the STM might release the power latch and switches itself off during flashing. Battery > 36V have to be connected while flashing.

@ -0,0 +1,17 @@
; PlatformIO Project Configuration File2
; http://docs.platformio.org/page/projectconf.html
[platformio]
include_dir = inc
[env:genericSTM32F103RC]
platform = ststm32
framework = stm32cube
board = genericSTM32F103RC
build_flags =
-DUSE_HAL_DRIVER
-DSTM32F103xE
-Wl,-T${PROJECT_DIR}/STM32F103RCTx_FLASH.ld
-Wl,-lc
-Wl,-lm
-Wl,-lnosys
Loading…
Cancel
Save