-
Notifications
You must be signed in to change notification settings - Fork 145
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
[bug #43577] Extended address not sent with avr109 #360
Comments
Joerg Wunsch <joerg_wunsch> The "extended address" is not part of the original AVR109 bug #29896 has already been filed to request adding this |
Arne Rossius AFAICS, bug #29896 calls for additional memory types, while this bug is about accessing the area above 128 KiB of the regular flash memory (not bootloader area which is above 256 KiB for xmega256a3), so IMHO it's not a duplicate. There is already a function in butterfly.c to send the 'H' command (butterfly_set_extaddr()), but it seems that the old butterfly_set_addr() is called instead. Surely this can't be right? |
Joerg Wunsch <joerg_wunsch> OK, sorry, then I misunderstood it. Reopening it, so I can |
Hopefully #454 patch can fix this issue. |
The test results in #454 show that no issues with ATmega2560 with xboot. But that is based on ATmega2560 with xboot, not ATxmega256a3. Need to get some one to help testing here as I do not have ATxmega256a3. Hopefully Hans can get a hold of the board soon. |
https://savannah.nongnu.org/bugs/?29896 is now #200, which is an enhancement request. The issue here in #360 (or #454) is different. By right, avrdude already supports ATmega256x long ago with the following commit on 30-Jan-2007. This issue here is saying that it somehow does not work with ATxmega2560A3. This needs to be confirmed. So I will change the label. |
I compiled xboot for ATxmega256A3BU, and I'm able to communicate with Avrdude using the bootloader:
I can also read from flash:
However, I'm not able to write:
|
It turns out that I forgot to add the
|
@mcuee I can confirm that there's an issue writing to addresses above 128kiB.
|
Arne Rossius arossius@ias.rwth-aachen.de
Tue 11 Nov 2014 02:14:43 PM UTC
When programming the ATxmega256a3 with avrdude 6.1 (windows version), the extended address is not sent when jumping across a 128 KiB boundary. I have created a text hexfile which only contains data for flash pages 0 (word address 0x00000) and 511 (word address 0x1FF00). However as can be seen from the attached log, after programming the first page only a 16-bit address command ('A') is sent instead of the 24-bit address command ('H'), resulting in an address of 0x0FF00 instead of 0x1FF00. Verify doesn't fail because the same happens when reading, but does fail when programming an actual application (without a gap) larger than 128 KiB.
The programmer is the "xboot" bootloader <https://github.com/alexforencich/xboot/wiki>. The avrdude.conf is unchanged.
Programming the attached hex file does work with the older avrdude 5.11 because this version programs pages 1 to 510 with 0xFF, only sending the address once before the first page and then relying on the bootloader's auto-increment to reach the high addresses. As can be expected, it takes a very long time though.
Also, as can be seen from the xboot source, it resets the extended address byte to zero when receiving an 'A' command. I'm not sure if this behaviour is correct, but if it is, this means that avrdude must send an 'H' command for all flash pages above 128 KiB (unless no address is sent at all between adjacent pages).
file #32418: napftest.hex
file #32419: avrdude-error.txt
This issue was migrated from https://savannah.nongnu.org/bugs/?43577
The text was updated successfully, but these errors were encountered: