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

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){
	return;
}

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

Related