ArduinoCore-mbed icon indicating copy to clipboard operation
ArduinoCore-mbed copied to clipboard

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

Open jwestmoreland opened this issue 5 years ago • 8 comments

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 https://github.com/arduino/ArduinoCore-mbed/commit/664f83a633bf462be164f79c20ba502959f37952 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

jwestmoreland avatar Jul 25 '20 23:07 jwestmoreland

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

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

jwestmoreland avatar Jul 26 '20 08:07 jwestmoreland

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 avatar Jul 26 '20 11:07 jwestmoreland

Memory usage change @ ac6a5f104e4c203d681126a35324f9d5a944b435

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[bot] avatar Jul 29 '20 11:07 github-actions[bot]

Memory usage change @ bbab0643a4665a97767849d758ce59f30e2b640e

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[bot] avatar Sep 10 '20 11:09 github-actions[bot]

Memory usage change @ 8f623f9148b228e0912b36f2b7c6ec8e1f02aa86

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[bot] avatar Sep 10 '20 13:09 github-actions[bot]

Memory usage change @ 955a927fd3f71fe455acbed38645fc1ec634c9b8

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

github-actions[bot] avatar Oct 23 '20 14:10 github-actions[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 09 '21 16:04 CLAassistant

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

jwestmoreland avatar Sep 17 '21 07:09 jwestmoreland