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

Nordic Libs not compatible with recent IAR version 8.x

I ran into the same problem as other user one year ago (I was using Arduino Studio nad Segger Studio before), now I switched to IAR (as recommended) and as the examples are provided for IAR but lead to linker errors because of the known 16bit (IAR 7) and 32Bit wchar_t size in 8.x.

... of them in dl7M_tlf.a and 12 other libraries have wchar_t size 32 bits

Please provide us also an SDK which can be used also with recent versions of IAR 8.x. A downgrade to 7.x is not possible.

Or provide hints/settings for IAR 8.x how the samples and libs can be used with IAR 8.x.

Here is the problem thread of another user with same issues.

I guess we are not the only ones. Is this solved meanwhile? I have at least not found a solution in the Q &A and forum yet.

https://devzone.nordicsemi.com/f/nordic-q-a/27260/linker-error-error-lt009-inconsistent-wchar_t-size

  • Hi,

    Which SDK version are you using and which specific libraries (path to binaries) do you see this problem with? The goal has been to build libraries with both 16 bit and 32 bit wchar_t, and this is at least the case for all crypto libraries. By default the 16 bit libraries suitable for IAR 7 is used in the example projects, so you have to update each project to use the 32 bit wchar_t libraries when you use IAR 8.

  • Thanks for the quick response:

    I'm using the latest lib from your site:

    nRF5_SDK_for_Thread_and_Zigbee_2.0.0

    and I'm trying to build the zigbee_light_switch example

    D:\mcdev\nordic\nRF5_SDK_for_Thread_and_Zigbee_2.0.0\examples\zigbee\light_control\light_switch

    The problem occurs in the "external" zigbee libs which seem to be 16bit wchar_t built libs and one of the libarary used is the lzboss.

    D:\mcdev\nordic\nRF5_SDK_for_Thread_and_Zigbee_2.0.0\external\zboss\lib\iar

    So for that, I guess no source is provided to rebuild it with wchar_t 32 bit right?

    What I did is to set the linker to ignore the lt009 error, but I don't think this is a proper solution.

    Is that sufficient info for giving more hints?

  • Hi,

    I would have expected that using the libraries for GCC would work (that has 32 bit wchar), but there seem to be a problem with it. While replacing the libzboss.ed.a nrf_radio_driver.a solves the whcar problem there is another problem with no definition for "__assert_func". I need to look more into it.

  • Hi,

    You need a new build of the library to fix this. I have registered this internally but I do not know when it will be done. If you don't have time to wait the alternative is to use another toolchain/IDE for now. (Segger Embedded Studio is an excellent choice in that case and it is can be used free of charge for all development where the target device is a Nordic Semiconductor product).

  • Hi,

    that is good news, that it will be addressed by Nordic! I have already tried Segger. The reason why I switched was because you provided the Zigbee samples as IAR Studio project and used the latest version which is 8.32.1.

    So if you would provide also two build of the libraries (where we as end user have not the source) for both: 16Bit and 32Bit, then a lot of people would be happy and you are future proven as I read the new standard for wchar_t is 32Bit.

    So please go ahead and take the time you need and provide 16 nad 32Bit in future SDK downloads.

    Thanks a lot and greetings from Austria!

    Heinz

Related