-
Notifications
You must be signed in to change notification settings - Fork 325
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
CDC BootLoader not Leonardo Compatible #42
Comments
That looks like the bootloader isn't responding to any commands from the host -- are you sure the programmer is using the correct virtual COM port number? |
I think the problem is that the Arduino Software uses a special Bootkey on a specific address: They write this key inside the sketch, do a watchdog reset and then the bootloader knows that it should execute the bootloader code and not start the application. Because both read the same memory location. I am also developing a CDC BootLoader and i am wondering why they used exactly this address. I am programming a 16u2 and a 32u2 and dont know what ram address is the best for this bootloader. Mabe the last, but how can i find the last one. I read some stuff about the stack etc. I somehow has to pass the information to the bootloader so i cannot simply use your no init trick. Any suggestions? |
To add leonardo compatibility you definitely have to set the bootloader key to exactly 0x0800. Its not perfect, it would be better to define the specific address as reserved but therefore you need compiler flags and the arduino ide wont take these flags. I also filed a bug there too. |
Hrm, I guess they have their reasons. I can fix the address of the boot key by placing it into its own section and forcing the start address of the section to 0x800, but they also use their own different key value. I suppose I can either make my version accept either, or have a compile time option to change the key to match the Caterina bootloader. |
yeah, the fixed section sounds good. the only reason why i didnt use it was that the hex converter from nick gammon for the atmega board programm couldnt convert my hex file then. Passing the magic bootkey in the makefile would be nice. and an option for the address and maybe size (8 or 16 bit) as well, if possible. |
https://github.com/abcminiuser/lufa/blob/master/Bootloaders/CDC/BootloaderCDC.c#L64 This way the application can restart the program and run the bootloader. |
I tried to compile the latest CDC BootLoader for my Pro Micro(well not a leo but a 32u4) and it turn out that i cannot reupload sketches to the board. The Arduino software tries to touch the Serial at 1200 and tries to reupload the Code. But its not working:
With the older Pro Micro source (recompiled with the older Lufa) its working fine.
I am trying to figure out why this happens.
I also have a similar problem with my HoodLoader2 project. After a serial touch the leds start flickering, usb is detached but no sketch and no bootloader starts. Just the leds are flickering. I am wondering if i set the Watchdog timer wrong in my source.
Any Idea?
The text was updated successfully, but these errors were encountered: