From: Helge K. <Hel...@gm...> - 2021-08-31 09:29:41
|
On 31.08.2021 10:41, Martin Nicholas via Amforth-devel wrote: >> >> I want to develop a Forth application for a target that uses the >> ATmeage256 USART for the application data. In that case it would be >> desired to compile the application, create a hex file and use USBasp >> to flash it to the target. >> >> How can I compile the Forth words, probably with the AVR assembler, >> for a target without a free UART? Is there any idea of a cross >> compiler or generating of assembler source code that could be place >> in a file lilke appltrunkey.asm. >> >> Are there other ways to approach? >> > > ATmegas have at least two USARTs, I'd use one of them for your extra > interface. The advantages of Forth's interactivity is lost if you can > no longer interact with it via the terminal - you might as well write > in C. > Thanks for reply. I like the interactivity at the terminal. 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. 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. There is no chance to connect that device to a RS232 port on the PC. Best regards, Helge |