Hallo,
ich versuche gerade, Eclipse in Kombination mit gcc-arm in Ubuntu 12.04
zum laufen zu bekommen, um für STM32 (im Moment das STM32VL-Discovery
Board) zu programmieren (ich habe nicht vor, die StdPeripheral-Lib zu
verwenden, diese muss also nicht funktionieren).
Zuerst habe ich gcc-arm-none-eabi von folgender PPA installiert:
https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded
Dann habe ich Schritt 1-6 von folgender Seite durchgeführt:
http://engineering-diy.blogspot.co.at/2012/11/stm32f3-discovery-eclipse-openocd.html
Ein neues Projekt habe ich folgendermaßen erstellt:
1 | create a new project: File > New > C Project
|
2 | Give a Project name, select Empty Project from the Executable group and have Cross GCC as tool chain selected.
|
3 | In the next dialog, unselect ‘Release’ configuration and leave only ‘Debug’
|
4 | For the Cross GCC Command options, set arm-none-eabi- as Cross Compliler Prefix and /usr/bin as Cross Compiler Path, thats where the tools are.
|
5 | Click finish.
|
Wenn ich jetzt ein main.c File erstelle mit einer leeren (bis auf ein
while(1);) Main-Funktion, und das ganze kompilieren versuche, bekomme
ich folgenden Fehler:
1 | make:***[STM32Discovery_Blink] Errror 1
|
Wenn ich make in der Konsole ausführe bekomme ich einen ausführlicheren
Fehler:
1 | /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit': exit.c:(.text.exit+0x2c): undefined reference to `_exit'
|
Dieser lässt sich beheben, indem ich in main.c einfach die Funktion
_exit selbst definiere:
1 | void _exit(int a)
|
2 | {
|
3 | while(1){}
|
4 | }
|
Jetzt wird erfolgreich kompiliert, aber es werden keine .hex, .lst,
.map, .d und .o.lst Files erzeugt, so wie es laut dieser Anleitung sein
sollte:
http://en.radzio.dxp.pl/stm32vldiscovery/programming,with,opensource,toolchain,codesourcery,eclipse.html
Woran liegt das? Und woher kommt der Fehler mit dem _exit?
MfG
Daniel