Error 4 nrf_sdh_ble_enable on release only

I seem to get error 4 on nrf_sdh_ble_enable when building and running the application in release mode.

Everything works perfectly when building in debug mode and I've checked all of the forum posts about RAM start and size it's the same between debug and release but when building the release, I get that error and nrf52 crashes.

Have anyone seen this issue before and how do I resolve it?

  • Hi,

    Are you sure that you did not change the RAM_START address in only Debug configuration and not in Release configuration? By default, the configs are set in the "Common" settings in the project config. The Release and Debug configs are set to inherit the value from the Common config.

    If you select the config, you should be able to see the inherited values:

    If you are not able to resolve it, please upload your .emProject file.

    Best regards,
    Jørgen

  • Hello Jorgen,

    Thank you for your quick reply.

    Please find below 2 screenshots of both release and debug which shows identical RAM_START and RAM_SIZE.

    They both inherit from common config which is why it's odd.

    Thank you so much for your help.

    Cheers,

    Joseph

  • Hi,

    Yes, it looks like they are inherited correctly.

    Could you upload the .emProject file here? That would reveal if there is any project configs that can explain what is happening.

    I would also recommend you to downgrade the SES version to the version used for testing and verification of the SDK release, mentioned in the release notes:

    nRF5 SDK v17.1.0
    ------------------------
    Release Date: August, 2021
    
    The following toolchains/devices have been used for testing and verification:
     
     - ARM: MDK-ARM version 5.25   
     - GCC: GCC ARM Embedded 9.2020-q2.major
     - IAR: IAR Workbench 7.80.4
     - SES: SES 5.42a

    Using the later SES v6.xx versions have shown issues related to application optimization before.

    Best regards,
    Jørgen

  • Hey Jorgen,

    Thank you for your reply and suggestion, turns out you're right.

    Downgrading to the version mentioned below has fixed my release build. it's weird that an updated version breaks stuff instead of fixing.

    But anyways i'll keep using 5.42a instead of the latest for now.

    Cheers,

    Joseph

  • Hey Jorgen,

    Not sure if I should post another ticket or just continue here, but it doesn't seem to output debug or show me the error on system crash when running it in debug mode.

    Any idea how to resolve that? i'm using 5.42a SES as suggested but I can't seem to get debug output nor see the assertion failed at what line and in what file. Also the call stack doesn't have all of the functions only the last two which is not enough to know why it crashed.

    Cheers,

    Joseph

Related