This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

_start not found

Using eclipse and code sorcery compiler I got an undefined label error, see below [b]_build/gcc_startup_nrf51.o: In function Reset_Handler': /home/oscar/workspace/Nordic/nrf51822/Source/templates/gcc/gcc_startup_nrf51.s:150: undefined reference to_start'[/b] "/opt/arm-2013.05/bin/arm-none-eabi-gcc" -DNRF51822_QFAA_CA -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_NRF6310 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -mfloat-abi=soft -DDEBUG -g3 -O0 -I"/home/oscar/workspace/Nordic/nrf51822/Include/ble" -I"/home/oscar/workspace/Nordic/nrf51822/Include/ble/softdevice" -I"/home/oscar/workspace/Nordic/nrf51822/Include/app_common" -I"/home/oscar/workspace/Nordic/nrf51822/Include/ble/ble_services" -I"../" -I"/home/oscar/workspace/Nordic/nrf51822/Include" -I"/home/oscar/workspace/Nordic/nrf51822/Include/gcc" -I"/home/oscar/workspace/Nordic/nrf51822/Include/ext_sensors" -M /home/oscar/workspace/Nordic/nrf51822/Source/ble/ble_services/ble_srv_common.c -MF "_build/ble_srv_common.d" -MT _build/ble_srv_common.o [b]collect2: error: ld returned 1 exit status make: *** [_build/ble_hrs_gcc_s110_xxaa.out] Error 1[/b] Where is the _start defined?
Any help?

Parents
  • Hello Ole, Using the ARM toolchain _start label error is gone but now I got this: /opt/gcc-arm-none-eabi-4_7-2013q2/arm-none-eabi/lib/armv6-m/libc.a(lib_a-exit.o): In function exit': exit.c:(.text.exit+0x18): undefined reference to_exit' collect2: error: ld returned 1 exit status make: *** [_build/ble_hrs_gcc_s110_xxaa.out] Error 1

    any idea?

    Thanks Oscar

  • Do you know if this exit function or label part of libc.a or crt0.o ? I found a an exit reference in the crt0.o file: RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 00000090 UNKNOWN memset 000000d0 UNKNOWN atexit 000000d4 UNKNOWN __libc_init_array 000000e0 UNKNOWN main 000000e4 UNKNOWN exit 000000ec UNKNOWN __stack 000000f0 UNKNOWN hardware_init_hook 000000f4 UNKNOWN software_init_hook 000000f8 UNKNOWN bss_start 000000fc UNKNOWN bss_end 00000100 UNKNOWN __libc_fini_array

    but it is not used when linking _build/ble_hrs_gcc_s110_xxaa.out

Reply
  • Do you know if this exit function or label part of libc.a or crt0.o ? I found a an exit reference in the crt0.o file: RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 00000090 UNKNOWN memset 000000d0 UNKNOWN atexit 000000d4 UNKNOWN __libc_init_array 000000e0 UNKNOWN main 000000e4 UNKNOWN exit 000000ec UNKNOWN __stack 000000f0 UNKNOWN hardware_init_hook 000000f4 UNKNOWN software_init_hook 000000f8 UNKNOWN bss_start 000000fc UNKNOWN bss_end 00000100 UNKNOWN __libc_fini_array

    but it is not used when linking _build/ble_hrs_gcc_s110_xxaa.out

Children
No Data
Related