Hallo David,

long time no see :)
well, unfortunately ...

I have tried to assemble amforth-6.9 for atmega8.

The uart thing is quite simple to fix, as has been pointed out:

in template.asm:
-.include "drivers/usart_0.asm"
+.include "drivers/usart.asm"

And you made some progress on the "Overlap in .cseg".

cont. below ...

David Kuehling writes:

> Hi,
>
> I've been trying to get AmForth onto this Atmega 8 based platform:
>
>   https://www.elektronik-labor.de/Lernpakete/Pingong.html
>   https://www.elektronik-labor.de/Elo/ELO.html
>
> Which is sold cheaply as a toy:
>
>   
> https://de.elv.com/franzis-ping-pong-das-retro-spiel-zum-selberbauen-bausatz-144843
>
> Already soldered the ISP connector and a serial TTL cable.  However,
> AmForth (v6.9) does not seem to compile for Atmega8 in its current
> version.  Copying the template directory and editing makefile to say
> "MCU=atmega8", I'm getting a lot of compiler errors that indicate an
> overflow of the RWW dictionary space:
>
> ../../avr8\amforth-interpreter.asm(4): error: Overlap in .cseg: addr=0xc00 
> conflicts with 0x7a:0xc58
> ../../avr8\amforth-interpreter.asm(5): error: Overlap in .cseg: addr=0xc01 
> conflicts with 0x7a:0xc58
> [..]
>
> If I randomly comment out words in avr/appl_2k.inc, I get a little
> further.  However, then compilation errs out in the UART driver code and
> complains about stuff in macros.asm:
>
> ../../avr8\drivers/usart_0.asm(1): error: Undefined symbol: UBRR0L
> ../../avr8\drivers/usart_0.asm(2): error: Undefined symbol: UBRR0H
> ../../avr8\drivers/usart_0.asm(3): error: Undefined symbol: UCSR0C
> ../../avr8\drivers/usart_0.asm(4): error: Undefined symbol: UCSR0B
> ../../avr8\drivers/usart_0.asm(5): error: Undefined symbol: UCSR0A
> ../../avr8\drivers/usart_0.asm(12): error: Undefined symbol: RXC0
> ../../avr8\drivers/usart_0.asm(13): error: Undefined symbol: UDRE0
> ../../avr8\drivers/usart_0.asm(14): error: Undefined symbol: TXEN0
> ../../avr8\drivers/usart_0.asm(15): error: Undefined symbol: RXEN0
> ../../avr8\drivers/usart_0.asm(16): error: Undefined symbol: RXCIE0
> ../../avr8\drivers/usart_0.asm(17): error: Undefined symbol: UDRIE0
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
> ../../avr8\macros.asm(94): error: jmp k: Unsupported instruction on ATmega8
>
> And this is even before I try to resolve all the problems arising from
> the words that I commented out.
>
> Maybe the Atmega8-specific code has been bit-rotting without being used
> for too long already?  What do you think are my chances to make this
> work again?  Any ideas what's wrong about the Uart drivers and how to
> strip down AmForth to fit into 8 kB of flash?  Or has AmForth just
> gotten too old and fat over the years to render this undertaking
> unachievable?

Bitrot is maybe the wrong word for this. AmForth has grown in
features and thus in size. 8 kiB flash is imho too small. It was
too small for a long time already, because you really need a few
kB free space for your own programm, right?

Maybe starting with AmForth-4.x is more successful?

You may be able to just get it to work, but then what?

I would like to see, what needs to be stripped out until it
fits. But I guess it is really not worth the effort.


Just for the sake of the argument I tried AmForth-4.0 (release
2010-07-01). It does not assemble, even though there is only 1
overlap conflict. Sigh.

The atmega8 has worked, but I have no idea which release made it
fail the size constraints.


Maybe I should place a more prominent warning on the webpage.
Currently we have this:

webpage> AmForth for the AVR8 needs 8 to 12 KB Flash memory, 80
webpage> bytes EEPROM, and 200 bytes RAM for the core system.



> (I did some experiments with an Arduino Uno clone first, and had no
> problem compiling and setting up AmForth on it.)
>
> Maybe the Arduboy [1] would be better suited to AmForth, but it's also
> more costly and complex to program.  I'm also eyeing the uzebox [2], but
> getting its video driver into AmForth would be a daunting
> endevour.

Arduboy features a atmega32u4. AmForth does not have support for
the USB interface, should that be important.

uzebox features an atmega644 controller. Now that I use
routinely and it has plenty of space.


Dear David,
you picked a new time sink, it seems. :-)

Cheers,
Erich

>
> cheers,
>
> David
>
> [1] 
> https://www.reichelt.de/arduboy-arduino-kompatibles-miniaturspielsystem-ard-arduboy-p254388.html?&trstct=pos_0&nbc=1
> [2] http://belogic.com/uzebox/index.asp


-- 
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