Hello,

I've copied the template directory and get weird errors form the words
source files.

I'm using amforth 3.9. 

Can anyone give me a comment to work with amforth and how to compile it
for ATmega32a?

Regards,

HUE \a
# simple makefile for building the 
# template project. 


# --- edit these values ------------------------------------
# Name of your application (useful, if you rename template.asm)
TARGET=m32

# versions before 2.1 may produce some warnings
# but should produce a running system. You should
# _always_ use the trunk.

#AMFORTH=../../releases/3.6
AMFORTH=../../core

# the MCU should be identical to the device
# setting in template.asm
MCU=atmega32

# set the fuses according to your MCU
LFUSE=0xnn
HFUSE=0xnn
# some MCU have this one, see write-fuses target below
EFUSE=0xnn

# serial port
CONSOLE=/dev/ttyU0

# directories
DIR_ATMEL=../../../Atmel

# programms / flags
USB=-c stk500v2 -P /dev/ttyU1
PP=-c stk200  -P /dev/parport0
JTAG=-c jtag2 -P /dev/ttyUSB2
BURNER=$(USB)
AVRDUDE=avrdude
AVRDUDE_FLAGS=-q $(BURNER) -p $(MCU)

AVRA=avra -I $(DIR_ATMEL)

AVRASM=wine $(DIR_ATMEL)/avrasm2.exe -I $(DIR_ATMEL)/Appnotes2

# ----------------------------------------------------------

INCLUDE=-I $(AMFORTH)

default:  $(TARGET).hex

erase:
        $(AVRDUDE) $(AVRDUDE_FLAGS) -e

install: $(TARGET).hex
        $(AVRDUDE) $(AVRDUDE_FLAGS)  -e -U flash:w:$(TARGET).hex:i -U 
eeprom:w:$(TARGET).eep.hex:i

upload:
        amforth-upload.py  -t ${CONSOLE} $(TARGET).frt


$(TARGET).hex: $(TARGET).asm $(AMFORTH)/*.asm $(AMFORTH)/words/*.asm 
$(AMFORTH)/devices/*.asm 
        $(AVRA) $(INCLUDE) --listmac -l $(TARGET).lst -m $(TARGET).map 
$(TARGET).asm 1>$(TARGET).log 2>&1
#       $(AVRASM) $(INCLUDE) -fI -v0 -e $(TARGET).eep.hex -l $(TARGET).lst 
$(TARGET).asm

$(TARGET).back:
        $(AVRDUDE) $(AVRDUDE_FLAGS)  -U flash:r:$(TARGET).hex:i -U 
eeprom:r:$(TARGET).eep.hex:i

clean:
        rm -f $(TARGET).{hex,eep.hex,lst,map,cof,obj}

write-fuse:
        $(AVRDUDE) $(AVRDUDE_FLAGS) -U hfuse:w:$(HFUSE):m -U lfuse:w:$(LFUSE):m
#       $(AVRDUDE) $(AVRDUDE_FLAGS) -U efuse:w:$(EFUSE):m -U hfuse:w:$(HFUSE):m 
-U lfuse:w:$(LFUSE):m
../../core/words/istore_nrww.asm(55) : Error   : Found no 
label/variable/constant named RWWSRE
../../core/words/istore_nrww.asm(55) : Warning : Constant out of range (-128 <= 
k <= 255). Will be masked
../../core/words/istore_nrww.asm(66) : Error   : No register associated with y
../../core/words/istore_nrww.asm(66) : Error   : No register associated with z
../../core/words/istore_nrww.asm(72) : Error   : No register associated with z
../../core/words/istore_nrww.asm(72) : Error   : No register associated with y
../../core/words/istore_nrww.asm(75) : Error   : No register associated with z
../../core/words/istore_nrww.asm(75) : Error   : No register associated with y
../../core/words/istore_nrww.asm(87) : Error   : No register associated with y
../../core/words/istore_nrww.asm(87) : Error   : adiw can only use registers 
R24, R26, R28 or R30
../../core/words/istore_nrww.asm(88) : Error   : No register associated with x
../../core/words/istore_nrww.asm(88) : Error   : sbiw can only use registers 
R24, R26, R28 or R30
../../core/words/istore_nrww.asm(88) : Maximum error count reached. Exiting...
dict_appl_core.inc(6) : Maximum error count reached. Exiting...
../../core/amforth.asm(99) : Maximum error count reached. Exiting...
m32.asm(41) : Maximum error count reached. Exiting...
AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
Copyright (C) 1998-2010. Check out README file for more info

   AVRA is an open source assembler for Atmel AVR microcontroller family
   It can be used as a replacement of 'AVRASM32.EXE' the original assembler
   shipped with AVR Studio. We do not guarantee full compatibility for avra.

   AVRA comes with NO WARRANTY, to the extent permitted by law.
   You may redistribute copies of avra under the terms
   of the GNU General Public License.
   For more information about these matters, see the files named COPYING.

Pass 1...
Pass 2...
done

Used memory blocks:
   Code      :  Start = 0x0002, End = 0x0002, Length = 0x0001
   Code      :  Start = 0x0004, End = 0x0004, Length = 0x0001
   Code      :  Start = 0x0006, End = 0x0006, Length = 0x0001
   Code      :  Start = 0x0008, End = 0x0008, Length = 0x0001
   Code      :  Start = 0x000A, End = 0x000A, Length = 0x0001
   Code      :  Start = 0x000C, End = 0x000C, Length = 0x0001
   Code      :  Start = 0x000E, End = 0x000E, Length = 0x0001
   Code      :  Start = 0x0010, End = 0x0010, Length = 0x0001
   Code      :  Start = 0x0012, End = 0x0012, Length = 0x0001
   Code      :  Start = 0x0014, End = 0x0014, Length = 0x0001
   Code      :  Start = 0x0016, End = 0x0016, Length = 0x0001
   Code      :  Start = 0x0018, End = 0x0018, Length = 0x0001
   Code      :  Start = 0x001E, End = 0x001E, Length = 0x0001
   Code      :  Start = 0x0020, End = 0x0020, Length = 0x0001
   Code      :  Start = 0x0022, End = 0x0022, Length = 0x0001
   Code      :  Start = 0x0024, End = 0x0024, Length = 0x0001
   Code      :  Start = 0x0026, End = 0x0026, Length = 0x0001
   Code      :  Start = 0x0028, End = 0x002D, Length = 0x0006
   Code      :  Start = 0x0000, End = 0x0001, Length = 0x0002
   Code      :  Start = 0x002E, End = 0x0B32, Length = 0x0B05
   Code      :  Start = 0x3800, End = 0x3BCE, Length = 0x03CF
   EEPROM    :  Start = 0x0000, End = 0x003F, Length = 0x0040

Assembly aborted with 11 errors and 1 warnings.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to