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

nRF52810 DFU attempt #2

I'm trying to set up DFU for a custom board with a nRF52810 module (Rigado BMD-330).  I created the secure bootloader from the recent project for SDK 15 posted by Vidar Berg.  All seems to be working and I can connect to the DFUTARG.  The DFU download works .... once.  I discovered I need to add the buttonless DFU service to my application in order to  switch from the application back to the bootloader if I want to support multiple DFUs.

I started this task using the guidelines on the infocenter and with the buttonless DFU example, only to find I'm getting compile errors from nrf_dfu_types.h.  This is looking for  NRF52 defined or I get: #error "Architecture not set."  However, my application followed the PCA10040e path and does not use the NRF52 flag and also uses gcc_startup_nrf52810.S and system_nrf52810.c versus gcc_startup_nrf52.S and system_nrf52.c ..... which seems the right thing to do for nRF52810 development and the app without DFU service is running nicely.   I attempted to add the NRF52 flag and as you might expect that resulted in linker errors.

I don't know how to resolve this ..... if it even can be resolved.  It seems rather ugly at this point. 

Any suggestions?  I know there's working example of nRF52810_S112 buttonless DFU service for SDK 14.2 but I'd like to stick with SDK 15 if possible.  I'd be happy to beta test a SDK 15 buttonless DFU service for the nRF52810. 

Thanks,  Max

 

Parents
  • Hi Max,

    I saw the same problem when I made the bootloader project. The pre-processor check in dfu_types.h does not include check for NRF52810_XXA, which is why you get the "Architecture not set." error. 

    Here is the change I made: 

    diff --git a/components/libraries/bootloader/dfu/nrf_dfu_types.h b/components/libraries/bootloader/dfu/nrf_dfu_types.h
    index 5ccd290..db6b918 100644
    --- a/components/libraries/bootloader/dfu/nrf_dfu_types.h
    +++ b/components/libraries/bootloader/dfu/nrf_dfu_types.h
    @@ -72,7 +72,7 @@ extern "C" {
      */
     #if defined(NRF51)
         #define CODE_PAGE_SIZE            (PAGE_SIZE_IN_WORDS * sizeof(uint32_t))
    -#elif defined(NRF52) || defined(NRF52840_XXAA)
    +#elif defined(NRF52) || defined(NRF52840_XXAA) || defined(NRF52810_XXAA)
         #define CODE_PAGE_SIZE            (MBR_PAGE_SIZE_IN_WORDS * sizeof(uint32_t))
     #else
         #error "Architecture not set."
    diff --git a/components/libraries/bootloader/nrf_bootloader_app_start_final.c b/components/libraries/bootloader/nrf_bootloader_app_start_final.c
    index a818322..dde759b 100644

  • Thanks Vidar,

    I'll give that a try.

    I also found some guidance and updated files at:

    https://devzone.nordicsemi.com/f/nordic-q-a/27185/52810-how-to-use-dfu 

    I'll let you know how it goes.

    Max

Reply Children
No Data
Related