On 31.08.21 11:29, Helge Kruse via Amforth-devel wrote:
But I want
to create a hex file with a real turnkey application that I can flash on
another ATmega2560 device. After running all Forth source code to my
"development" board I find the flash filled with the code. It should be
possible to clone the flash content to another board without sending all
the source trough a UART. The other idea I mentioned was to "dump" the
added flash memory content and create an assembler source used in the
AVR assembler.

Instead of dumping the contents from the target I found another
approach. The g4 <https://github.com/mikalus/g4> converter makes
assembly source code from Forth code. I could use it to convert my code
to assembler code that I could add the the amForth sources.

g4 requires that the referred words are defined, so that you have to
provide stubs for words that are missing in gforth but known to amForth,
e.g. MS. But as long as you can compile in gforth you can create source
files for amForth. Including these new files in you amForth skeleton
creates a new .hex file capable to be a turnkey application, in a .hex file.


The reason to differentiate between development board and the target
device is that the target device is that the target device has only one
USART port connected. And this port is used on a RS485 field bus.

And you can flash the new .hex file on the ISP port.

Best regards,
Helge


_______________________________________________
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