Flashing preconfigured parameters and CAN messages

Post Reply
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1914 times
Contact:

Flashing preconfigured parameters and CAN messages

Post 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 ()
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
cloudy
Posts: 210
Joined: Wed Oct 02, 2019 12:15 am
Location: UK
Been thanked: 7 times

Re: Flashing preconfigured parameters and CAN messages

Post 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?
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1914 times
Contact:

Re: Flashing preconfigured parameters and CAN messages

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply