Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

USB fixes#96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
facchinm wants to merge2 commits intoarduino:arduino
base:arduino
Choose a base branch
Loading
fromfacchinm:usb_next_fixes
Open

Conversation

facchinm
Copy link
Member

Fixes 1200bps touch on USB NEXT and optimizes the upload procedure (no wait_for_serial, replaced by-w indfu-util on supported boards)

@facchinmfacchinm requested a review fromCopilotApril 3, 2025 10:44
Copilot

This comment was marked as off-topic.

@KurtE
Copy link

Quick update: I checked out this PR:

git fetch upstream pull/96/head:pr96git checkout pr96./extra/build_all.sh

I then turned on C33, double clicked, burned bootloader, double clicked and then upload. I was then able to
upload again without having to double click...

However, there may be a problem with the other boards. That is the upload appeared to hang, waiting for me to
double click them. I think it might have gone through then on GIGA.

Although with this one giga I still then have to go to monitor window and type sketch. As mentioned before this
one acts like it is stuck in debug mode...

On Portenta H7, It also appeared to hang. A couple minutes later I double clicked. and
Not sure what happened this time, it then went through the erase, and stared showing the downloading which failed
at 0 bytes

dfu-util: Error during special command "SET_ADDRESS" get_status.

I double clicked again, then did another download this one went through.
But, If I then try to download again, I get back to it does the erase, and then dies with that error. It is still
left in the green led blink like it is in bootloader mode

But if I try to download again without double clicking, I get different error at the Erase phase 0 bytes:

dfu-util: dfuse_download: libusb_control_transfer returned -9 (LIBUSB_ERROR_PIPE)Failed uploading: uploading error: exit status 74

Note I am running this on my Ubuntu 24.04 machine.

@facchinm
Copy link
MemberAuthor

There's a peculiarity in IDE 2, it caches the recipes ofboards.txt until the next run, so in case you checked out the branch without restarting the IDE it could be somehow confused.
Once the first sketch has been flashed, all subsequent runs should just automatically restart the boards in bootloader mode and then launch dfu-util.
If it still doesn't work, could you attach the verbose output of the uploading phase? Thanks a lot!

@KurtE
Copy link

KurtE commentedApr 4, 2025
edited
Loading

There's a peculiarity in IDE 2, it caches the recipes ofboards.txt until the next run, so in case you checked out the branch without restarting the IDE it could be somehow confused.

Thanks, I was pretty sure I did that, but just in case, I switched back to the pr branch, did a build_all.sh
I started up Arduino IDE, I then selected the C33 board, I also did the tools -> Reload Board Data command
And was able to reload blink a few times on C33... (changed how many blinks...)

Then switched to H7 board. burned bootloader, I was able to tell it to download blink, which worked,
tried again, with simple sketch to print loop numbers:

void setup() {  Serial.begin(115200);  while (!Serial && millis() < 5000) {}}int loop_count;void loop() {  Serial.println(++loop_count);  delay(1000);}

Tried download and errored like yesterday:

erforming 1200-bps touch reset on serial port /dev/ttyACM0Cannot perform port reset: 1200-bps touch: setting DTR to OFF: protocol error"/home/kurte/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util" --device ,0x2341:0x035b -D "/home/kurte/.cache/arduino/sketches/485206BD23BC4770D4F540DE09ED0451/sketch_apr4a.ino.elf-zsk.bin" -a0 --dfuse-address=0x080E0000:leave -wdfu-util 0.11-arduino4Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.Copyright 2010-2021 Tormod Volden and Stefan SchmidtThis program is Free Software and has ABSOLUTELY NO WARRANTYPlease report bugs to http://sourceforge.net/p/dfu-util/tickets/Waiting for device, exit with ctrl-Cdfu-util: Cannot open DFU device 2341:035b found on devnum 31 (LIBUSB_ERROR_ACCESS)Opening DFU capable USB device...Device ID 2341:035bDevice DFU version 011aClaiming USB DFU Interface...Setting Alternate Interface #0 ...Determining device status...DFU state(2) = dfuIDLE, status(0) = No error condition is presentDFU mode device DFU version 011aDevice returned transfer size 4096DfuSe interface name: "Internal Flash   "Downloading element to address = 0x080e0000, size = 8764Erase   [                         ]   0%            0 bytesErase   [                         ]   0%            0 bytesErase   [===========              ]  46%         4096 bytesErase   [=======================  ]  93%         8192 bytesErase   [=========================] 100%         8764 bytesErase    done.Download[                         ]   0%            0 bytesdfu-util: Error during special command "SET_ADDRESS" get_statusFailed uploading: uploading error: exit status 74

It left the H7 Lite's led in what looks like bootloader mode, so if I try again to download:
This time it went through... Tried another time and same error as above.
Next time worked.

Next errored...

Have not tried GIGA yet, but suspect similar
Edit: GIGA similar to yesterday... Without double click it waits forever or at least several minutes now.
And when working I still have to enter sketch in monitor window...
image

I should probably try the other GIGA that does not always require debug window setup... Or better yet wish there was a way to tell this one, to stop...

@KurtE
Copy link

EDIT2:
I closed all other sketch windows, and this time the GIGA went through... Although still have to type
sketch...

Retried H7, with only that window, same issue:
This time when I tried again, without double clicking...

Sketch uses 2132 bytes (0%) of program storage space. Maximum is 786432 bytes.Global variables use 960 bytes (0%) of dynamic memory, leaving 522664 bytes for local variables. Maximum is 523624 bytes.Performing 1200-bps touch reset on serial port /dev/ttyACM0Cannot perform port reset: 1200-bps touch: setting DTR to OFF: broken pipe"/home/kurte/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util" --device ,0x2341:0x035b -D "/home/kurte/.cache/arduino/sketches/485206BD23BC4770D4F540DE09ED0451/sketch_apr4a.ino.elf-zsk.bin" -a0 --dfuse-address=0x080E0000:leave -wdfu-util 0.11-arduino4Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.Copyright 2010-2021 Tormod Volden and Stefan SchmidtThis program is Free Software and has ABSOLUTELY NO WARRANTYPlease report bugs to http://sourceforge.net/p/dfu-util/tickets/Waiting for device, exit with ctrl-COpening DFU capable USB device...Device ID 2341:035bDevice DFU version 011aClaiming USB DFU Interface...Setting Alternate Interface #0 ...Determining device status...dfu-util: error get_status: LIBUSB_ERROR_PIPEFailed uploading: uploading error: exit status 74

@pillo79pillo79force-pushed thearduino branch 2 times, most recently fromddc3b53 tob7eb974CompareApril 9, 2025 15:17
@mjs513
Copy link

@pillo79 =@facchinm

Should we be updating the core manually to incorporate this PR?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@facchinm@KurtE@mjs513

[8]ページ先頭

©2009-2025 Movatter.jp