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 
  • How are you compiling the bootloader project? Are you using Keil, GCC, IAR? Have you followed the compile instructions stated in the Cryptographic Library documentation?

  • I am using IAR. After I create public_key.c, I copy it to dfu_public_key.c in the dfu_req_handling folder. I get this error image description image description image description

  • I'm waiting for your answer

  • @hhuseyin: I apologize for my late reply, I was out of office on travel last week. Are you using the IAR v8.10 or v8.11? If so you need to modify the Makefile in external\micro-ecc\nrf52_iar\armgcc to not use the -fshort-wchar flag, i.e. line 32 in the Makefile should look like this

    CFLAGS += -fno-builtin --short-enums 
    

    This is because IAR v7.x set wchar_t size 2 bytes(16bits), but v8.x sets it to 4 bytes(32bits) so by removing the -fshort-wchar flag you set the size to 4 bytes.

  • @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.

1 2 3 4 5