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

nrf52 Bootloader_secure_ble

Hello, I am using nrf52 with sdk 13.0.0. Bootloader_secure_ble gives error while compiling. What should I do ?

        Error[Lt009]: Inconsistent wchar_t size 
        micro_ecc_lib_uECC.c.o(micro_ecc_lib_nrf52.a) has wchar_t size 16 bits 
        app_error_weak.o and 66 other objects have wchar_t size 32 bits 
Parents
  • @hhuseyin: Just discussed this with one of our SW developers and according to him you need to use IAR v7.x as there are many changes, described here, that are not compatible with our SDK yet, i.e. will be in a future release. So, for now, stay with IAR v7.x and disregard my previous comment. Removing the -fshort-wchar flag may remove the linker errors, but we cant guarantee that the rest of the SDK source will behave as it is intended to with v8.x.

  • Unfortunately, we do not have any documentation other than the cases reported here on DevZone. We're working on updating our build system to a newer version of IAR, but I cannot give you any ETA on this. So, my suggestion would be to try to downgrade the IAR version, if that is not possible then try searching for solutions on DevZone. If you cant find the solution for a issue here on DevZOne then you can contact us through our MyPage system and then we'll try to look through our internal support system.

  • Bjørn, I'm on SDK15 but with IAR 8.20.2.  IAR 8 has taken me from simple examples to adding multiple instances of ble_nus and single instance ble_nus_c to the hrscs_relay example and but for DFU I have an MVP.  I'd like to report that 8.20.2 works well with SDK15.

    Does the internal report system have any additional notes on IAR 8.20 and the need to remove -short-wchar from the micro-ecc Makefile?   I have the same issue as Chris does if I don't remove -short-wchar, that is, a fatal link error complaining about micro-ecc's 16 bit wchar_t and IAR's 32 bit wchar_t.

    Thank you, Howard

Reply
  • Bjørn, I'm on SDK15 but with IAR 8.20.2.  IAR 8 has taken me from simple examples to adding multiple instances of ble_nus and single instance ble_nus_c to the hrscs_relay example and but for DFU I have an MVP.  I'd like to report that 8.20.2 works well with SDK15.

    Does the internal report system have any additional notes on IAR 8.20 and the need to remove -short-wchar from the micro-ecc Makefile?   I have the same issue as Chris does if I don't remove -short-wchar, that is, a fatal link error complaining about micro-ecc's 16 bit wchar_t and IAR's 32 bit wchar_t.

    Thank you, Howard

Children
  • HI Howard, please refer this section of the SDK v15.0.0 Release Notes

    Note for IAR 8 users:
    Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits.
    To run a project using IAR 8, follow these intructions:
     - Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.
     - If the project contains one of the precompiled libraries listed below, replace it with the IAR 8 compatible alternative
       (there are no projects targeting nRF51 in this SDK).
     - Save the project.
     - When building the project, you might get the warning: "The header file 'cmsis_iar.h' is obsolete and should not be used. ....".
       The problem is described in DevZone post: devzone.nordicsemi.com/.../iar-ewarm-8-22-1-complains-about-cmsis_iar-h
       The solution is to remove all occurrences of #include <cmsis_iar.h>.

  • Hello Howard,

    I had the same problem, then the SDK v15.2.0 Release Notes helped me:

    " Note for IAR 8 users: (Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits).

    To run a project using IAR 8, follow these intructions:

    - Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.

    - If the project contains one of the precompiled libraries listed below, replace it with the IAR 8 compatible alternative (there are no projects targeting nRF51 in this SDK).

    - Save the project.

    - When building the project, you might get the warning: "The header file 'cmsis_iar.h' is obsolete and should not be used. [...]".

    - The problem is described in DevZone post: devzone.nordicsemi.com/.../iar-ewarm-8-22-1-complains-about-cmsis_iar-h The solution is to remove all occurrences of #include <cmsis_iar.h>.

    The affected libraries are:

    - micro-ecc crypto:

    • IAR7: Includes library located in the folder named “…_iar\…”.
    • IAR8: Switch to using the library from the folder named “…_armgcc\…

    "

    I've simply cross-compiled "_armgcc\"  and switched the library and all seems to work correctly.

Related