Hello and welcome Helge,

> amForth is an interactive Forth. The compiler runs on the target and
> writes to the flash memory of the device. This requires to send all the
> source code through the UART interface.

This is the usual way AmForth is used. However it is possible to write
words in AVR assembler and add them to the build process that creates
the two hex files that make up the base AmForth system (these are the
two hex files that are initially flashed). Such words would be
available to you without having to send Forth code over the UART.    

> I want to develop a Forth application for a target that uses the
> ATmeage256 USART for the application data.

By default, AmForth only knows about one UART and is expecting to
receive Forth over it. If instead, you want to receive application
data over that UART you could write a Forth word(s) to parse that
application data received over the UART (write the Forth word to do
it, send it over UART, execute the Forth word, disconnect the UART
from PC, connect UART to application data source). However, I think
this would be painful to develop and (very) limited in terms of rate
of data that could be handled.  

If the UC on which AmForth is running has multiple UARTs then it is
possible to use these for application data. This I have done in the
past

https://tjnw.co.uk/files/uarts/fsm-uart.mp4

but it means writing your own UART handlers (which can be done in
Forth). Again, application data rate may be limiting. You mentioned
the ATmega256 - were you looking at ATmega256X or the ATmega256RFR2?
They all have multiple UARTs I think.

Kind regards,

Tristan



_______________________________________________
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