Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JLink To Portenta Programmers; Add pinPeripheral() (wiring_private.c - note WIP) #28

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jwestmoreland
Copy link

@jwestmoreland jwestmoreland commented Jul 25, 2020

To add the Segger JLink family to the list of programmers for the Portenta H7 target. The Segger JLink will be able to be used with OpenOCD to run the Burn Bootloader command from the 1.8.13 (Current IDE) for Arduino. I'm not 100% sure how to invoke this yet from the new Pro IDE but imagine a .json file can be made (possibly as a task) that can do this as well.

Please proceed with the appropriate caution if you are going to try this.
Note - in the fork - please only use
664f83a
as the UDP/Multicast issue has been fixed and this pull request is only to currently update:

boards.txt
platform.txt
and
programmers.txt

Note once those have been updated and the Arduino IDE has been restarted, the programmer should show up in the menu once the Portenta has been selected (1.8.13 IDE currently).

segger

Here's an example of an output that has successfully connected:
C:\Users\john>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/jlink.cfg -f target/stm32h7x_dual_bank.cfg -c "telnet_port disabled; tcl_port disabled"
Open On-Chip Debugger 0.10.0+dev-g7c88e76a7-dirty (2020-07-06-09:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

swd
Info : tcl server disabled
Info : telnet server disabled
Info : J-Trace PRO V1 Cortex-M compiled Jun 9 2020 13:39:24
Info : Hardware version: 1.00
Info : VTarget = 3.288 V
Info : clock speed 1800 kHz
Info : SWD DPIDR 0x6ba02477
Info : stm32h7x.cpu0: hardware has 0 breakpoints, 0 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 2331
Info : Listening on port 2331 for gdb connections
shutdown command invoked

The USB drivers for JLink have to be replaced with WINUSB - I will add a quick-start guide to this pull request showing the basic steps to getting that functional (currently on win10). The Zadig utility is one quick way of doing that.

Thanks,
John

… convenience at this point to be put here --- jcw
…P! Proceed with the appropriate caution --- jcw
@jwestmoreland
Copy link
Author

jwestmoreland commented Jul 26, 2020

A quick start guide that should be helpful to some is here:

Portenta.H7.Adding.Segger.JLink.As.Programmer.v0p3.pdf

@jwestmoreland
Copy link
Author

jwestmoreland commented Jul 26, 2020

FYI: I was able to restore bootloader via:

C:\tmp>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/jlink.cfg -f target/stm32h7x_dual_bank.cfg -c "telnet_port disabled; init; 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**_v2**.elf}; reset run; shutdown"
Open On-Chip Debugger 0.10.0+dev-g7c88e76a7-dirty (2020-07-06-09:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

swd
Info : J-Trace PRO V1 Cortex-M compiled Jun 9 2020 13:39:24
Info : Hardware version: 1.00
Info : VTarget = 3.160 V
Info : clock speed 1800 kHz
Info : SWD DPIDR 0x6ba02477
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 2331
Info : Listening on port 2331 for gdb connections
Info : Device: STM32H74x/75x
Info : flash size probed value 2048
Info : STM32H7 flash has dual banks
Info : Bank (0) size is 1024 kb, base address is 0x8000000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800ce18 msp: 0x24080000
** Programming Started **
Info : Padding image section 1 at 0x0801fcac with 20 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x0801fcc0 .. 0x0801ffff
** Programming Finished **
shutdown command invoked

Note: You need to connect a ground from the Portenta to the programming header to get rid of noisy ground potential issue.
Also - on the Voltage Sense - it's better to use the +3V1 rail.

Regards,
John

@jwestmoreland jwestmoreland changed the title Add JLink To Portenta Programmers (Note, this is WIP!) Add JLink To Portenta Programmers Jul 29, 2020
@github-actions
Copy link

Memory usage change @ ac6a5f1

Board flash RAM for global variables
arduino-beta:mbed:envie_m4 0 - 0 0 - 0
arduino-beta:mbed:envie_m7 0 - 0 0 - 0
arduino-beta:mbed:nano33ble 0 - 0 0 - 0
Click for full report table
Board libraries/Scheduler/examples/MultipleBlinks
flash
libraries/Scheduler/examples/MultipleBlinks
RAM for global variables
libraries/doom/examples/Doom
flash
libraries/doom/examples/Doom
RAM for global variables
libraries/KernelDebug/examples/KernelDebug
flash
libraries/KernelDebug/examples/KernelDebug
RAM for global variables
libraries/Portenta_SDCARD/examples/TestSDCARD
flash
libraries/Portenta_SDCARD/examples/TestSDCARD
RAM for global variables
libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
flash
libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
RAM for global variables
libraries/Portenta_Video/examples/Envie_video_coreboot
flash
libraries/Portenta_Video/examples/Envie_video_coreboot
RAM for global variables
libraries/Portenta_Audio/examples/PortentaAudioMicPDM
flash
libraries/Portenta_Audio/examples/PortentaAudioMicPDM
RAM for global variables
libraries/ThreadDebug/examples/ThreadDebug
flash
libraries/ThreadDebug/examples/ThreadDebug
RAM for global variables
libraries/USBHOST/examples/KeyboardController
flash
libraries/USBHOST/examples/KeyboardController
RAM for global variables
libraries/USBHOST/examples/Shell
flash
libraries/USBHOST/examples/Shell
RAM for global variables
libraries/PDM/examples/PDMSerialPlotter
flash
libraries/PDM/examples/PDMSerialPlotter
RAM for global variables
arduino-beta:mbed:envie_m4 0 0 0 0 0 0 0 0 0 0 0 0
arduino-beta:mbed:envie_m7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
arduino-beta:mbed:nano33ble 0 0 0 0 0 0
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,libraries/doom/examples/Doom<br>flash,libraries/doom/examples/Doom<br>RAM for global variables,libraries/KernelDebug/examples/KernelDebug<br>flash,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>flash,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>RAM for global variables,libraries/ThreadDebug/examples/ThreadDebug<br>flash,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,libraries/USBHOST/examples/KeyboardController<br>flash,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,libraries/USBHOST/examples/Shell<br>flash,libraries/USBHOST/examples/Shell<br>RAM for global variables,libraries/PDM/examples/PDMSerialPlotter<br>flash,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables
arduino-beta:mbed:envie_m4,0,0,0,0,0,0,0,0,0,0,0,0
arduino-beta:mbed:envie_m7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
arduino-beta:mbed:nano33ble,0,0,,,,,,,,,,,,,0,0,,,,,0,0

@github-actions
Copy link

Memory usage change @ bbab064

Board flash % RAM for global variables %
arduino-beta:mbed:envie_m4 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino-beta:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino-beta:mbed:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board libraries/Scheduler/examples/MultipleBlinks
flash
% libraries/Scheduler/examples/MultipleBlinks
RAM for global variables
% libraries/doom/examples/Doom
flash
% libraries/doom/examples/Doom
RAM for global variables
% libraries/KernelDebug/examples/KernelDebug
flash
% libraries/KernelDebug/examples/KernelDebug
RAM for global variables
% libraries/Portenta_SDCARD/examples/TestSDCARD
flash
% libraries/Portenta_SDCARD/examples/TestSDCARD
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
flash
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
flash
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
RAM for global variables
% libraries/Portenta_Video/examples/Envie_video_coreboot
flash
% libraries/Portenta_Video/examples/Envie_video_coreboot
RAM for global variables
% libraries/Portenta_Audio/examples/PortentaAudioMicPDM
flash
% libraries/Portenta_Audio/examples/PortentaAudioMicPDM
RAM for global variables
% libraries/ThreadDebug/examples/ThreadDebug
flash
% libraries/ThreadDebug/examples/ThreadDebug
RAM for global variables
% libraries/USBHOST/examples/KeyboardController
flash
% libraries/USBHOST/examples/KeyboardController
RAM for global variables
% libraries/USBHOST/examples/Shell
flash
% libraries/USBHOST/examples/Shell
RAM for global variables
% libraries/PDM/examples/PDMSerialPlotter
flash
% libraries/PDM/examples/PDMSerialPlotter
RAM for global variables
%
arduino-beta:mbed:envie_m4 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino-beta:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino-beta:mbed:nano33ble 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>flash,%,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%
arduino-beta:mbed:envie_m4,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino-beta:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino-beta:mbed:nano33ble,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0

@jwestmoreland jwestmoreland changed the title Add JLink To Portenta Programmers Add JLink To Portenta Programmers; Add pinPeripheral() (wiring_private.c - note WIP) Sep 10, 2020
@github-actions
Copy link

Memory usage change @ 8f623f9

Board flash % RAM for global variables %
arduino-beta:mbed:envie_m4 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino-beta:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino-beta:mbed:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board libraries/Scheduler/examples/MultipleBlinks
flash
% libraries/Scheduler/examples/MultipleBlinks
RAM for global variables
% libraries/doom/examples/Doom
flash
% libraries/doom/examples/Doom
RAM for global variables
% libraries/KernelDebug/examples/KernelDebug
flash
% libraries/KernelDebug/examples/KernelDebug
RAM for global variables
% libraries/Portenta_SDCARD/examples/TestSDCARD
flash
% libraries/Portenta_SDCARD/examples/TestSDCARD
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
flash
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
flash
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
RAM for global variables
% libraries/Portenta_Video/examples/Envie_video_coreboot
flash
% libraries/Portenta_Video/examples/Envie_video_coreboot
RAM for global variables
% libraries/Portenta_Audio/examples/PortentaAudioMicPDM
flash
% libraries/Portenta_Audio/examples/PortentaAudioMicPDM
RAM for global variables
% libraries/ThreadDebug/examples/ThreadDebug
flash
% libraries/ThreadDebug/examples/ThreadDebug
RAM for global variables
% libraries/USBHOST/examples/KeyboardController
flash
% libraries/USBHOST/examples/KeyboardController
RAM for global variables
% libraries/USBHOST/examples/Shell
flash
% libraries/USBHOST/examples/Shell
RAM for global variables
% libraries/PDM/examples/PDMSerialPlotter
flash
% libraries/PDM/examples/PDMSerialPlotter
RAM for global variables
%
arduino-beta:mbed:envie_m4 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino-beta:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino-beta:mbed:nano33ble 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>flash,%,libraries/Portenta_Audio/examples/PortentaAudioMicPDM<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%
arduino-beta:mbed:envie_m4,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino-beta:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino-beta:mbed:nano33ble,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0

@github-actions
Copy link

Memory usage change @ 955a927

Board flash % RAM for global variables %
arduino:mbed:envie_m4 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board libraries/Scheduler/examples/MultipleBlinks
flash
% libraries/Scheduler/examples/MultipleBlinks
RAM for global variables
% libraries/doom/examples/Doom
flash
% libraries/doom/examples/Doom
RAM for global variables
% libraries/KernelDebug/examples/KernelDebug
flash
% libraries/KernelDebug/examples/KernelDebug
RAM for global variables
% libraries/Portenta_SDCARD/examples/TestSDCARD
flash
% libraries/Portenta_SDCARD/examples/TestSDCARD
RAM for global variables
% libraries/Portenta_Video/examples/Envie_video_coreboot
flash
% libraries/Portenta_Video/examples/Envie_video_coreboot
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
flash
% libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo
RAM for global variables
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
flash
% libraries/Portenta_System/examples/PortentaH7_updateBootloader
RAM for global variables
% libraries/ThreadDebug/examples/ThreadDebug
flash
% libraries/ThreadDebug/examples/ThreadDebug
RAM for global variables
% libraries/USBHOST/examples/KeyboardController
flash
% libraries/USBHOST/examples/KeyboardController
RAM for global variables
% libraries/USBHOST/examples/Shell
flash
% libraries/USBHOST/examples/Shell
RAM for global variables
% libraries/WiFi/examples/PortentaWiFiFirmwareUpdater
flash
% libraries/WiFi/examples/PortentaWiFiFirmwareUpdater
RAM for global variables
% libraries/PDM/examples/PDMSerialPlotter
flash
% libraries/PDM/examples/PDMSerialPlotter
RAM for global variables
%
arduino:mbed:envie_m4 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed:nano33ble 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>flash,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%
arduino:mbed:envie_m4,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed:nano33ble,0,0.0,0,0.0,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,,,,,,,,,,,,,0,0.0,0,0.0

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

@jwestmoreland
Copy link
Author

Just wanted to leave a comment - I had to do this procedure pretty much exactly the same to get the latest bootloader onto a Portenta M7 I purchased recently:

C:\tmp>C:\Users\john\Arduino\newDontUsearduino\tools\openocd\0.10.0-arduino13\bin/openocd.exe -d2 -s C:\Users\john\Arduino\newDontUsearduino\tools\openocd\0.10.0-arduino13/share/openocd/scripts/ -f interface/jlink.cfg -f target/stm32h7x_dual_bank.cfg -c "telnet_port disabled; init; stm32h7x option_write 0 0x01c 0xb86aaf0; program {C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed_portenta\2.4.1/bootloaders\PORTENTA_H7\portentah7_bootloader_mbed_hs_v2.elf}; reset run; shutdown"
Open On-Chip Debugger 0.10.0+dev-g7c88e76a7-dirty (2020-07-06-09:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

Info : J-Trace PRO V1 Cortex-M compiled Jul 28 2021 10:11:34
Info : Hardware version: 1.00
Info : VTarget = 3.310 V
Info : clock speed 1800 kHz
Info : SWD DPIDR 0x6ba02477
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Error: stm32h7x.cpu0 -- clearing lockup after double fault
Polling target stm32h7x.cpu0 failed, trying to reexamine
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : Device: STM32H74x/75x
Info : flash size probed value 2048
Info : STM32H7 flash has dual banks
Info : Bank (0) size is 1024 kb, base address is 0x8000000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Info : Padding image section 1 at 0x0801f434 with 12 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x0801f440 .. 0x0801ffff
** Programming Finished **
shutdown command invoked

This time I externally attached +3.3V to pin 12 of the Arduino compatible header (with the appropriate current limiting). I thought this would fix this problem I'm seeing:
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-size" -A "c:\AppData\Local\Temp\arduino-sketch-6EFED80D88D1E44137637EB2B6BCDEA3/sketch_july8a.ino.elf"
Sketch uses 144192 bytes (18%) of program storage space. Maximum is 786432 bytes.
Global variables use 141432 bytes (27%) of dynamic memory, leaving 382192 bytes for local variables. Maximum is 523624 bytes.


Compilation complete.
Performing 1200-bps touch reset on serial port COM4
Waiting for upload port...
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.10.0-arduino1/dfu-util" --device 0x2341:0x035b -D "c:\AppData\Local\Temp\arduino-sketch-6EFED80D88D1E44137637EB2B6BCDEA3/sketch_july8a.ino.bin" -a0 --dfuse-address=0x08040000:leave
dfu-util 0.10-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
No DFU capable USB device available
Upload error: Error: 2 UNKNOWN: uploading error: uploading error: exit status 74

Also - I was wondering - why is only the 3V1 rail active when the OLoD (Orange LED of DOOM) is on? Why isn't also the 3.3V rail active? You can't use the JTAG/SWD adapter without it.

Thanks,
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants