Hey there!
I am trying to switch from Keil to Eclipse.
I have followed several tutorials on this website (like this one) and I can easily create new eclipse project, import SDK examples, then build, flash & debug...
That was easy because "examples" are provided with a gcc section that contains a makefile.
So, I have rewritten a new makefile based on example makefiles, like this question.
All seems to work until the linking:
"C:\Program Files\GNU ARM Eclipse\Build Tools\2.8-201611221915\bin\make.exe"
rm -rf _build
echo Makefile
Makefile
mkdir _build
Compiling file: ble_common.c
[ ... ]
Compiling file: app_fifo.c
Compiling file: fds.c
Compiling file: fstorage.c
Compiling file: nrf_assert.c
Compiling file: sdk_mapped_flags.c
Compiling file: softdevice_handler.c
Assembly file: gcc_startup_nrf51.s
Linking target: nrf51422_xxac_s130.out
_build/gcc_startup_nrf51.o: In function `Reset_Handler':
(.text+0x34): undefined reference to `SystemInit'
_build/gcc_startup_nrf51.o: In function `Reset_Handler':
(.text+0x38): undefined reference to `__START'
collect2.exe: error: ld returned 1 exit status
Makefile:224: recipe for target 'nrf51422_xxac_s130' failed
make: *** [nrf51422_xxac_s130] Error 1
I do not clearly understand what is happening because it is a file provided in the SDK... I have not modified it. I am using the SDK v12.1.0.
To be sure that the problem was not my SDK, my example makefile or even the builder, I have done the same test on blinky:
C:\Users\***\Desktop\SDK-Test\examples\peripheral\blinky\pca10028\s130\armgcc>
"C:\Program Files\GNU ARM Eclipse\Build Tools\2.8-201611221915\bin\make.exe"
rm -rf _build
echo Makefile
Makefile
mkdir _build
Compiling file: system_nrf51.c
Compiling file: main.c
Compiling file: nrf_delay.c
Assembly file: gcc_startup_nrf51.s
Linking target: nrf51422_xxac_s130.out
make[1]: Entering directory 'C:/Users/***/Desktop/SDK-Test/examples/peripheral/blinky/pca10028/s130/armgcc'
Preparing: nrf51422_xxac_s130.bin
Preparing: nrf51422_xxac_s130.hex
''
text data bss dec hex filename
1452 108 28 1588 634 _build/nrf51422_xxac_s130.out
''
make[1]: Leaving directory 'C:/Users/***/Desktop/SDK-Test/examples/peripheral/blinky/pca10028/s130/armgcc'
On it there is no problem.
Does anyone has an idea of what I have done wrong ?
Thanks for your help!