8 years, 7 months ago.

Exporting nrf51-DK project to Keil

I am trying to move my Mbed code to a custom nRF51822 board. My first step is to get the code to build in uVision and then try to get everything working with my J-Link. I have followed the mBed [instructions](https://developer.mbed.org/handbook/Exporting-to-uVision), but they are pretty sparse... They suggest that by exporting and unzipping, everything should just work. I exported to uVision4, as there is no 5 version. Then I opened the result in Keil, but when I try to build it, I get the loads of errors (see below):

https://devzone.nordicsemi.com/attachment/886f6f0b205c699d13b87ce23a782073

Should I do anything else? Why isn't this working for me? Any guidance much appreciated.

Update:

Having continued to work on this, I have updated the uVision packs and configured the debugger, to connect to my JLink. I now don't get the error, so I can complete a build, but I am still getting 700+ warning, which seem to mostly be "last line of file ends without a new line".

Should I have done anything to configure this as a C++ project rather than a C project?

Which example does generate 700+ warnings?

posted by Martin Kojtal 06 Sep 2015

It should compile with the warnings but won't with the one error you have. Which is you have exceeded the size for your version (prob evaluation which is 32K) You might want to try selecting 'one ELF section per function' in your project Options C/C++ under Uvision5 this will reduce your compiled file size considerably (This is unselected by default) Kind Regards PS you should investigate the warnings though as per Martin K's comment

posted by Martin Simpson 07 Sep 2015

Thanks, I am now only getting the warnings, I am using my own code, which built with no warnings on the mbed IDE.

posted by George Edwards 07 Sep 2015
Be the first to answer this question.