README: move setup before flashing & formatting
Makes it a bit more newb-friendly, I think (being a newb).
This commit is contained in:
@@ -12,25 +12,38 @@ The software is configurable to support different charge controller PCBs with ei
|
||||
- [Libre Solar MPPT 12V 10A with USB (v0.2 and v0.4)](https://github.com/LibreSolar/MPPT-1210-HUS)
|
||||
- [Libre Solar PWM 12/24V 20A](https://github.com/LibreSolar/PWM-2420-LUS)
|
||||
|
||||
## Toolchain and flashing instructions
|
||||
|
||||
See the Libre Solar website for a detailed instruction how to [develop software](http://libre.solar/docs/toolchain) and [flash new firmware](http://libre.solar/docs/flashing).
|
||||
|
||||
**Remark:** Flashing the STM32L072 MCU (as used in the MPPT 1210 HUS and the PWM charge controller) using OpenOCD with the standard settings from PlatformIO fails in many cases. Possible workarounds:
|
||||
|
||||
1. Change OpenOCD settings to `set WORKAREASIZE 0x1000` in the file `~/.platformio/packages/tool-openocd/scripts/board/st_nucleo_l073rz.cfg`.
|
||||
|
||||
2. Use ST-Link tools. For Windows there is a GUI tool. Under Linux use following command:
|
||||
|
||||
st-flash write .pioenvs/mppt-2420-lc-v0.10/firmware.bin 0x08000000
|
||||
|
||||
3. Use other debuggers and tools, e.g. Segger J-Link.
|
||||
|
||||
|
||||
## Initial software setup (IMPORTANT!)
|
||||
|
||||
1. Select the correct board in `platformio.ini` by removing the comment before the board name under [platformio]
|
||||
2. Copy `config.h_template` to `config.h` and adjust basic settings (`config.h` is ignored by git, so your changes are kept after software updates using `git pull`)
|
||||
1. Select the correct board in `platformio.ini` by removing the comment before the board name under `[platformio]`
|
||||
2. Copy `src/config.h_template` to `src/config.h`, and adjust basic settings
|
||||
|
||||
(`config.h` is ignored by git, so your changes are kept after software updates using `git pull`)
|
||||
|
||||
cp src/config.h_template src/config.h
|
||||
$EDITOR src/config.h
|
||||
|
||||
## Toolchain and flashing instructions
|
||||
|
||||
See the Libre Solar website for project-agnostic instructions on how to
|
||||
[develop software](http://libre.solar/docs/toolchain) and
|
||||
[flash new firmware](http://libre.solar/docs/flashing).
|
||||
|
||||
---
|
||||
**If flashing the STM32L072 MCU using OpenOCD fails**
|
||||
|
||||
... as seems to happen with the standard settings from PlatformIO.
|
||||
|
||||
*NOTE* This MCU is used in the MPPT 1210 HUS and the PWM charge controller, for example.
|
||||
|
||||
Try one of these workarounds:
|
||||
|
||||
1. Change OpenOCD settings to `set WORKAREASIZE 0x1000` in the file `~/.platformio/packages/tool-openocd/scripts/board/st_nucleo_l073rz.cfg`.
|
||||
2. Use ST-Link tools. For Windows there is a GUI tool. Under Linux use the following command:
|
||||
|
||||
st-flash write .pioenvs/mppt-2420-lc-v0.10/firmware.bin 0x08000000
|
||||
3. Use other debuggers and tools, e.g. Segger J-Link.
|
||||
|
||||
---
|
||||
|
||||
## API documentation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user