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

802_15_4_lib_iar.a built from IAR 8

I am using IAR version 8.30.2 . When I try to build the example project is the nRF5_SDK_15.3.0_59ac345 for 802.15.4 for the wireless UART I get a build error:

wchar_t in 802_15_4_lib_iar.a was built with a size of 16-bits, The application file build with wchar_t of 32-bits. 

Ok - I have seen several posts about this issue. They recommend that the 802_15_4_lib_iar.a file be replaced with a version that was built with IAR 8 that would have a wchar_t width of 32-bits. My question is where can I get this updated 802_15_4_lib_iar.a file? I don't have access to the source code for this library to build it myself. Is it in a different SDK? Which one?

  • Hello,

    You may use the _gcc variant of the library in IAR 8. Excerpt from the SDK 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>.

    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\…”.
    - nrf_cc310, nrf_cc310_bl, and nrf_oberon:
    - IAR7: Link to a library where “short_wchar” is part of the folder name.
    - IAR8: Link to a library without “short_wchar” in part of the folder name.
    - Gazell, NFC Tag, and 802.15.4:
    - IAR7: Includes the library where the file name ends with “_iar”.
    - IAR8: Switch to using the library with similar file name that ends with “_gcc”.
    *****

  • Hello Vidar -

    Yes - I saw this post that you reference here. This is why I asked my question. My question is still valid. Specifically - the statement that you provide:

    - 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).

     Where can I find the 'IAR 8 compatible alternative' that is referenced? 

  • Hello,

    Sorry, but I'm not sure I understand the question then. The compatible alternative is "\nRF5_SDK_15.3.0_59ac345_new\components\802_15_4\raw\802_15_4_lib_gcc.a"

  • Ok - That looks like it worked. I guess I was expecting a file named 802_15_4_lib_iar.a that had built to be compatible with IAR 8. Sorry for the confusion.

    Thanks Vidar

Related