Forum: Mikrocontroller und Digitale Elektronik CrossWorks Build klappt nicht


von Claud (Gast)


Angehängte Dateien:

Lesenswert?

Hallo

Ich habe ein Beispiel Projekt welches ich in IAR, Rasonance (RIDE7) und 
Keil erzeugen kann also Builden...

Jedoch klappt es mit ein und dem Selber Projekt in Crossworks Nicht!

Im anhang befindet sich das Projekt

Ich habe alle Files Welche sich in Library/inc und Library/src befinden 
in das Include Verzeichniss von Crossworks kopiert da er sonst immer 
gemeldet hat das er die Datei nicht finde...

Danach habe ich in CrossWorks ein neues Projekt angelegt und die Main 
hinzugefügt

Die Fehlermeldungen von Crossworks:
1
 Building “Executable_1” in configuration “THUMB Flash Debug” — 96 errors
2
  Linking Executable_1.elf — 96 errors
3
    THUMB Flash Debug/main.o: In function `main':
4
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:50: undefined reference to `debug'
5
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:60: undefined reference to `SysTick_SetReload'
6
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:63: undefined reference to `SysTick_ITConfig'
7
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:66: undefined reference to `RCC_APB2PeriphClockCmd'
8
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIOB'
9
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIOB'
10
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIO_Init'
11
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIOB'
12
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIOB'
13
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIO_WriteBit'
14
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIOB'
15
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIOB'
16
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIO_WriteBit'
17
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIOB'
18
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIOB'
19
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIO_WriteBit'
20
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIOB'
21
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIOB'
22
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIO_WriteBit'
23
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIOB'
24
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIOB'
25
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIO_WriteBit'
26
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIOB'
27
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIOB'
28
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIO_WriteBit'
29
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIOB'
30
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIOB'
31
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIO_WriteBit'
32
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIOB'
33
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIOB'
34
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIO_WriteBit'
35
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIOB'
36
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIOB'
37
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIO_WriteBit'
38
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIOB'
39
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIOB'
40
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIO_WriteBit'
41
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIOB'
42
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIOB'
43
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIO_WriteBit'
44
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIOB'
45
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIOB'
46
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIO_WriteBit'
47
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIOB'
48
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIOB'
49
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIO_WriteBit'
50
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIOB'
51
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIOB'
52
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIO_WriteBit'
53
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIOB'
54
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIOB'
55
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIO_WriteBit'
56
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIOB'
57
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIOB'
58
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIO_WriteBit'
59
    THUMB Flash Debug/main.o: In function `RCC_Configuration':
60
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:128: undefined reference to `RCC_DeInit'
61
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:131: undefined reference to `RCC_HSEConfig'
62
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:134: undefined reference to `RCC_WaitForHSEStartUp'
63
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:139: undefined reference to `FLASH_PrefetchBufferCmd'
64
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:142: undefined reference to `FLASH_SetLatency'
65
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:145: undefined reference to `RCC_HCLKConfig'
66
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:148: undefined reference to `RCC_PCLK2Config'
67
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:151: undefined reference to `RCC_PCLK1Config'
68
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:154: undefined reference to `RCC_PLLConfig'
69
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:157: undefined reference to `RCC_PLLCmd'
70
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:160: undefined reference to `RCC_GetFlagStatus'
71
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:165: undefined reference to `RCC_SYSCLKConfig'
72
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:168: undefined reference to `RCC_GetSYSCLKSource'
73
    THUMB Flash Debug/main.o: In function `NVIC_Configuration':
74
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:188: undefined reference to `NVIC_SetVectorTable'
75
    THUMB Flash Debug/main.o: In function `LEDsSet':
76
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIOB'
77
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIOB'
78
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIO_WriteBit'
79
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIOB'
80
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIOB'
81
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIO_WriteBit'
82
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIOB'
83
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIOB'
84
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIO_WriteBit'
85
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIOB'
86
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIOB'
87
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIO_WriteBit'
88
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIOB'
89
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIOB'
90
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIO_WriteBit'
91
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIOB'
92
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIOB'
93
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIO_WriteBit'
94
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIOB'
95
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIOB'
96
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIO_WriteBit'
97
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIOB'
98
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIOB'
99
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIO_WriteBit'
100
    THUMB Flash Debug/main.o: In function `DelaymS':
101
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:235: undefined reference to `SysTick_CounterCmd'
102
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:242: undefined reference to `SysTick_CounterCmd'
103
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:244: undefined reference to `SysTick_CounterCmd'
104
Build failed

Ich hoffe ihr habt eine idee weshalb dies so sein könnte...

Danke schonmal

von (prx) A. K. (prx)


Lesenswert?

Project Properties,
rechts oben im Pulldown auf "Common",
links auf die Solution,
mittendrin unter Preprocessor Options / User Include Directories

Und die nötigen "*.c" Files der Lib müssen natürlich einzeln als 
Quellcode ins Projekt.

PS: Weshalb getarnt?

von Claud (Gast)


Lesenswert?

Vielen Dank

es hat endlich geklappt mit dem CrossWorks :)

Noch eine Frage...

Das hex File wird ca 100kb Gross.. was ja sehr viel ist...
Anscheinend werden alle C Files mit einkompiliert und ins hex gepakt...
Beim Keil etc ist das hex nur 6kb gross...

Kann man das noch irgendwo anpassen?

Ich hab einfach alle C Files bei Source files angefügt

von Claud (Gast)


Lesenswert?

Achjaa wegen Zensur...

einfach so.. hatte kein bestimmten grund

von (prx) A. K. (prx)


Lesenswert?

Claud schrieb:

> Das hex File wird ca 100kb Gross.. was ja sehr viel ist...
> Ich hab einfach alle C Files bei Source files angefügt

Eben deshalb. Nur die einbinden, die du benötigst.

Alternativ/zusätzlich für minimalen Platzbedarf:
  -ffunction-sections -fdata-sections für Compiler
  --gc-sections für Linker
Wird aber dazu führen, dass auch die IRQ-Handler wegoptimiert werden und 
folglich ins Leere laufen. Daher muss man die dann mit 
__attribute__((used)) verzieren.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.