Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Variable "sec_mode" is used uninitialized at this location in the sourcecode

With IAR (EWARM) 8.50.9 the UART project in the SDK compiles fine.

After upgrading to IAR (EWARM) 9.10.1 or 9.10.2 I get compiler error:

 Error[Go029]: Variable "sec_mode" is used uninitialized at this location in the sourcecode. D:\2\IAR\nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart\main.c 156 

Any help on what the problem is?

Parents
  • Karl,

    Thanks for the reply, but this sounds like a bug in the UART example code?

    I do not understand why earlier versions of IAR compiled OK, and past 9.xx shows the error, but it sounds a fix in the code is needed?

    Regards

  • Renix said:
    Thanks for the reply

    No problem at all, I am happy to help!

    Renix said:
    I do not understand why earlier versions of IAR compiled OK, and past 9.xx shows the error, but it sounds a fix in the code is needed?

    Could it be that the newer version is compiling with a different optimization level, for example?
    Or could it be that the newer IAR version uses a different compiler, or different compiler version than the previous version? This should all be specified in the changelog for the newer version, if it is the case.

    Do I also understand you correctly that you have made no changes to the BLE UART example prior to running it with the newer IAR version, and suddenly getting this error?

    Best regards,
    Karl

Reply
  • Renix said:
    Thanks for the reply

    No problem at all, I am happy to help!

    Renix said:
    I do not understand why earlier versions of IAR compiled OK, and past 9.xx shows the error, but it sounds a fix in the code is needed?

    Could it be that the newer version is compiling with a different optimization level, for example?
    Or could it be that the newer IAR version uses a different compiler, or different compiler version than the previous version? This should all be specified in the changelog for the newer version, if it is the case.

    Do I also understand you correctly that you have made no changes to the BLE UART example prior to running it with the newer IAR version, and suddenly getting this error?

    Best regards,
    Karl

Children
No Data
Related