devel Digest, Vol 7, Issue 7

I have already cloned all git repos, projects, RIOT thirdparty_boards and thirdparty_cpu, with the same results.

I copied the Makefile.include from /RIOT/cpu/ and now I have this result while compiling the "hello-world" example:

/home/user/RIOT/projects/hello-world/../../thirdparty_boards/stm32f4discovery/bin/stm32f4discovery_base.a(board_init.o): In function `SystemInit': /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:263: undefined reference to `RCC_APB1PeriphClockCmd' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:267: undefined reference to `RCC_AHB1PeriphClockCmd' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:275: undefined reference to `GPIO_Init' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:279: undefined reference to `GPIO_PinAFConfig' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:286: undefined reference to `GPIO_Init' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:290: undefined reference to `GPIO_PinAFConfig' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:298: undefined reference to `USART_Init' /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:300: undefined reference to `USART_Cmd' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-writer.o): In function `_write_r': writer.c:(.text._write_r+0x10): undefined reference to `_write' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-closer.o): In function `_close_r': closer.c:(.text._close_r+0xc): undefined reference to `_close' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-fstatr.o): In function `_fstat_r': fstatr.c:(.text._fstat_r+0xe): undefined reference to `_fstat' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-lseekr.o): In function `_lseek_r': lseekr.c:(.text._lseek_r+0x10): undefined reference to `_lseek' /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-readr.o): In function `_read_r': readr.c:(.text._read_r+0x10): undefined reference to `_read' collect2: error: ld returned 1 exit status make: *** [all] Error 1

I'm using this compiler:

$ arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130613 (release) [ARM/embedded-4_7-branch revision 200083] Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

which is recomended by Stefan in a precedent mail.

Thanks!

Francisco

Hi Francisco,

during the work on c++11_compatibility I encountered similar errors such as:

In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'

since gcc > 4.7 is very picky these functions have to be set as exten in cpu/arm_common/syscalls.c to make them 'visible'

c.f. https://github.com/BytesGalore/RIOT/commit/83e04f8ad7da2d44ba0632b99eeecca07b2aa7ee https://github.com/BytesGalore/RIOT/commit/da413e79a8f30725a1a9626210eb17b7e8e3e07b

I hope that helps a bit.

Best regards, Martin

Hi Francisco!

I copied the Makefile.include from /RIOT/cpu/ and now I have this result while compiling the "hello-world" example:

/home/user/RIOT/projects/hello-world/../../thirdparty_boards/stm32f4discovery/bin/stm32f4discovery_base.a(board_init.o): In function `SystemInit': /home/user/RIOT/thirdparty_boards/stm32f4discovery/board_init.c:263: undefined reference to `RCC_APB1PeriphClockCmd'

<snip>

You should copy the include pathes from thirdparty_cpu/Makefile.base to thirdparty_cpu/Makefile.include. But I found at least two more missing defines in the thirdparty_cpu that would break the sixlowpan project for now, too.

I'm gonna fix these issues and make a pull request.

By the way: We're planning to merge all five repositories to simplify these things (probably next week).

Cheers, Oleg

Hi!

You should copy the include pathes from thirdparty_cpu/Makefile.base to thirdparty_cpu/Makefile.include. But I found at least two more missing defines in the thirdparty_cpu that would break the sixlowpan project for now, too.

I'm gonna fix these issues and make a pull request.

Here are my proposed fixes:

Regarding the not implemented hwtimer_set_absolute(), I guess that Marco or Stefan have already implemented it. Otherwise you could probably just take the code from Ala's branch for the stm32f103rey6:

Cheers, Oleg