lpcware

Linking error in LPCexpresso

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by praveen.9123 on Sun Feb 16 23:25:27 MST 2014
Hi,
Please help me i am getting the linking error.
I am integrating the freertos to the Audio loopback example for lpc4330 xplorer board.


11:46:26 **** Build of configuration Debug for project LPC4330_Xplorer_Audio ****
make all
Building file: ../src/audiodata.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/audiodata.d" -MT"src/audiodata.d" -o "src/audiodata.o" "../src/audiodata.c"
../src/freertos_audio.c: In function 'vPCM_AUDIO_LOOPBACKTASK':
Finished building: ../src/audiodata.c
../src/freertos_audio.c:91:3: warning: implicit declaration of function 'audio_loopback_main' [-Wimplicit-function-declaration]

In file included from ../src/main.c:36:0:
Building file: ../src/cr_startup_lpc43xx.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/cr_startup_lpc43xx.d" -MT"src/cr_startup_lpc43xx.d" -o "src/cr_startup_lpc43xx.o" "../src/cr_startup_lpc43xx.c"
../src/libcfg.h:42:0: warning: "DEBUG" redefined [enabled by default]
Finished building: ../src/cr_startup_lpc43xx.c
<command-line>:0:0: note: this is the location of the previous definition

../freertos/FreeRTOSCommonHooks.c:37:2: warning: return type defaults to 'int' [-Wreturn-type]
Building file: ../src/freertos_audio.c
../freertos/FreeRTOSCommonHooks.c: In function 'vApplicationMallocFailedHook':
Invoking: MCU C Compiler
../freertos/FreeRTOSCommonHooks.c:69:2: warning: implicit declaration of function 'DEBUGSTR' [-Wimplicit-function-declaration]
../freertos/FreeRTOSCommonHooks.c: In function 'vApplicationStackOverflowHook':
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/freertos_audio.d" -MT"src/freertos_audio.d" -o "src/freertos_audio.o" "../src/freertos_audio.c"
../freertos/FreeRTOSCommonHooks.c:88:2: warning: implicit declaration of function 'DEBUGOUT' [-Wimplicit-function-declaration]
Finished building: ../src/freertos_audio.c

../freertos/FreeRTOSCommonHooks.c: In function '__WFI':
Building file: ../src/main.c
../freertos/FreeRTOSCommonHooks.c:40:1: warning: control reaches end of non-void function [-Wreturn-type]
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
/usr/local/lpcxpresso_6.1.0_164/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m/libcr_c.a(alloc.o): In function `malloc':
Finished building: ../src/main.c

alloc.c:(.text.malloc+0x70): undefined reference to `_sbrk'
Building file: ../freertos/FreeRTOSCommonHooks.c
alloc.c:(.text.malloc+0x90): undefined reference to `_sbrk'
Invoking: MCU C Compiler
collect2: ld returned 1 exit status
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/FreeRTOSCommonHooks.d" -MT"freertos/FreeRTOSCommonHooks.d" -o "freertos/FreeRTOSCommonHooks.o" "../freertos/FreeRTOSCommonHooks.c"
make: *** [LPC4330_Xplorer_Audio.axf] Error 1
Finished building: ../freertos/FreeRTOSCommonHooks.c

Building file: ../freertos/croutine.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/croutine.d" -MT"freertos/croutine.d" -o "freertos/croutine.o" "../freertos/croutine.c"
Finished building: ../freertos/croutine.c

Building file: ../freertos/heap_3.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/heap_3.d" -MT"freertos/heap_3.d" -o "freertos/heap_3.o" "../freertos/heap_3.c"
Finished building: ../freertos/heap_3.c

Building file: ../freertos/list.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/list.d" -MT"freertos/list.d" -o "freertos/list.o" "../freertos/list.c"
Finished building: ../freertos/list.c

Building file: ../freertos/port.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/port.d" -MT"freertos/port.d" -o "freertos/port.o" "../freertos/port.c"
Finished building: ../freertos/port.c

Building file: ../freertos/queue.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/queue.d" -MT"freertos/queue.d" -o "freertos/queue.o" "../freertos/queue.c"
Finished building: ../freertos/queue.c

Building file: ../freertos/tasks.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/tasks.d" -MT"freertos/tasks.d" -o "freertos/tasks.o" "../freertos/tasks.c"
Finished building: ../freertos/tasks.c

Building file: ../freertos/timers.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p10_LPC43xx_DriverLib -DCORE_M4 -D__LPC43XX__ -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib-M0/inc" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/freertos" -I"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/LPC4330_Xplorer_Audio/src" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"freertos/timers.d" -MT"freertos/timers.d" -o "freertos/timers.o" "../freertos/timers.c"
Finished building: ../freertos/timers.c

Building target: LPC4330_Xplorer_Audio.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"/home/venkata/home/praveen/PMG_Projects/lpc4330_xpresso/lpc4330_Audio_rtos_integration/CMSISv2p10_LPC43xx_DriverLib/Debug" -Xlinker -Map="LPC4330_Xplorer_Audio.map" -Xlinker --gc-sections -mcpu=cortex-m4 -mthumb -T "LPC4330_Xplorer_Audio_Debug.ld" -o "LPC4330_Xplorer_Audio.axf"  ./src/audiodata.o ./src/cr_startup_lpc43xx.o ./src/freertos_audio.o ./src/main.o  ./freertos/FreeRTOSCommonHooks.o ./freertos/croutine.o ./freertos/heap_3.o ./freertos/list.o ./freertos/port.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o   -lCMSISv2p10_LPC43xx_DriverLib

11:46:31 Build Finished (took 5s.565ms)

Outcomes