Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Flashing using dfu-util reports invalid status #2

Closed
vshymanskyy opened this issue Jul 5, 2023 · 3 comments
Closed

Flashing using dfu-util reports invalid status #2

vshymanskyy opened this issue Jul 5, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@vshymanskyy
Copy link

Download        [====================     ]  80%        40320 bytes
Download        [=====================    ]  84%        42368 bytes
Download        [======================   ]  88%        44352 bytes
Download        [=======================  ]  92%        46400 bytes
Download        [======================== ]  96%        48384 bytes
Download        [=========================] 100%        50316 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
*** [upload] Error 251
========================== [FAILED] Took 12.62 seconds ==========================

Environment    Status    Duration
-------------  --------  ------------
portentaC33    FAILED    00:00:12.620

Clearly, the device was flashed correctly.
@maxgerhardt The reason for this is the dfu-util -R flag, which for some reason exits with code 251.

@maxgerhardt
Copy link
Owner

maxgerhardt commented Jul 5, 2023

I thought I could get away with PlatformIO's built-in dfu-util version and -R instead of the original Arduino IDE one with -Q, but apparently this doesn't work on all systems or with the Portenta C33. Magically it works fine on my Windows 10+ Uno R4 Minima board.

Download        [======================   ]  90%        30528 bytes
Download        [=======================  ]  92%        31040 bytes
Download        [======================== ]  96%        32384 bytes
Download        [=========================] 100%        33640 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Delaying 2s for USB serial enumeration...
======= [SUCCESS] Took 17.28 seconds =======

I'll switch the platform to use the same dfu-util version and use -Q shortly.

@maxgerhardt
Copy link
Owner

maxgerhardt commented Jul 5, 2023

I've pushed d4bd5d2 (and 8c4f72f, woops) to fix this. It behaves the same still on Windows for me.

Can you open a PlatformIO core CLI -> pio pkg update -g -p renesas and then try uploading to the Portenta C33 again? Does it work this time?

@maxgerhardt maxgerhardt self-assigned this Jul 5, 2023
@maxgerhardt maxgerhardt added the bug Something isn't working label Jul 5, 2023
@vshymanskyy
Copy link
Author

Environment    Status    Duration
-------------  --------  ------------
portentaC33    SUCCESS   00:00:14.826

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants