www.mikrocontroller.net

Forum: Mikrocontroller und Digitale Elektronik CrossWorks Build klappt nicht


Autor: Claud (Gast)
Datum:
Angehängte Dateien:

Bewertung
0 lesenswert
nicht 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:
 Building “Executable_1” in configuration “THUMB Flash Debug” — 96 errors
  Linking Executable_1.elf — 96 errors
    THUMB Flash Debug/main.o: In function `main':
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:50: undefined reference to `debug'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:60: undefined reference to `SysTick_SetReload'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:63: undefined reference to `SysTick_ITConfig'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:66: undefined reference to `RCC_APB2PeriphClockCmd'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:77: undefined reference to `GPIO_Init'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:80: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:81: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:82: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:83: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:84: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:85: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:86: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:87: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:90: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:91: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:92: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:93: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:94: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:95: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:96: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:97: undefined reference to `GPIO_WriteBit'
    THUMB Flash Debug/main.o: In function `RCC_Configuration':
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:128: undefined reference to `RCC_DeInit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:131: undefined reference to `RCC_HSEConfig'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:134: undefined reference to `RCC_WaitForHSEStartUp'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:139: undefined reference to `FLASH_PrefetchBufferCmd'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:142: undefined reference to `FLASH_SetLatency'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:145: undefined reference to `RCC_HCLKConfig'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:148: undefined reference to `RCC_PCLK2Config'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:151: undefined reference to `RCC_PCLK1Config'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:154: undefined reference to `RCC_PLLConfig'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:157: undefined reference to `RCC_PLLCmd'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:160: undefined reference to `RCC_GetFlagStatus'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:165: undefined reference to `RCC_SYSCLKConfig'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:168: undefined reference to `RCC_GetSYSCLKSource'
    THUMB Flash Debug/main.o: In function `NVIC_Configuration':
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:188: undefined reference to `NVIC_SetVectorTable'
    THUMB Flash Debug/main.o: In function `LEDsSet':
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:203: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:204: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:205: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:206: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:207: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:208: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:209: undefined reference to `GPIO_WriteBit'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIOB'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:210: undefined reference to `GPIO_WriteBit'
    THUMB Flash Debug/main.o: In function `DelaymS':
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:235: undefined reference to `SysTick_CounterCmd'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:242: undefined reference to `SysTick_CounterCmd'
    .../CrossWorks Projects/ET-STM32F103_LED/project/main.c:244: undefined reference to `SysTick_CounterCmd'
Build failed

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

Danke schonmal

Autor: A. K. (prx)
Datum:

Bewertung
0 lesenswert
nicht 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?

Autor: Claud (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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

Autor: Claud (Gast)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
Achjaa wegen Zensur...

einfach so.. hatte kein bestimmten grund

Autor: A. K. (prx)
Datum:

Bewertung
0 lesenswert
nicht 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.

Antwort schreiben

Die Angabe einer E-Mail-Adresse ist freiwillig. Wenn Sie automatisch per E-Mail über Antworten auf Ihren Beitrag informiert werden möchten, melden Sie sich bitte an.

Wichtige Regeln - erst lesen, dann posten!

  • Groß- und Kleinschreibung verwenden
  • Längeren Sourcecode nicht im Text einfügen, sondern als Dateianhang

Formatierung (mehr Informationen...)

  • [c]C-Code[/c]
  • [avrasm]AVR-Assembler-Code[/avrasm]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] - Link zu Artikel
  • Verweis auf anderen Beitrag einfügen: Rechtsklick auf Beitragstitel,
    "Adresse kopieren", und in den Text einfügen




Bild automatisch verkleinern, falls nötig
Bitte das JPG-Format nur für Fotos und Scans verwenden!
Zeichnungen und Screenshots im PNG- oder
GIF-Format hochladen. Siehe Bildformate.
Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt.
Bitte hier nur auf die ursprüngliche Frage antworten,
für neue Fragen einen neuen Beitrag erstellen.

Mit dem Abschicken bestätigst du, die Nutzungsbedingungen anzuerkennen.