Hello Michael,

Getting AmForth up and running from archive hex files on a mega2560 is reasonably straightforward, however, I don't use Microchip Studio version 7 or win10 so I can't help with this tool set. I hope you able to translate the macos/linux to your tools - and if so a write-up would be very welcome!

As pointed out you need a programmer (such as usbtiny, usbasp, avrisp2 etc.) and a program to talk to the programmer (such as avrdude).

Both atmega2560.hex and atmega2560.eep.hex need to be written to the mega2560's flash/eeprom. Below are the command lines I use with avrdude

avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i
avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i

Flashing these file will overwrite any existing bootloader. It is worth considering whether you are able to reverse this should you wish to, before flashing the above files.

If your mega2560 is an Arduino style board, and the default fuses unchanged, then IIRC there is no need to reprogram the fuses.

Once the files have been flashed, you should be able to connect to the mega2560 over serial using 38400 8N1. I use minicom and amforth-shell.py You will need to identify the name of the serial device created by the USB to SERIAL chip on your board/setup to use any serial program.

Once connected you have the AmForth interpreter prompt and can interact, compile new words, and generally use the system. However, AmForth is modular and not all functionality is contained in the flashed hex files. For I2C and SPI new words need to be defined. These definitions are already available within the archive, but need to be loaded onto a "new" AmForth system. I find amforth-shell.py very helpful for automating this process.

The cookbook is a great place to see examples of how things can be done

http://amforth.sourceforge.net/TG/Cookbook.html

And for I2C, below is very helpful

http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html

Let us know how you get on.


Best wishes,
Tristan



On 2021-05-18 14:31, BK Navarette wrote:
Be careful, the fuse settings particularly the boot size is different
for flash forth vs amforth.

Brian

On 5/18/21 5:30 AM, PETREMANN Marc wrote:
Hello,
I have not used Amforth
But the installation mechanisms are the same as for FlashForth:
https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth
once FORTH is installed, you must write the programs in FORTH language and
have them compile by FORTH on the ARDUINO card.
FORTH is an interpreter and a compiler. We communicate with FORTH via
terminal software:
https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm
Unless I'm mistaken, you need an MKII programmer, because you can only
inject a .HEX file through this device. This operation overwrites the
original bootloader.
BR

Le mar. 18 mai 2021 à 06:08, Michael Picco <mpi...@placerville.me> a écrit :

Hello,

I am attempting to use the mega2560 as a nicely featured development
platform for AmForth-6.9.  The machine I'm using is a Win10 box, with
Microchip Studio version 7 installed.

In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and
atmega256.hex.  The eep.hex file doesn't seem to get recognized by
Studio 7.  Do I need to rename it to just a ".eep" file?

Can I start building the platform by flashing these files into the
board?  If so, what is the process to add functionality (I2C, SPI,
etc.)?  As a total newbie!

If it's necessary to recompile and create new hex files, the process is
unclear.  Is it spelled out somewhere such that a beginner can follow
some basic steps to make the proper file(s)?

It is my understanding that both flash and EEPROM need to be written,
along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these correct?

Once I get this figured out, I'd like to submit a write-up for newbies and perhaps draw more users into AmForth. How might I get this posted,
when completed?

Thank you in advance!

Kind regards,

Michael



_______________________________________________
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


_______________________________________________
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