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

Keil nrf51 SDK example won't compile - 32k limit

I try to build example projects in 32k limit Keil uVision. I'm not able to build some of the projects (e.g. Heart Rate Service) because of the 32k limit for the compiler.

It seems nfr51 SDK provided libraries (softdevice etc) count towards the limit.

What are the possibilities? I'm newbie in Keil. Should I precompile the SoftDevice, etc. library and link it statically to my application project?

Or is the only option to build even small 16k application (I count only my application code, not SoftDevice size) to buy expensive Keil license?

Parents
  • The softdevice does not count towards the limit - no. Only application code counts. The compiler has no idea at all that there even is a softdevice, it doesn't link it in, doesn't count in any way.

    So yes your options are stick below 32k, buy a Keil license or use a different compiler (like gcc from the command line or Crossworks is what I use, cost but cheaper).

Reply
  • The softdevice does not count towards the limit - no. Only application code counts. The compiler has no idea at all that there even is a softdevice, it doesn't link it in, doesn't count in any way.

    So yes your options are stick below 32k, buy a Keil license or use a different compiler (like gcc from the command line or Crossworks is what I use, cost but cheaper).

Children
Related