Flashing preconfigured parameters and CAN messages
Posted: Wed Jun 10, 2020 5:13 pm
Wanted to share with you my method of flashing boards with a custom parameter set (and possibly CAN message set).
- Configure parameters as needed
- Hide parameters as needed (flag <paramname> hidden)
- Configure CAN messages
- save !
- Connect JTAG/SWD probe
- Read 2k starting from flash address 0x0801F800 (in openocd "flash read_bank 0 config.bin 0x1F800")
- On all subsequent boards you can use a flash script as follows
Code: Select all
proc program_device () {
reset halt
flash write_image erase unlock stm32_loader.hex
flash write_image erase unlock stm32_foc.hex
flash write_image erase unlock config.bin 0x0801F800
reset run
sleep 1
shutdown
}
init
reset init
program_device ()