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

Fix avr109 extended address #1101

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

MCUdude
Copy link
Collaborator

@MCUdude MCUdude commented Sep 24, 2022

Fix pulled from issue #454. Makes it possible to write to flash addresses above the 128kiB mark.

Resolves issue #360 and issue #454.

Without this PR:

$ ./avrdude -cavr109 -p atxmega256a3bu -b 115200 -P /dev/cu.usbserial-1410 -e -Uflash:w:../../avrdude-terminal/src/0x55_256kib.hex:i

Connecting to programmer: .
Found programmer: Id = "XBoot++"; type = S
    Software Version = 1.7; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=512 bytes.

Programmer supports the following devices:
    Device code: 0x7b

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9843 (probably x256a3bu)
avrdude: erasing chip
avrdude: reading input file ../../avrdude-terminal/src/0x55_256kib.hex for flash
avrdude: writing 262143 bytes flash ...

Writing | ################################################## | 100% 31.81s

avrdude: 262143 bytes of flash written
avrdude: verifying flash memory against ../../avrdude-terminal/src/0x55_256kib.hex

Reading | ################################################## | 100% 25.64s

avrdude: verification error, first mismatch at byte 0x1ffff
         0xff != 0x55
avrdude: verification error; content mismatch

avrdude done.  Thank you.

With this PR:

$ ./avrdude -cavr109 -p atxmega256a3bu -b 115200 -P /dev/cu.usbserial-1410 -e -Uflash:w:../../avrdude-terminal/src/0x55_256kib.hex:i

Connecting to programmer: .
Found programmer: Id = "XBoot++"; type = S
    Software Version = 1.7; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=512 bytes.

Programmer supports the following devices:
    Device code: 0x7b

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9843 (probably x256a3bu)
avrdude: erasing chip
avrdude: reading input file ../../avrdude-terminal/src/0x55_256kib.hex for flash
avrdude: writing 262143 bytes flash ...

Writing | ################################################## | 100% 31.83s

avrdude: 262143 bytes of flash written
avrdude: verifying flash memory against ../../avrdude-terminal/src/0x55_256kib.hex

Reading | ################################################## | 100% 25.68s

avrdude: 262143 bytes of flash verified

avrdude done.  Thank you.

@mcuee mcuee added the bug Something isn't working label Sep 25, 2022
@mcuee
Copy link
Collaborator

mcuee commented Sep 25, 2022

@stefanrueger

Probably you can take a look at this one. Thanks.

@stefanrueger
Copy link
Collaborator

Looks good! The code makes sense and it has been proven correct through testing.

@mcuee
Copy link
Collaborator

mcuee commented Oct 1, 2022

Great. Then this can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants