Ich muss gestehen, ich hab diesen Block ganz frech aus dem Retarget.c
File von KEIL geklaut. Ich hab das Schlüsselwort extern jetzt
hinzugefügt, die beiden Fehler sind verschwunden. Leider hab ich aber
vorhin eine Fehlermeldung übersehen:
USART.axf: Error: L6200E: Symbol fputc multiply defined (by usart1.o and
usart2.o).
PS: In einem PDF von ARM hab ich folgendes gefunden:
Symbol __stdout multiply defined (by retarget.o and stdio.o).
This means that there are two conflicting definitions of __stdout
present – one in
retarget.o, the other in stdio.o. The one in retarget.o is your own
definition. The
one in stdio.o is the default implementation, which was probably
linked-in inadvertently.
stdio.o contains a number symbol definitions and implementations of file
functions like
fopen, fclose, fflush, etc. stdio.o is being linked-in because it
satisfies some
unresolved references.
To identify why stdio.o is being linked-in, you must link with the
linker's "verbose" switch,
e.g.:
armlink [... your normal options...] -verbose -errors err.txt
Then study err.txt, so see exactly what the linker is linking-in, from
where, and why.
To move forward, the user may have to either:
- Eliminate the calls like fopen, fclose, fflush, etc, or
- Re-implement the _sys_xxxx family of functions.
Kann damit jemand etwas anfangen? Ich bin da leider nicht so ganz firm,
was diese Sachen angeht...