interoberlin / nRF51-playground

Playground for our nRF51822 Bluetooth Low Energy experiments
https://www.interoberlin.de/blog/category/projects/ble/
9 stars 2 forks source link

undefined reference to 'memcpy' #7

Closed matthiasbock closed 8 years ago

matthiasbock commented 8 years ago
/usr/bin/arm-none-eabi-ld -lc -static -L /usr/lib/gcc/arm-none-eabi/4.8/armv6-m/ -L /usr/lib/arm-none-eabi/newlib/armv6-m/ -T nrf51.ld nrf51_startup.o system_nrf51.o delay.o fifo.o uart.o demo_uart.o -o demo_uart.elf
uart.o: In function `UART0_Handler':
/home/code/nRF51822/playground/uart.c:40: undefined reference to `memcpy'
/home/code/nRF51822/playground/uart.c:66: undefined reference to `memcpy'
uart.o: In function `uart_send':
/home/code/nRF51822/playground/uart.c:103: undefined reference to `memcpy'
/home/code/nRF51822/playground/uart.c:116: undefined reference to `memcpy'
Makefile:48: recipe for target 'demo_uart.elf' failed
make: *** [demo_uart.elf] Error 1
matthiasbock commented 8 years ago

THe (UART-)FIFOs use char types and not pointers. Apparently the compiler automatically inserts memcpy invokations here, so my heap.h must be included.