Basic compiling

This is my first time working with a microcontroller and working with C as well, my only previous experience being C++ done in notepad on Linux. Currently I'm trying to just compile anything basic in Keil uVision. My current code is

#include <stdbool.h>
#include <stdint.h>

int main(void){

and on trying to build I get this error:

.\Objects\TestingProject.axf: Error: L6218E: Undefined symbol SystemInit (referred from arm_startup_nrf51.o). 
.\Objects\TestingProject.axf: Error: L6218E: Undefined symbol main (referred from __rtentry2.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\Objects\TestingProject.axf" - 2 Error(s), 0 Warning(s).
Target not created.

I've learned about include paths which was something I didn't know before, and I've included the paths from the Keil install folder under /ARMGCC/include which have stdbool.h and stdint.h. But it still seems like I need to include something or otherwise I've overlooked something in setup.

This question might be more C related than Keil or Nordic related, I don't know

No Data
  • Hi,

    I would recommend that you start out by following the getting started tutorial found here on DevZone. There is also a getting started page on the infocenter The infocenter contains technical documentation on all our products and software.

    Instead of creating your own project in Keil from scratch, I would recommend that you start with one of the example projects available in the SDK and build your application from this, for instance the blinky example.

    There are many more tutorials available here, which you can follow to learn more about programming Nordic chips and BLE applications.

    Good luck and best regards,


No Data