Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Enumerate #5

Open
LittleFox94 opened this issue Jan 19, 2014 · 4 comments
Open

Unable to Enumerate #5

LittleFox94 opened this issue Jan 19, 2014 · 4 comments

Comments

@LittleFox94
Copy link

Hello,

when trying to use the bootloader in this project I ran into a problem with a self-compiled binary.
The µC does not show up in lsusb and dmesg gives me the following:

[ 8276.726102] usb 2-4: new full-speed USB device number 43 using ohci-pci
[ 8277.134380] usb 2-4: device not accepting address 43, error -62
[ 8277.134413] hub 2-0:1.0: unable to enumerate USB device on port 4

I'm using the AVR8 Toolchain from Atmel with avr-gcc version (AVR_8_bit_GNU_Toolchain_3.4.3_1072) 4.8.1

It works using your given binary, but I have to change the I/O-Pins.

Greetings,
LittleFox94

@kevinmehall
Copy link
Member

I can reproduce this issue on AVR_8_bit_GNU_Toolchain_3.4.3_1072 for Linux. The switch statement in USB_HandleSetup seems to get miscompiled such that none of the branches run and the function does not return. Fedora's gcc-avr 4.8.2-1.fc19 and Atmel's 3.4.2 toolchain are known to work.

@Thalhammer
Copy link

I have the same problem.
Using your prebuilt hex it works fine, but it was unable to create a working build on my own.
I tried the official atmel toolchain version 3.4.4.1229 and it build just fine, but fails to enumerate the device.
Where can i find a compiler that creates a working build ?

Greetings,
Thalhammer

//EDIT:
Got it working using the toolchain in your PPA at https://launchpad.net/~nonolith/+archive/ubuntu/avr-toolchain/+packages
But it would be cool if you could provide it for trusty too.

@ahtn
Copy link

ahtn commented Nov 7, 2016

Setting the compiler flag -fno-jump-tables fixed this for me. #8

@LittleFox94
Copy link
Author

another note, not sure if it is the original issue but I stumbled upon it recently (using another usb stack, but same principles):

reading from program space is very tricky when in bootloader on xmegas with more than 64KiB memory - it just not works. So if anyone has that problem in a bootloader, your MCU might have too much flash storage 🙃

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

No branches or pull requests

4 participants