Hello Stephen,

welcome to the list!

Stephen D writes:

> Hi all,
> would like to try running amforth on one of the new AVR processors, the
> AVR128DA48 to be exact. A Curiosity Nano board turned up this week and I'm
> keen to give it a try.
>
> Am a total newb with regards to amforth and forth in general but have
> plenty of AVR programming experience, both in C and assembler. Have looked
> through the User and Technical Guides but not found an answer to my
> question:
>
> How do you define a new AVR8 chip within amforth?
>
> I have looked through the files under /avr8/devices/atmega* e.g.
> device.asm, device.inc etc. They all claim to be "generated automatically".
> I have not been able to find where the automatic generation is performed.
> Is anyone able to point me in the right direction please?

Well, well. This is one of the secrets that I have not yet
uncovered from the files I have. You might not know that the
author of AmForth has left this planet earlier this year. So we
have to make due with some code archeology :)

AVR128DA48. What a beast. I skimmed the datasheet only briefly
https://www.microchip.com/wwwproducts/en/AVR128DA48

If you want to work your way to support this chip, I suggest to
make a twofold approach:

1. Have a controller, which is supported by AmForth already,
like the venerable atmega328p. Use this to set up the whole tool
chain and verify, that you can build and upload it, and that the
result is actually working. Unless, of course, you have done
this already.

2. Then try to fill in pieces for the new controller. Start with
the files of a supported controller with the same size flash/ram
/eeprom.

You have to make sure, that the new controller uses the exakt
same set of assembly instructions --- it probably does not,
because I read the word "hardware multiplier"

> The AVR128DA48 microcontroller is part of the AVR DA family
> featuring the AVR processor with hardware multiplier - running
> at up to 24 MHz and with 128 KB Flash, 16 KB SRAM and 512
> bytes of EEPROM in 48-pin packages.


Meanwhile I will have a look whether I can uncover the generator
scripts from some dusty corner ...

Ok, I think I found them:
> $ ls -l pd2amforth ./pd/*
> -rw-r----- 1 ew ew  122 2015-09-03 18:09 ./pd/__init__.py
> -rw-r----- 1 ew ew  226 2015-09-03 18:09 ./pd/convert_number.py
> -rw-r----- 1 ew ew 2183 2016-10-18 20:40 ./pd/device.py
> -rw-r----- 1 ew ew 1187 2016-10-18 20:40 ./pd/interrupts.py
> -rw-r----- 1 ew ew  200 2015-09-03 18:09 ./pd/make_path.py
> -rw-r----- 1 ew ew 1618 2016-10-18 20:40 ./pd/register.py
> -rw-r----- 1 ew ew 1509 2016-10-18 20:40 ./pd/sleep.py
> -rw-r----- 1 ew ew 1065 2016-10-18 20:40 ./pd/wdt.py
> -rwxr-x--- 1 ew ew 1840 2016-10-18 20:40 pd2amforth*


I do not know really, how they work, but I can certainly add
them to the repository ...

Cheers,
Erich



-- 
May the Forth be with you ...

_______________________________________________
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