Hi Paolo,

On 05/14/2014 08:58 PM, Paolo Garro wrote:
> Hi Matthias,
> thank you for the suggestion, I will try your way.
> 
>> I would have to spent quite some time to
>> make it working.
> 
> No, you only need a working make utility installed.
> I modify the directory structure to allow compiling in a single folder, with 
> the same environment.

come on, it's not that hard:

$ cd ....path to amforth
$ svn info
...
URL: svn://svn.code.sf.net/p/amforth/code
...
$ svn up
...
Updated to revision 1579.
$ cd releases/5.3/appl
$ cp -a template/ myproject
$ cd myproject

Now I need to set amforth up for my board, controller,
crystal frequency, programmer, ...

$ cp template.asm template.asm.orig
$ vi template.asm
$ diff -wu template.asm.orig template.asm
--- template.asm.orig   2014-05-15 19:57:30.252805836 +0200
+++ template.asm        2014-05-15 19:58:16.447695436 +0200
@@ -45,11 +45,11 @@
 
 ; the dictionary search treats lowercase and uppercase
 ; letters the same. Set to 0 if you do not want it
-.set WANT_IGNORECASE = 1
+.set WANT_IGNORECASE = 0
 
 ; amforth needs two essential parameters
 ; cpu clock in hertz, 1MHz is factory default
-.equ F_CPU = 8000000
+.equ F_CPU = 11059200
 .equ TIBSIZE  = $64    ; ANS94 needs at least 80 characters per line
 .equ APPUSERSIZE = 10  ; size of application specific user area in bytes
 
@@ -73,9 +73,9 @@
 .set WANT_ISR_RX = 1 ; interrupt driven receive
 .set WANT_ISR_TX = 0 ; send slowly but with less code space
 ; 9600 @ 8N1 is commonly used.
-.equ BAUD = 9600
+.equ BAUD = 115200
 ; define which usart to use.
-.include "drivers/usart_0.asm"
+.include "drivers/usart.asm"
 
 ; include the whole source tree.
 .include "amforth.asm"


$ cp makefile makefile.orig
$ vi makefile
$ diff -wu makefile.orig makefile
--- makefile.orig       2014-05-15 19:58:26.283451223 +0200
+++ makefile    2014-05-15 20:08:42.560985833 +0200
@@ -16,7 +16,7 @@
 AMFORTH=../../core
 
 # the MCU should be identical to the device
-MCU=atmega1284p
+MCU=atmega32
 # set the fuses according to your MCU
 LFUSE=0xnn
 HFUSE=0xnn
@@ -33,13 +33,14 @@
 USB=-c avr911  -P /dev/ttyUSB3
 PP=-c stk200  -P /dev/parport0
 JTAG=-c jtag2 -P /dev/ttyUSB2
-BURNER=$(USB)
-AVRDUDE=avrdude
+MKII=-c avrispmkII -P usb
+BURNER=$(MKII)
+AVRDUDE=sudo avrdude
 AVRDUDE_FLAGS=-q $(BURNER) -p $(MCU)
 
-AVRA=avra -I $(DIR_ATMEL)/Appnotes2
+AVRA=avra -I $(DIR_ATMEL)/Appnotes
 
-AVRASM=wine $(DIR_ATMEL)/avrasm2.exe -I $(DIR_ATMEL)/Appnotes2
+AVRASM=wine $(DIR_ATMEL)/avrasm2.exe -I $(DIR_ATMEL)/Appnotes
 
 # ----------------------------------------------------------
 
$ make
wine ../../Atmel/avrasm2.exe -I ../../Atmel/Appnotes -I ../../core -I 
../../core/devices/atmega32 -fI -v0 -e template.eep.hex -l template.lst 
template.asm
Wine cannot find the ncurses library (libncurses.so.5).
$ ls -l *.hex
-rw-r----- 1 ew ew   247 2014-05-15 20:37 template.eep.hex
-rw-r----- 1 ew ew 27134 2014-05-15 20:37 template.hex
$ make install
sudo avrdude -q -c avrispmkII -P usb -p atmega32  -e -U flash:w:template.hex:i 
-U eeprom:w:template.eep.hex:i

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9502
avrdude: erasing chip
avrdude: reading input file "template.hex"
avrdude: writing flash (32752 bytes):
avrdude: 32752 bytes of flash written
avrdude: verifying flash memory against template.hex:
avrdude: load data flash data from input file template.hex:
avrdude: input file template.hex contains 32752 bytes
avrdude: reading on-chip flash data:
avrdude: verifying ...
avrdude: 32752 bytes of flash verified
avrdude: reading input file "template.eep.hex"
avrdude: writing eeprom (92 bytes):
avrdude: 92 bytes of eeprom written
avrdude: verifying eeprom memory against template.eep.hex:
avrdude: load data eeprom data from input file template.eep.hex:
avrdude: input file template.eep.hex contains 92 bytes
avrdude: reading on-chip eeprom data:
avrdude: verifying ...
avrdude: 92 bytes of eeprom verified

avrdude: safemode: Fuses OK (E:FF, H:89, L:EE)

avrdude done.  Thank you.


$ minicom -wo -b 115200 -D /dev/ttyUSB0
...
> ver
amforth 5.3 ATmega32 ok
> 2 5 76 + * .
162  ok
> : hi ." Hello, world!" cr ;
 ok
> hi
Hello, world!
 ok
> 

all is well.


Btw, I tried to look at the code in dropbox. But I failed to download
any file --- no, I'm not a dropbox user. After not seeing code in my
browswer window I gave up. I also expected a tar file there to download
in one operation. So you made it uncomfortable enough for me at least to
not look further. Sorry. I'm certain that you can do much better.

Cheers,
Erich



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to