ethersex ATMega2561 Port

Hey,

i finally got the bootloader ethersex working on our ATMega2561 board.

The problem was that it worked fine on our ATMega128 board, but the same software didn’t work on the ATMega2561 board. The problem was that the bootloader downloaded the firmware via tftp from a server but then didn’t start the loaded firmware, but seemed to reboot and download it again, and again, and again…

The problem was that it wasn’t able to jump to the application at address 0. Why is that? A look at the generated assembler code showed that the ATMega2561 uses EICALL, instead of ICALL (which is for chips with PC of 22 Bits). EICALL uses the Z-Register plus (!!!) the EIND byte to store the jump address (which is 0 in our case). So i just added „EIND=0;“ before the jump to our application (which is at address 0) and now everything works just fine :D.

Hopefully this helps many other developers who try to get ethersex working on ATMega2561 /ATMega2560 / ATMega1280 / ATMega1281.

Gr33tz Goddchen

Ein Gedanke zu „ethersex ATMega2561 Port

Kommentar verfassen