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

Release Build doesn't run; Debug build runs fine; SDK15.2; SES 3.52a

I am using SES 3.52a with SDK 15.0. ( I have a program based upon SDK14.1 from a year ago that was my starting point.)

In my current environment, my Debug config builds and runs just great. (Even when debugger is not attached!)

When I build the very same source files in the Release  config, I get no errors. The resultant hex image loads just fine and executes, but not correctly. In particular the SPIM0 does not recognize the ADC included in the design.(ie The SPI device just reads back zeroes.)

I saw the ticket in the past months that show an issue with SES and _putchar and retarget. But this version of SES already has that fixed in it.

I was wandering through the linker map earlier today and noticed that there are several items missing in the Release version of the maps. Of particular note was that SystemCoreClockUpdate, NVIC_SystemReset, and about half of the errata_xx stubbs in the linker are missing in the Release version. (Like they never even linked in, even though they are a part of the system_nrf52.c file.

I'm using the standard link file that came with Blinky.project. The only difference in the project file is in the  debug defines of the config section:

  <configuration
    Name="Release"
    c_preprocessor_definitions="NDEBUG"
    gcc_optimization_level="Optimize For Size" />
  <configuration
    Name="Debug"
    c_preprocessor_definitions="DEBUG; DEBUG_NRF"
    gcc_optimization_level="None" />

Any idea as to what is causing this anomaly? It's really frustrating to have to run all my code in debug mode.

any help would be handy.

Thanks,

Wayne

Related