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

nRF52810 OTA DFU v17

I am trying to get an OTA DFU for nRF52810. I am not trying to get anything custom right now but only trying to prove that it works. I have tried going about this many different ways. 

  1. I built the project in IAR on SDK 17.0.2 and that project can't finish building because it has an inconsitent error for wchar_t size and it can't find the source files for uECC, even though I have all the preprocessor folder locations setup. 
  2. I use this case and I upload the precompiled bootloader hex and I can see the DFU_TARGET on the toolbox app but when I go to do a DFU, it starts downloading then it fails and I get a GATT error. 

So, both cases I am at a dead end. Any help on this would be great. 

I have tried to go through all of the steps for the DFU secure bootloader as well. Here

Parents
  • Hello,

    1. The uECC library located in \external\micro-ecc must be downloaded and compiled from source as Hung explains in this blog post. I have, however, included this library pre-compiled in the attachment below, so you may skip this step.

    You will also need to select the uECC library built for GCC to get the correct wchar_t size for IAR 8. Excerpt from SDK the 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:
     1. Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.
     2. 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).
     3. Save the project.
     4. 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 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”.

    2. The case you linked to is quite old, so  I made a new pre-compiled bootloader and dfu_package you can test with instead, please see attached.

    nRF5_SDK_17.0.2_d674dde_mod.zip

    The pre-compiled bootloader is placed in the following path : nRF5_SDK_17.0.2_d674dde_mod\examples\dfu\secure_bootloader_w_softdevice.hex and the DFU test zip is placed in nRF5_SDK_17.0.2_d674dde_mod\examples\dfu\secure_dfu_test_images\app_dfu_pkg.zip

  • Vidar, 

    Thank you so much. The new pre-compiled bootloader worked first time. 

    And that is all I needed. Thank you for doing the work to help. 

Reply Children
Related