arduino / ArduinoCore-mbed

347 stars 203 forks source link

Portenta H7 Bootloader #27

Closed jwestmoreland closed 4 years ago

jwestmoreland commented 4 years ago

Hello All,

I've looked everywhere on my drive - I can't find any tools/scripts regarding the bootloader other than what is in platform.txt - (openocd, etc, are there under ./arduino/..)

Uploader tools

---------------------

tools.openocd.path={runtime.tools.openocd-0.10.0-arduino13.path} tools.openocd.cmd=bin/openocd tools.openocd.cmd.windows=bin/openocd.exe

tools.openocd.upload.params.verbose=-d2 tools.openocd.upload.params.quiet=-d0 tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" {bootloader.programmer} {bootloader.config} -c "telnet_port disabled; init; reset init; halt; adapter speed 10000; program {{build.path}/{build.project_name}.elf}; reset run; shutdown"

tools.openocd.program.params.verbose=-d2 tools.openocd.program.params.quiet=-d0 tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" {bootloader.programmer} {bootloader.config} -c "telnet_port disabled; init; reset init; halt; adapter speed 10000; program {{build.path}/{build.project_name}.elf}; reset run; shutdown"

tools.openocd.erase.params.verbose=-d2 tools.openocd.erase.params.quiet=-d0 tools.openocd.erase.pattern=

tools.openocd.bootloader.params.verbose=-d2 tools.openocd.bootloader.params.quiet=-d0 tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" {bootloader.programmer} {bootloader.config} -c "telnet_port disabled; init; reset init; halt; adapter speed 10000; {bootloader.extra_action.preflash}; program {{runtime.platform.path}/bootloaders/{bootloader.file}}; reset run; shutdown"

I'll look here: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

Maybe there's a download I missed - I thought for a little while I had bricked my Potenta "wonders" H7.

Also noticed the _hs, _fs, and _hs_v2 versions of the bootloader.

Thanks In Advance, John W.

jwestmoreland commented 4 years ago

To All:

OK - I just updated 1.8.12 on this particular machine to 1.8.13 and the 'Burn Bootloader' command returned:

C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino13/bin/openocd.exe -d2 -s C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino13/share/openocd/scripts/ -f interface/stlink.cfg -f target/stm32h7x_dual_bank.cfg -c telnet_port disabled; init; reset init; halt; adapter speed 10000; stm32h7x option_write 0 0x01c 0xb86aaf0; program {C:\Users\john\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.1/bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs.elf}; reset run; shutdown

So, the only two supported interfaces as of this release are: (in programmers.txt): cmsis-dap.name=ARM CMSIS-DAP compatible cmsis-dap.communication=USB cmsis-dap.protocol= cmsis-dap.program.protocol= cmsis-dap.program.tool=openocd cmsis-dap.program.extra_params=

stlink.name=STMicroelectronics STLINK stlink.communication=USB stlink.protocol= stlink.program.protocol= stlink.program.tool=openocd stlink.program.extra_params=

OK.

Regards, John

jwestmoreland commented 4 years ago

The beginning of a pull-request to support Segger JLink for programming the bootloader - I plan on getting this done relatively soon.

programmers.txt

I'm seeing the RGB blinky right now...

jwestmoreland commented 4 years ago

Pull request added: #28 . Will close this soon.

jwestmoreland commented 4 years ago

Closing this in lieu of Pull Request.

jwestmoreland commented 4 years ago

Closing this in lieu of Pull Request #28 .