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

call to do_sdm on 2560 should use EIND #12

Closed
JAndrassy opened this issue Jan 2, 2019 · 1 comment
Closed

call to do_sdm on 2560 should use EIND #12

JAndrassy opened this issue Jan 2, 2019 · 1 comment

Comments

@JAndrassy
Copy link

bootloader on 2560 starts at word address 0x1FE00. the compiler doesn't set EIND, so call to do_spm at atmega 2560, jumps to word address 0xFE01 where FFFF is in empty flash. FFFF is executed as skip one word if bit set. it is set, so it executes every other FFFF in the rest of the flash until bootloader where it hits the rjmp to do_sdm. it 'works' unless something is written in the flash above word address 0xFE01.

https://www.avrfreaks.net/forum/eicall-app-bootloader-atmega-2560-jumps-address-0x1fe01-without-eind-set

@majekw
Copy link
Owner

majekw commented Jan 6, 2019

Good catch!
Can you do pull-request with fix? Best place would be to original Optiboot repo as most features of my fork are already merged there. (https://github.com/Optiboot/optiboot/blob/master/optiboot/examples/test_dospm/optiboot.h)

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

2 participants