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,

    This is what IAR is saying..

    1. Please see the 2 .ewp files for 8.50.9 and 9.10.2 for your project attached.
    2. There are several differences between the 2 releases. The major difference related to your case
    is that  9.10.2 don't support any Misra98 or Misra 2004 as 8.50.9.
    3. The other thing is the EMbeddedTrust setting is different.
    4. None of these changes explain the error since my understanding is Misra C 98/04 are disabled in your 8.50.9
    project as well as EmbeddedTrust.
    5. I will send all this information to IAR back office and wait for thier response.

  • Hello again,

    Renix said:
    This is what IAR is saying..

    Thank you for informing me!

    Renix said:
    2. There are several differences between the 2 releases. The major difference related to your case
    is that  9.10.2 don't support any Misra98 or Misra 2004 as 8.50.9.
    Renix said:
    4. None of these changes explain the error since my understanding is Misra C 98/04 are disabled in your 8.50.9

    Could it be that the type of variable declaration (populating it through the macro) if not recognized by the IAR compiler anymore, if it originally came from the now unsupported MISRA C standards?
    I think something like this might be the case.

    Renix said:
    I will send all this information to IAR back office and wait for thier response.

    I look forward to hearing their response on this! :)

    Best regards,
    Karl

Reply
  • Hello again,

    Renix said:
    This is what IAR is saying..

    Thank you for informing me!

    Renix said:
    2. There are several differences between the 2 releases. The major difference related to your case
    is that  9.10.2 don't support any Misra98 or Misra 2004 as 8.50.9.
    Renix said:
    4. None of these changes explain the error since my understanding is Misra C 98/04 are disabled in your 8.50.9

    Could it be that the type of variable declaration (populating it through the macro) if not recognized by the IAR compiler anymore, if it originally came from the now unsupported MISRA C standards?
    I think something like this might be the case.

    Renix said:
    I will send all this information to IAR back office and wait for thier response.

    I look forward to hearing their response on this! :)

    Best regards,
    Karl

Children
No Data
Related