Link missing symbols from within libc.a

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ScGr_289066
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi All,

After putting the memory issue to bed (see https://community.cypress.com/message/211111?et=watches.email.thread#211111), I am still left with a bunch of undefined symbols from functions within libc:

'Invoking: ARM Sourcery Windows GCC C Linker'

arm-none-eabi-gcc  ./cycx3_uvc.o ./cycx3_uvcdscr.o ./cyfx_gcc_startup.o ./cyfxtx.o ./front_panel.o ./mma8452.o ./ourflash.o ./ov5647_6by9.o ./projector.o ./sysconfig.o ./usbuart.o    -T"D:\Optel\proj_firmware\OV5647_dual_camera_NOUVC_e\bigmemory_fx3.ld" -nostartfiles -Xlinker --gc-sections -Wl,-Map,OV5647_dual_camera_NOUVC_e.map -Wl,-d -Wl,--no-wchar-size-warning -Wl,--entry,CyU3PFirmwareEntry "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/firmware/u3p_firmware/lib/fx3_release/cyu3mipicsi.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/firmware/u3p_firmware/lib/fx3_release/cyu3lpp.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/firmware/u3p_firmware/lib/fx3_release/cyfxapi.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/firmware/u3p_firmware/lib/fx3_release/cyu3threadx.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/lib/gcc/arm-none-eabi/4.8.1/libgcc.a" -mcpu=arm926ej-s -mthumb-interwork -o "OV5647_dual_camera_NOUVC_e.elf"

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':

writer.c:(.text+0x20): undefined reference to `_write'

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':

closer.c:(.text+0x18): undefined reference to `_close'

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':

lseekr.c:(.text+0x20): undefined reference to `_lseek'

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':

readr.c:(.text+0x20): undefined reference to `_read'

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':

sbrkr.c:(.text+0x18): undefined reference to `_sbrk'

collect2.exe: error: ld returned 1 exit status

cs-make: *** [OV5647_dual_camera_NOUVC_e.elf] Error 1

Any idea what causes these or how to get rid of them?

Thanks,

Scott

0 Likes
1 Solution
ScGr_289066
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi All,

I was calling sscanf().  As soon as I removed these calls in favor of using my own conversion routine the link errors disappeared.

Scott

View solution in original post

0 Likes
2 Replies
ScGr_289066
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi All,

I was calling sscanf().  As soon as I removed these calls in favor of using my own conversion routine the link errors disappeared.

Scott

0 Likes

Glad that the issue is solved.

Thank you so much for updating the solution here.

Regards,

Sridhar

0 Likes