-
Notifications
You must be signed in to change notification settings - Fork 72
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
API not responding #19
Comments
No idea. Are you building your code with the xboot makefile? Have you read out the chip after writing the bootloader to make sure it was written to the proper location? Can you print out the jump table offset and confirm that the jump table is sitting at that location after programming? |
Thank you for your quick response
*After Programming the Xboot.hex, i checked if its sits in the proper location. *Jump table? can u explain what exactly the jump table is? |
Also after programming Xboot.hex, i m able to program my application code only once, second tie its giving verification error When i call |
Loaded the xboot.hex file to xmega32a4u and boot file starts from the location 0x8000 None of the API are working. |
Are you sure you're compiling both your application and xboot for the atmega32a4u? There is an important difference between the two wrt. the size of the interrupt vector table. If this setting disagrees, then the API code will attempt to load the jump table from the wrong offset. |
It looks like this is exactly the problem. iox32a4.h has the following:
while iox32a4u.h has:
The jump table is located at the end of the .vectors section in api.c:
The location of the table in xbootapi.c is determined like so:
If the size of the vector table does not agree in both your user code and in xboot, then the API wrappers in xbootapi.c will not find the jump table. Each of the 0C94xxxx in your hex dump corresponds to a jump instruction in the vector table. I count 94 of them. The 58426A after the last one is the 'magic number' 'XBj' that the API wrapper in xbootapi.c uses to detect the jump table. This indicates that xboot was compiled for the atxmega32a4 (non-u). My guess is that your application was compiled for the atmega32a4u and hence has a different value for _VECTORS_SIZE that makes it look in the wrong spot for the table. Try compiling xboot for the correct device and try again. |
ho, thank you alex for your valueable display. Yes, just checked the code and as you said, in boot code i selected 32a4 and in my app 32a4u. . xboot.c:1: error: MCU 'atxmega32a4u' supported for assembler only |
That's very strange. What version of avr-gcc are you using? I can compile for the x32a4u just fine on my machine. I am running avr-gcc 4.8.1, avr-binutils 2.24, and avr-libc 1.8.0. |
I am running avr-gcc 4.3.3, avr-binutils 2.19, and avr-libc 1.6.7. |
Well, you may need to update that if you're having trouble compiling it. However, I fail to see why your program would build successfully for the x32a4u when xboot has issues, even though you're using the same make file. That is very strange. |
thank you, i will update my AVR and will check my code again. |
Hi there,
I gone through the link and downloaded the code.
Im using Xmega32a4u board , Avr studio 4.18
Created Xboot.h hex file( enable UART and A LED for communication, Enable the API)
Programmed the Xboot.hex file and i can see the LED blinking and also UART responds with Xboot++ when i send 'S' through UART.
My problem is whenever i call Any API (get version) from my application code, its restarting
am i doing anything wrong?
The text was updated successfully, but these errors were encountered: