On Fri, May 29, 2015 at 1:38 PM, Matthias Trute <mtr...@web.de> wrote:

>
> > Any updates I might have missed on the avra/native *NIX assembler for
> AVR?
> > I see a bit of activity on the avr mailing list but I'm still getting the
> > impression avra is out of date.
>
> I think avra is a dead horse, not even a zombie any more. I tried
> naken_asm, but could not make it work with amforth on the avr. The
> msp430 works fine with it. Believe me, I tried hard to get it working
> for both.
>

Why not use amforth's assembler.frt for words with a need for speed? Right
now I need to reflash the base image every time I forget some words that
are implemented in assembly.

Some people (such as myself) may be flashing a large number of nodes before
deployment. For this reason it would be good to bootstrap-metacompile that
base image rather than building a tiny core image on the host and compiling
the rest on the microcontroller.

Metacompiling the image would have the advantage that the entire & complete
application could be compiled to ihex for deployment and require no uploads
over UART.


So, a metacompiling Forth system should be able to run code out of its own
image in order to be built up on the host to become a complete system.

The dictionary is a linked list. Each word links to the previous word.

Here's an idea I've been kicking around:

A word with the same semantics on AVR and MSP430 but different
implementation, say XOR, would be linked to the same previous word location
if that word is implemented in Forth and has the same implementation on
both of the platforms of the child nodes.

So for the purposes of metacompilation the dictionary would be a Directed
Acyclic Graph, and to cross-compile only one side of the DAG would be
compiled to the image.

While platform specific word implementations would be linked to the common
words each set of platform specific words would be in a contiguous block of
memory.

The process of cross-compiling would require relinking the dictionary
unless it's a relative threaded forth like relf (relative addresses only
for re-locateability and small footprint): https://github.com/kt97679/relf

-Andreas


>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>
------------------------------------------------------------------------------
_______________________________________________
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