From: Matthias T. <mt...@we...> - 2011-07-26 17:40:45
|
Hi Paolo, > I'm trying to build amforth for an ATmega128. A rather old controller. Are you sure that its not a more modern one? I vaguly remember reading about troubles with some Atmega103 compatability fuses as well (not related with amforth on avrfreaks.net). > It won't compile, searching for a definition of MCUSR. Some googling told me (AVR Note AVR097: Migration between ATmega128 and ATmega1281/ATmega2561) that the name of the MCUSR was MCUCSR. Thus put a quick .equ MCUSR = MCUCSR inside your template.asm. The exact placement should not be important, but if in doubt put this instruction into the first line. Another thing are the IN instructions in words/core/store-i_nrww.asm. Change all IN instructions into in_ (with the underscore) to make the assembler happy. The reason is that the MCUSR is usually inside the address region that the IN instruction can reach, only on your controller it is outside. The IN_ macro has some checks to decide between IN and a LDS for a particular address. Tell if it works, I cannot test it myself. Then I can make a more permanent change in the repository. Matthias |