Open sigurd4 opened 1 year ago
@sigurd4 I'm also getting this. Did you find a solution?
@MarcelRobitaille No. A temporary (non-ideal) solution is to lint and write the code in VSCode, and flash the device with Arduino IDE. If you use the newest version of Arduino IDE it's possible to make your workspace compatible with both IDE's, by adding an .ino file in the project folder with #include "main.hpp" and add a header file for main.cpp with setup and loop functions visible.
I've had success pressing the reset button a single time before flashing instead of 2.
Using manually specified: /dev/ttyACM0
Weird -- wouldn't DFU use a USB device, not a serial port? What happens when you delete the upload_port = ..
section of your platformio.ini
?
I don't have any upload_port
in my platformio.ini
and I'm still getting this.
Configuring upload protocol...
AVAILABLE: cmsis-dap, dfu, jlink, mbed, stlink
CURRENT: upload_protocol = dfu
Looking for upload port...
Auto-detected: /dev/ttyACM0
Ah yes, it tries to find a serial port so that it can reset the board into bootloader mode using a 1200 baud open serial port procedure.
Do you get any new messages on sudo dmesg
after after the broken pipe error?
@maxgerhardt I no longer have access to the Portenta H7 in question, because the project i was on is now over. Good luck
Same thing here. One day I double click into blinking green light bootloader mode and flash and it gives broken pipe. Had to flash it in the Arduino IDE after the SOS went off.
I've setup a Platform.io workspace for use with Arduino Portenta H7 in VSCode. I am running Ubuntu-20.04 on WSL2 for Windows 10 using usbip for attaching the usb-port to WSL.
Compilation works fine.
When i upload i get the following:
This is my
platformio.ini
file:If i upload using Arduino IDE it works, both from Windows and WSL2 Ubuntu. I have updated the bootloader of the microcontroller by following these steps: https://support.arduino.cc/hc/en-us/articles/4404067649554-Update-the-bootloader-on-Portenta-H7-boards. When uploading it's set to bootloader-mode, with the green LED blinking.
This deleted post on stackoverflow appears to describe the same problem: https://web.archive.org/web/20220602165523/https://stackoverflow.com/questions/72362799/broken-pipe-error-when-uploading-to-arduino-portenta-h7-with-platformio-on-lin
My code (single file
main.cpp
):Running ´pio run --target upload --environment portenta_h7 --upload-port /dev/ttyACM0 --verbose´ in PlatformIO CLI
How come this doesn't work?