avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Embedded AVR core with 3 byte PC


From: Matej K.
Subject: [avr-gcc-list] Embedded AVR core with 3 byte PC
Date: Mon, 05 Jul 2004 18:03:27 +0200
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

I have an embedded AVR core supporting the normal (not extended) instruction set, with ram located at 0x8000 to 0xFFFF, 1MB flash and thus a 3 byte program counter.

To make some simple programs work, I've used mcu type atmega103 and modified the avr3.x ldscript data ORIGIN and LENGTH parameters to correct for the ram difference. The inits still set the stack wrong (0x0FFF), but since stack isn't used until I get control in main, I can set the stack and Y pointer to 0xFFFF there. The next problem is function parameter passing through stack... Since AVR GCC expects the return address to be 2 bytes, it calculates the offset to the passed parameters wrong. Can anyone see a solution to this ? Would the compiler need to be modified and recompiled (and subsequently libc) ?

Thanks,
Matej



reply via email to

[Prev in Thread] Current Thread [Next in Thread]