This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SDK12 DFU service

Hi,

Trying to add DFU service on the new SDK, but when compiling getting this:

compiling nrf_dfu_flash.c...
..\..\..\..\..\..\components\libraries\bootloader\dfu\nrf_dfu_flash.c(173): error:  #136: union "<unnamed>" has no field "p_data"
                      .p_data = p_dest
..\..\..\..\..\..\components\libraries\bootloader\dfu\nrf_dfu_flash.c(247): error:  #136: union "<unnamed>" has no field "last_page"
                      .last_page = ((uint32_t)p_dest / CODE_PAGE_SIZE)
..\..\..\..\..\..\components\libraries\bootloader\dfu\nrf_dfu_flash.c: 0 warnings, 2 errors
compiling nrf_dfu_settings.c...
..\..\..\..\..\..\components\libraries\bootloader\dfu\nrf_dfu_settings.c(144): error:  #20: identifier "NRF_DFU_SETTINGS_VERSION" is undefined
      s_dfu_settings.settings_version = NRF_DFU_SETTINGS_VERSION;
..\..\..\..\..\..\components\libraries\bootloader\dfu\nrf_dfu_settings.c: 0 warnings, 1 error
compiling nrf_log_backend_serial.c...

Any idea?

Parents
  • Had to add a name to the union as it seems like anonymous union is not supported:

    typedef struct
    {
        fs_evt_id_t id;                         //!< The event ID.
        void *      p_context;                  //!< User-defined context passed to the interrupt handler.
        union
        {
            struct
            {
                uint32_t const * p_data;        //!< Pointer to the data stored in flash.
                uint16_t         length_words;  //!< Length of the data, in 4-byte words.
            } store;
            struct
            {
                uint16_t first_page;            //!< First page erased.
                uint16_t last_page;             //!< Last page erased.
            } erase;
        } un;  <--------added name here
    } fs_evt_t;
    
  • Updated to v5.21 and im not seeing any issue. Could you attach the application project that you're trying to add DFU support to?

Reply Children
No Data
Related