Skip to content

Update usb.c#3

Open
cctsao1008 wants to merge 1 commit into
kcuzner:masterfrom
cctsao1008:patch-1
Open

Update usb.c#3
cctsao1008 wants to merge 1 commit into
kcuzner:masterfrom
cctsao1008:patch-1

Conversation

@cctsao1008

@cctsao1008 cctsao1008 commented Dec 25, 2022

Copy link
Copy Markdown

Hello Kevin :

If we try to optimize the code the USB will not be recognized, except -O0.

I find that we need to keep the usb_handle_endp0 function in usb.c to O0 to avoid it being optimized and then we can optimize the others.

BR CCTSAO

If we try to optimize the code the USB will not be recognized, except -O0.

I find that we need to keep the usb_handle_endp0 function in usb.c to O0 to avoid being optimized and then we can optimize the others.

BR CCTSAO
@kcuzner

kcuzner commented Dec 29, 2022

Copy link
Copy Markdown
Owner

This should have compiled just fine and did work for me when I last compiled it several years ago. It's possible that you have exposed a bug in arm-none-eabi-gcc when using -Os. This isn't unheard of, especially given that -Os is pretty aggressive. Which version of arm-none-eabi-gcc are you using?

Also, I'm curious: Did you actually construct the watch hardware? I wasn't aware of any interest in this project. I should let you know that after a while, the USB port actually ended up de-laminating off the board I had. If you're forking the project, I'd strongly suggesting rethinking the USB port, either changing it to be a version with through-hole mounting, changing the board to use VIPPO and putting some vias in the anchoring pads to provide structural support, or eliminating USB entirely and designing in some kind of wireless charging.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants