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

Warning Message in ble_app_uart building like wchar_t length mismatch

Hi After building ble_app_uart in Nordic SDK with board pca10028 it gives some warning like

/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: warning: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/lib/armv6-m/libc_nano.a(lib_a-nano-msizer.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

  • Is this warning the only kind of warning that you get?

    The warning you have posted has to do with two possible definitions of wchar_t (16 bit or 32 bit), and the potential for errors when linking libraries that are compiled with differing wchar_t definitions. As far as I know the wchar_t type is not used by neither SoftDevice nor SDK, and ignoring any wchar_t related warning should be safe.

    However, it may be a good idea to figure out why you get this inconsistency in the first place. What OS and version do you use, and what version of SDK and SoftDevice?

  • Try to remove "nano.specs" the LDFLAGS in makefile

    //LDFLAGS += --specs=nano.specs -lc -lnosys
    LDFLAGS += -lc -lnosys

Related