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


------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to