Hallo miteinander,
ich hab ein kleines Problem bei meinem Projekt. Ich versuche gerade
µC-OS ii auf den MPC5567 zu portieren. Ich habe jetzt beim kompilieren
ein kleines Problem. Wenn ich kompiliere bekomm ich beim Linken
folgenden Fehler:
1 | main.c(18,1): undefined reference to `startAPP'
|
Ich habe folgende Konstellation:
main.c:
1 | #include "includes.h"
|
2 | #include "app.h"
|
3 |
|
4 | int main(void) {
|
5 | ...
|
6 |
|
7 | startAPP();
|
8 |
|
9 | ...
|
10 | }
|
app.c:
1 | #include "includes.h"
|
2 | #include "app.h"
|
3 |
|
4 | void startAPP(void) {
|
5 | ...
|
6 | }
|
app.h:
1 | #ifndef __APP_H__
|
2 | #define __APP_H__
|
3 |
|
4 | void startAPP(void);
|
5 | #endif
|
Eigentlich müsste main.c doch die Funktion startAPP kennen. Aber
irgendwie funktioniert das nicht wirklich.
Hier noch die Optionen vom
Compiler:
1 | $(EDNAME) -gdwarf-2 -c -mno-sdata -Wall
|
Assembler:
1 | $(EDNAME) --gdwarf2 -mregnames -me500x2 -o $(NOEXT).o
|
Linker:
1 | -nostartfiles -Xlinker --output=$(OUTPUTFILE) -Xlinker -Map=sample.map -Xlinker --script=$(INDPATH) -Xlinker -n -lgcc -lg -lc -lm
|