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

Soft Device + Application flash doesn't work with Eclipse

Hello all,

I struggle to program nrf52 on Eclipse, and it works fine with Keil. Let me explain :

With Keil :

-I first flash softdevice 5.0 manually with JFlash Lite

-I flash my code with Keil,

it works fine. I can flash a merged hex file and my code after that, it is okay, my code is running

With Eclipse :

My code compiles (the same code), but if I flash the same softdevice, and my code, my code is not running.

I checked my project ld file and .map file : all is okay (i.e : same parameters in Keil),  my code starts at 0x23000

I am running out of ideas... Any help?

Thank you!

Parents
  • UPDATE : I found out what is going on : I am using the default .ld file provided in an SDK example and the FLASH lenght was specifed to 5D000, wich is too much : I had data around 0x39000 which were corrupted. When I specify Keil parameter (0x15000), my code doesn't compile anymore! I am facing flash overflow! Now I know Keil was performing size optimisation I have to tell gcc to do. (because in Keil, the code compiles)

    I set the same Optimisation level as Keil (O2) but I don't know how to tell gcc to use microlib library.

    Could someone help please? 

  • Well, what is your nRF52 chip ? The nRF52832 has 512KB flash which 0x80000.  The firmware starts at 0x23000 which gives you the length 0x80000 - 0x23000 = 0x5D000 size. 0x15000 is only 86KB, way too small.  The nRF52810 has 256KB Flash if I remember. 

Reply Children
Related