Page 1 of 1

Flashing preconfigured parameters and CAN messages

Posted: Wed Jun 10, 2020 5:13 pm
by johu
Wanted to share with you my method of flashing boards with a custom parameter set (and possibly CAN message set).
  1. Configure parameters as needed
  2. Hide parameters as needed (flag <paramname> hidden)
  3. Configure CAN messages
  4. save !
  5. Connect JTAG/SWD probe
  6. Read 2k starting from flash address 0x0801F800 (in openocd "flash read_bank 0 config.bin 0x1F800")
  7. 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 ()

Re: Flashing preconfigured parameters and CAN messages

Posted: Wed Jun 10, 2020 6:23 pm
by cloudy
Thanks! Other than speed, what's the advantage over reloading the json parameter file in web interface? Does that not contain can map and/or hide flags perhaps?

Re: Flashing preconfigured parameters and CAN messages

Posted: Wed Jun 10, 2020 7:31 pm
by johu
cloudy wrote: Wed Jun 10, 2020 6:23 pm Thanks! Other than speed, what's the advantage over reloading the json parameter file in web interface? Does that not contain can map and/or hide flags perhaps?
You have mentioned all reasons :)
When I program the boards I sell it is just convenient to flash it all in one go.