From: <ha...@hu...> - 2007-02-26 15:31:27
|
Hi, I found amforth yesterday and was very happy about that! I'm teaching my son Forth as the first programming language and it would be very cool if he could have some fun with an AVR. I am now trying to run amforth-1.3 on an atmega8l-8pi. Compiling and flashing the software went fine, and I get the startup banner. Interactive commands work, but if I try to define a word, the system crashes and I seem to need to reprogram the eeprom to recover. Does anyone have a hint? amforth 1.3 > 1 2 3 + + . 6 ok > words up 0 1ms >< cmove> i! i@ i sp! sp@ rp! rp@ +! rshift lshift 1- 1+ not xor or and /mod 2* 2/ invert * + - 0> 0< > < 0= = 0<> <> r@ >r r> rot drop over swap ?dup dup c@ c! ! @ e@ e! abort execute exit noop ver interpret .s idump depth rp0 sp0 compile immediate recurse ( \ user constant variable [ ] ; : does> create <reso lve <mark >resolve >mark pause 'pause quit find word number char endcase endof o f case +loop loop do again until repeat while begin then else if throw catch han dler ['] ' words type itype ." digit accept . sign #> #s # <# hold count space c r max min abs mod / negate 'turnkey heap edp bl hex decimal , allot here head dp key? 'key? key 'key emit? 'emit? emit 'emit hld pad tib #tib >in base state lit eral rx0? rx0 tx0? tx0 intvector intcounter ok > : foo 1 2 + . ; ?? FFF3 C Thanks! Hans |
From: Matthias T. <mt...@we...> - 2007-02-26 16:18:53
|
Hello Hans, > I am now trying to run amforth-1.3 on an atmega8l-8pi. Compiling and > flashing the software went fine, and I get the startup banner. > Interactive commands work, but if I try to define a word, the system > crashes and I seem to need to reprogram the eeprom to recover. Does > anyone have a hint? > > amforth 1.3 > >> 1 2 3 + + . > 6 ok >> : foo 1 2 + . ; > ?? FFF3 C On my Atmega8 (16PU) everything works fine. No problems. Please check your fuses & lockbits and re-set them to factory defaults (except oscillator settings). Basically the fff3 is decimal -13 and that means that the word ending at character 12 (the c says that) was not found and could be converted to a number. For version 1.3 you could try to enter the ; again, since the interpreter remains in compilation mode even for such aborts. The upcoming version 1.4 (svn trunk) will reset the state to interpreter mode. Bye Matthias |
From: <ha...@hu...> - 2007-02-26 19:55:05
|
Hello Matthias, thanks for your quick reply. The problem has been the clock. At 8 Mhz, 9600 are not really attainable and I guess that the AVR just received garbage when I was trying to define a word. I installed a 3.6864 Mhz xtal and now things work on the ATMEGA8L-8PI just fine! Great! Thanks for this very cool piece of software. Is there any information available on how one would proceed to get an application running with amforth? I see that there are several files in the blocks/ subdirectory that appear to be Forth libraries, but how would I add those files to the Flash image? Is the svn repository available for public read access? Again, thanks for your support and this great piece of software! -Hans 2007/2/26, Matthias Trute <mt...@we...>: > Hello Hans, > > > I am now trying to run amforth-1.3 on an atmega8l-8pi. Compiling and > > flashing the software went fine, and I get the startup banner. > > Interactive commands work, but if I try to define a word, the system > > crashes and I seem to need to reprogram the eeprom to recover. Does > > anyone have a hint? > > > > amforth 1.3 > > > >> 1 2 3 + + . > > 6 ok > >> : foo 1 2 + . ; > > ?? FFF3 C > > On my Atmega8 (16PU) everything works fine. No problems. > Please check your fuses & lockbits and re-set them to > factory defaults (except oscillator settings). Basically the > fff3 is decimal -13 and that means that the word ending at > character 12 (the c says that) was not found and could be converted > to a number. For version 1.3 you could try to enter the > ; again, since the interpreter remains in compilation mode even > for such aborts. > > The upcoming version 1.4 (svn trunk) will reset the state to > interpreter mode. > > Bye > Matthias > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Matthias T. <mt...@we...> - 2007-02-26 20:13:23
|
Hans, > Is there any information available on how one would proceed to get an > application running with amforth? there are (nearly) no code examples specific for amforth. The homepage (amforth.sf.net) has some trivial examples.. But amforth tries to speak the standard (ans94) forth dialect, so it should not be too difficult to find example code. amforth does not have all ans94 words, but those present should work as specified. > I see that there are several files > in the blocks/ subdirectory that appear to be Forth libraries, but how > would I add those files to the Flash image? Just transfer them line by line (with a delay of approx 1 sec between 2 lines) to the controller. Don't push them too fast to the =B5C, the serial line has no handshake and will terribly overloaded. I use a simple perl script which may work on linux only however. The handshake (xon/xoff or rts/cts) is still on my todo list... One user told me that he uses avrdude to transfer the flash/eeprom back to the host computer to save time to re-install the system if needed. Really tricky. > Is the svn repository available for public read access? It is publicly readable, Instructions are at http://sourceforge.net/svn/?group_id=3D179967 > Again, thanks for your support and this great piece of software! I really would like hear more. Matthias |