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

Linker stage fails with missing reference to _start

Hey I am trying to create a blinky project from scratch on System: MAC OSX Eclipse Neon GCC 4.9

I am trying have it eclipse managed make.

I am at a point when after the compilation during the linking stage I get this error.

Building file: ../src/system_nrf52.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O2  -g -DBOARD_PCA10040 -DBSP_DEFINES_ONLY -DCONFIG_GPIO_AS_PINRESET -DNRF52_PAN_12 -DNRF52_PAN_15 -DNRF52_PAN_58 -DNRF52_PAN_20 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_30 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_53 -DNRF52_PAN_64 -DNRF52_PAN_55 -DNRF52_PAN_62 -DNRF52_PAN_63 -DNRF52 -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/examples/bsp" -I/Users/bhaumik/mac-build/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/lib/armv6-m -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/drivers_nrf/hal" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/toolchain/cmsis/include" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/toolchain/gcc" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/toolchain" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/device" -I"/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/drivers_nrf/delay" -std=gnu99 -MMD -MP -MF"src/system_nrf52.d" -MT"src/system_nrf52.o" -c -o "src/system_nrf52.o" "../src/system_nrf52.c"
Finished building: ../src/system_nrf52.c
 
Building target: Eclipse_template.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -O2  -g -T "/Users/bhaumik/Documents/workspace/Eclipse_template/blinky_gcc_nrf52.ld" -Xlinker --gc-sections -L/Users/bhaumik/Downloads/nRF5_SDK_12-2/components/toolchain/gcc -Wl,-Map,"/Users/bhaumik/Documents/workspace/Eclipse_template/debug/Eclipse_template.map" -o "Eclipse_template.elf"  ./src/gcc_startup_nrf52.o ./src/main.o ./src/system_nrf52.o   
./src/gcc_startup_nrf52.o: In function `Reset_Handler':
/Users/bhaumik/Documents/workspace/Eclipse_template/Debug/../src/gcc_startup_nrf52.s:408: undefined reference to `__START'
collect2: error: ld returned 1 exit status
make: *** [Eclipse_template.elf] Error 1

16:29:19 Build Finished (took 218ms)

I think this part of the code is part of cr0.o and it should get that automatically. I am not sure why this is happening

Can any one help. I have uploaded my code here

Related