[En-Nut-Discussion] NUT/OS 4.4.0 does not compile for ATMega103Ethernut Board
Ernst Stippl
ernst at stippl.org
Wed Jan 9 23:26:38 CET 2008
Hi Ralf!
As far as I could find out, the PORTx DDRx and PINx definitions are
contained in the iomxxx.h files in the \Winavr\avr\include\avr directory
where xxx is the atmega CPU number (atmega128 -> iom128.h. atmega103 ->
iom103.h)
Looking into these files I realize that iom128.h contains the definition for
DDRC but the iom103.h file does not.
>From http://www.atmel.com/dyn/resources/prod_documents/doc0945.pdf
(atmega103 data sheet):
"Port C (PC7..PC0) Port C is an 8-bit output (!!!!!) port. The Port C output
buffers can sink 20 mA.
Port C also serves as Address output when using external SRAM.
Since Port C is an output only port, the Port C pins are not tri-stated when
a reset condition becomes active."
If it is an output only port, no DDR is necessary. Maybe that's the reason
there is none (and no PINB neither)
And WGM01: it does not exist in an atmega103.
Hth
Regards
ernst
-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Ralf Schulze
Gesendet: Mittwoch, 09. Jänner 2008 13:15
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] NUT/OS 4.4.0 does not compile for
ATMega103Ethernut Board
I think my last message did not get through, so I try it again. Sorry if
you receive this message twice:
----
Hi alltogether.
I have a (old) Ethernut Board here (Rev. 1.0, ATMega103, RTL8019AS
Network Chip) which I tried to program with NUT/OS 4.4.0.
After calling 'nutsetup' in the main ethernut-4.4.0 directory (options:
2) Atmel ATmega103, 1) Ethernut 1, 1) don't set clock, ...) I changed
to ./lib and 'make'd:
% make
make -C ../arch
make[1]: Entering directory
`/home/rschulze/IKP/Projects/Ethernut/ethernut-4.4.0/arch'
avr-gcc -c -mmcu=atmega103 -Os -fno-delete-null-pointer-checks -Wall
-Werror -Wstrict-prototypes -Wa,-ahlms=context_gcc.lst
-D__HARVARD_ARCH__ -DETHERNUT1 -I../include avr/os/context_gcc.c -o
avr/os/context_gcc.o
avr-gcc -c -mmcu=atmega103 -Os -fno-delete-null-pointer-checks -Wall
-Werror -Wstrict-prototypes -Wa,-ahlms=ostimer.lst -D__HARVARD_ARCH__
-DETHERNUT1 -I../include avr/dev/ostimer.c -o avr/dev/ostimer.o
avr/dev/ostimer.c: In function NutRegisterTimer:
avr/dev/ostimer.c:352: error: WGM01 undeclared (first use in this
function)
avr/dev/ostimer.c:352: error: (Each undeclared identifier is reported
only once
avr/dev/ostimer.c:352: error: for each function it appears in.)
make[1]: *** [avr/dev/ostimer.o] Error 1
make[1]: Leaving directory
`/home/rschulze/IKP/Projects/Ethernut/ethernut-4.4.0/arch'
make: *** [all] Error 2
Looking into 'ostimer.c' it seems as if the "MCU_ATMEGA103" flag to
avr-gcc is missing, so I added it to ./Makedefs and 'make'd again. This
is looking much better now but it fails at another point:
[...]
avr-gcc -c -mmcu=atmega103 -DMCU_ATMEGA103 -Os
-fno-delete-null-pointer-checks -Wall -Werror -Wstrict-prototypes
-Wa,-ahlms=nicrtl.lst -D__HARVARD_ARCH__ -DETHERNUT1 -I../include
avr/dev/nicrtl.c -o avr/dev/nicrtl.o
avr/dev/nicrtl.c: In function DetectNicEeprom:
avr/dev/nicrtl.c:443: error: DDRC undeclared (first use in this
function)
avr/dev/nicrtl.c:443: error: (Each undeclared identifier is reported
only once
avr/dev/nicrtl.c:443: error: for each function it appears in.)
avr/dev/nicrtl.c:476: error: PINC undeclared (first use in this
function)
avr/dev/nicrtl.c: In function EmulateNicEeprom:
avr/dev/nicrtl.c:561: error: DDRC undeclared (first use in this
function)
avr/dev/nicrtl.c:608: error: PINC undeclared (first use in this
function)
make[1]: *** [avr/dev/nicrtl.o] Error 1
make[1]: Leaving directory
`/home/rschulze/IKP/Projects/Ethernut/ethernut-4.4.0/arch'
make: *** [all] Error 2
Now I'm stuck.
Is tried to compile some older versions of NUT/OS but had no success.
I would be glad to get some advices.
Thank you.
Ralf
P.S.: avr-gcc version: 4.2.1
avr-libc version: 1.4.5
--
Institut für Kernphysik - Universität zu Köln --------------------
Zülpicher Str. 77 E-Mail: Ralf.Schulze at ikp.uni-koeln.de
50937 Köln Fon: +49 -(0)221 / 470-3649
Germany www: http://www.ikp.uni-koeln.de/~rschulze
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list