Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Forth on Ar...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 4016 of 4053
Post > Topic >>

Re: Forth on Arduino?

by Matthias Trute <matthias.trute@[EMAIL PROTECTED] > Apr 27, 2008 at 08:54 PM

Jenny,

Jenny Brien wrote:
> On Apr 25, 3:18 pm, s...@[EMAIL PROTECTED]
 wrote:
> 
>> turns up numerous atmega capable forth systems.  I have no experience
with
>> any of them, but it seems like a fun learning experience, for the cost
of
>> an Arduino + programmer ... 8-).
>>
> Apparently AVR, (like most standalone Forths?) would overwrite the
> Arduino bootloader. :(

For amforth the situation is as follows: The dictionary is in the flash.
For that, you need a way to write to the flash to work with the
dictionary. That is a design decision: where to store the dictionary.

The atmegas have a rather complex method to perform the flash
write, that requires a lot of work. This work is done in every
bootloader, but only one (for an USB Atmega) provides an API to
use the routines in normal applications. All other bootloaders
(Arduino, AVR Butterfly etc) can only do the special operation
"read/write (many) blocks from/to serial interface and get/put them
into flash". They simply do not offer the internal routines to
applications running on the controller.

For technical reason the code doing the flash write operation has to
be in the booloader flash section. So, what can you do: The relevant
code needs to be in a special address range. That area is rather small
and there is already code from an unknown source and you do not know
where free space is left. My decision is to ignore all bootloaders
and use the bootloader area as much as possible (there are other side-
effects).

If you design a forth that stores the dictionary (or the extensible part
of it) on different storage areas (RAM or serial EEPROM etc) the
situation is easier, but you create dependencies on the hardware and
you cannot use the assembler (executable code is only allowed in flash).

For the arduino the situation could be changed if they would adapt their
bootloader a little, amforth uses a single cell write operation, btw...

Looking at the schematics of the arduino's, I'd say that amforth runs
without problems on most of them.

Bye
Matthias
(author of amforth)




 5 Posts in Topic:
Forth on Arduino?
Jenny Brien <jennifer@  2008-04-25 05:21:20 
Re: Forth on Arduino?
spam@[EMAIL PROTECTED]   2008-04-25 10:18:59 
Re: Forth on Arduino?
Jenny Brien <jennybrie  2008-04-26 13:11:29 
Re: Forth on Arduino?
Albert van der Horst <  2008-04-27 11:37:48 
Re: Forth on Arduino?
Matthias Trute <matthi  2008-04-27 20:54:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 2:06:21 CDT 2008.