Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Optimization level cause to crash.

I am new to Segger Embedded Studio, I do a test on ble_app_template demo on nRFSDK_v16.0.0 on nRF52840 with S140. There are two configurations of the project, namely Debug and

Release. In Debug configuration, things go well. In Release configuraion,  application crash and show log below:

<info> app_timer: RTC: initialized.
<error> app: Fatal error
<warning> app: System reset

The reason is that sd_ble_gap_ppcp_set() return NRF_ERROR_INVALID_PARAM inside gap_params_init() function. When I change Release configuration to optimization level 0, it works well.

So it is the optimization level that cause the crash. Anyone know why?

Best regards!

Young

Parents
  • Hi,

    Which version of Segger Embedded Studio are you using? Seems like others have gotten similar errors when using too new SES version.

    We always recommend using the IDE/compiler version that the SDK was tested with, this is mentioned in the SDK release notes:

    nRF5 SDK v16.0.0
    ------------------------
    Release Date: October, 2019
    
    The following toolchains/devices have been used for testing and verification:
    
     - ARM: MDK-ARM version 5.25	
     - GCC: GCC ARM Embedded 7.2018q2.update
     - IAR: IAR Workbench 7.80.4
     - SES: SES 4.18

    Best regards,
    Jørgen

Reply
  • Hi,

    Which version of Segger Embedded Studio are you using? Seems like others have gotten similar errors when using too new SES version.

    We always recommend using the IDE/compiler version that the SDK was tested with, this is mentioned in the SDK release notes:

    nRF5 SDK v16.0.0
    ------------------------
    Release Date: October, 2019
    
    The following toolchains/devices have been used for testing and verification:
    
     - ARM: MDK-ARM version 5.25	
     - GCC: GCC ARM Embedded 7.2018q2.update
     - IAR: IAR Workbench 7.80.4
     - SES: SES 4.18

    Best regards,
    Jørgen

Children
Related