Hi,
I have Nicla Sense ME and Portenta H7 Lite Connected. I am trying to upload simple blink example. Blink example for Portenta H7:
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED off after being turned on by pinMode()
}
void loop() {
digitalWrite(LED_BUILTIN, LOW); // turn the LED on (LOW is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage HIGH
delay(1000); // wait for a second
}
Verbose of Portenta upload:
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/portenta_h7_m4.html
PLATFORM: ST STM32 (16.0.0) > Arduino Portenta H7 (M4 core)
HARDWARE: STM32H747XIH6 480MHz, 287.35KB RAM, 1MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduino-mbed @ 4.0.2
- tool-dfuutil @ 1.11.0
- tool-openocd @ 3.1200.0 (12.0)
- tool-stm32duino @ 1.0.1
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 42 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio/build/portenta_h7_m4/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 14.5% (used 42808 bytes from 294248 bytes)
Flash: [= ] 6.7% (used 69752 bytes from 1048576 bytes)
.pio/build/portenta_h7_m4/firmware.elf :
section size addr
.text 65304 135266304
.ARM.extab 160 135331608
.ARM.exidx 376 135331768
.data 4072 268436120
.uninitialized 0 268440192
.bss 38736 268440192
.openamp_section 0 939524096
.pdm_section 64512 939524096
.heap 250416 268478928
.ARM.attributes 46 0
.comment 247 0
.debug_frame 6460 0
.stab 60 0
.stabstr 118 0
Total 430507
<lambda>(["upload"], [".pio/build/portenta_h7_m4/firmware.bin"])
AVAILABLE: cmsis-dap, dfu, jlink, mbed, stlink
CURRENT: upload_protocol = dfu
BeforeUpload(["upload"], [".pio/build/portenta_h7_m4/firmware.bin"])
Using manually specified: /dev/ttyACM1
Forcing reset using 1200bps open/close on port /dev/ttyACM1
Waiting for the new upload port...
"/home/hako/.platformio/packages/tool-dfuutil/bin/dfu-util" -d 0x2341:0x035b -a 0 -s 0x08100000:leave -D "/home/hako/Documents/PlatformIO/Projects/portenta_v1/.pio/build/portenta_h7_m4/firmware.bin"
dfu-util 0.11
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/
Opening DFU capable USB device...
Device ID 2341:035b
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08100000, size = 69912
Erase [ ] 0% 0 bytes
Erase [ ] 0% 0 bytes
Erase [= ] 5% 4096 bytes
Erase [== ] 11% 8192 bytes
Erase [==== ] 17% 12288 bytes
Erase [===== ] 23% 16384 bytes
Erase [======= ] 29% 20480 bytes
Erase [======== ] 35% 24576 bytes
Erase [========== ] 41% 28672 bytes
Erase [=========== ] 46% 32768 bytes
Erase [============= ] 52% 36864 bytes
Erase [============== ] 58% 40960 bytes
Erase [================ ] 64% 45056 bytes
Erase [================= ] 70% 49152 bytes
Erase [=================== ] 76% 53248 bytes
Erase [==================== ] 82% 57344 bytes
Erase [===================== ] 87% 61440 bytes
Erase [======================= ] 93% 65536 bytes
Erase [======================== ] 99% 69632 bytes
Erase [=========================] 100% 69912 bytes
Erase done.
Download [ ] 0% 0 bytes
Download [= ] 5% 4096 bytes
Download [== ] 11% 8192 bytes
Download [==== ] 17% 12288 bytes
Download [===== ] 23% 16384 bytes
Download [======= ] 29% 20480 bytes
Download [======== ] 35% 24576 bytes
Download [========== ] 41% 28672 bytes
Download [=========== ] 46% 32768 bytes
Download [============= ] 52% 36864 bytes
Download [============== ] 58% 40960 bytes
Download [================ ] 64% 45056 bytes
Download [================= ] 70% 49152 bytes
Download [=================== ] 76% 53248 bytes
Download [==================== ] 82% 57344 bytes
Download [===================== ] 87% 61440 bytes
Download [======================= ] 93% 65536 bytes
Download [======================== ] 99% 69632 bytes
Download [=========================] 100% 69912 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state
Platform.ini:
[env:portenta_h7_m4]
platform = ststm32
board = portenta_h7_m4
framework = arduino
If I use Arduino IDE all works fine. Same issue happens for Nicla Sense ME as well. How can i debug this further? Many thanks.