Hallo zusammen, bin noch recht neu was mikrocontroller und deren programmierung angeht. Jedoch scheitere ich schon an der einfachen ausgabe von zeichen auf die konsole. Hier mein mini-programm:
1 | #include <stdio.h> |
2 | |
3 | int main() |
4 | {
|
5 | printf("hello world\n"); |
6 | }
|
Und hier geht was beim linken schief:
1 | [cc] Starting link |
2 | [cc] arm-none-eabi-gcc -O0 -nostartfiles -Wl,-Map=Print1.map -mcpu=cortex-m3 -mthumb -LC:\CooCox\CoIDE\workspace\Print1 -Wl,--gc-sections -Wl,-TC:\CooCox\CoIDE\workspace\Print1\link.ld -g -o Print1.elf ..\obj\startup_stm32f10x_md_vl.o ..\obj\core_cm3.o ..\obj\system_stm32f10x.o ..\obj\stm32f10x_pwr.o ..\obj\stm32f10x_gpio.o ..\obj\main.o ..\obj\stm32f10x_rcc.o ..\obj\stm32f10x_usart.o ..\obj\maiin.o |
3 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-sbrkr.o): In function `_sbrk_r': |
4 | [cc] sbrkr.c:(.text+0xc): undefined reference to `_sbrk' |
5 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-writer.o): In function `_write_r': |
6 | [cc] writer.c:(.text+0x10): undefined reference to `_write' |
7 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-closer.o): In function `_close_r': |
8 | [cc] closer.c:(.text+0xc): undefined reference to `_close' |
9 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-fstatr.o): In function `_fstat_r': |
10 | [cc] fstatr.c:(.text+0xe): undefined reference to `_fstat' |
11 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-isattyr.o): In function `_isatty_r': |
12 | [cc] isattyr.c:(.text+0xc): undefined reference to `_isatty' |
13 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-lseekr.o): In function `_lseek_r': |
14 | [cc] lseekr.c:(.text+0x10): undefined reference to `_lseek' |
15 | [cc] c:/program files/arm-none-eabi-gcc-4_6/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-readr.o): In function `_read_r': |
16 | [cc] readr.c:(.text+0x10): undefined reference to `_read |
17 | [cc] ' |
18 | [cc] collect2: ld returned 1 exit status |
Ich programmiere mit coide von coocox, welches sich ja um die passenden linker-skripte etc. pp. kümmern sollte. Was also mache ich falsch und wie kann ich es beheben? Grüße