platform-ststm32: PortentaH7 upload issue *** [upload] Error 74
Hello, i have an PortentaH7-board conntected via USB to a windows 10 computer. If i upload the example project to the M7-core in the arduino IDE it works. In VScode with PlatformIO i get the following error message. (see below) Are there already solutions, I know that the PortentaH7 was just added.
> Executing task in folder Test_PortentaH7_M7core: C:\Users\jh\.platformio\penv\Scripts\platformio.exe run --target upload <
Processing portenta_h7_m7 (platform: ststm32; board: portenta_h7_m7; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/portenta_h7_m7.html
PLATFORM: ST STM32 (12.1.0) > Arduino Portenta H7 (M7 core)
HARDWARE: STM32H747XIH6 480MHz, 511.35KB RAM, 768KB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduino-mbed 1.3.2
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.200630 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <WiFi> 1.0
Building in release mode
Checking size .pio\build\portenta_h7_m7\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 12.8% (used 66984 bytes from 523624 bytes)
Flash: [=== ] 34.5% (used 271256 bytes from 786432 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, dfu, jlink, mbed, stlink
CURRENT: upload_protocol = dfu
Looking for upload port...
Auto-detected: COM4
Uploading .pio\build\portenta_h7_m7\firmware.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 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/
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 74
================================================================================================= [FAILED] Took 1.27 seconds =================================================================================================The terminal process "C:\Users\jh\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
Just for reference ArduinoIDE output: (Also some DFU problems, already read that its maybe about permissions but the upload works just fine anyways)
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 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...
ID 2341:035b
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08040000, size = 132976
Download [=========================] 100% 132976 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Cannot open DFU device 2341:035b
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- Fix upload process for Portenta board // Issue #511 — committed to platformio/platform-ststm32 by valeros 3 years ago
- Fix upload process for Portenta board // Issue #511 — committed to gudnimg/platform-ststm32 by valeros 3 years ago
@datacode-taavi Thanks for the hints. Please pull the latest revision and try to upload again.
Now it works!
Thank you.
Unfortunately, no luck with dev branch (same result).
However, it seems that the issue is caused by the ā-dā argument being sent to dfu-util.
I tried removing the other hwids from boards/portenta_h7_m7.json and now I can upload using pio but only if I manually set the device to bootloader mode. It still fails to do it by itself.
If i retry the same command again, it will fail because the device is no longer in bootloader.
*With corrected username for his Windows account and path info for firmware etc š.