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

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

[avr-gcc-list] Patch for Win32 build of avr-gcc to support ATMega128


From: Anton Erasmus
Subject: [avr-gcc-list] Patch for Win32 build of avr-gcc to support ATMega128
Date: Thu, 17 Jan 2002 21:33:28 +0200

Hi,

It seems that quite a number of people are interested in compiling 
for the ATMega128 without having to build the avr-gcc binaries with 
proper ATMega128 support for themselves.

Attached is a zip file with the modified files I use to compile code 
for the ATMega128 as well as a small example that shows using 
the inp and outp macros to access ATMega128 I/O registers that 
cannot be accessed with the "in" and "out" instructions.

The make1 and make2 files are modified versions of the Volker Oth 
originals. These should be copied to avrgcc/include. 
mk128 is the make file to make the example. Use make -fmk128 
or use cc.bat.
m128test.c is the example c file.
iomacros.h is a modified version of the standard iomacros.h files. 
This should be copied to avrgcc/avr/include.
Only the inp and outp macros have been modified.
crtm128.o is the startup object file for the ATMega128. This is 
assembled from the gcrt1.s file using the make file m128_crt.
ldscript.x is the linker script modified for the ATMega128. It also 
adds a section "batram" which is external memory from 0x1100 to 
0x7FFF. This section is not initialised by the startup file. Hence 
suitable for battery backed RAM. See the example C file on how to 
declare a variable in this section.

Remember that the ATMega128 as shipped is in ATmega103 
mode. One has to update the fuses to get it to run in ATMega128 
mode.

I see no reason why these patches would not work for a Linux build 
of avr-gcc. 

Regards
   Anton Erasmus
avr-gcc-list at http://avr1.org



reply via email to

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