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

Signing update rejected

When i try to do an update with Nrfutils Under android i get a REMOTE_DFU_OPERATION_FAILED since i added signing.

I created my pem file key with nrfutil.exe keys i copied Qx and Qy in my dfu_init_template_signing.c i modified Makefile to use dfu_init_template_signing.c instead of dfu_init_template.c i signed my update with my pem file key

Parents
  • Hi Fabien,

    I have attached a modified version of the nRF5 SDK v11.0.0, where I have ported the DFU with signing example from nRF52 SDK v0.9.2.

    -Bjørn

    Attachments:

    nRF5_SDK_v11_0_0_nrf52_dfu_signing_290316.zip (DFU with signing example)

  • Hello, I try to re open this question :-)

    I just thinked, NRFSEC_SETTINGS and NRFSEC_MODULE are specifics. Is there somewhere to set them in code ?

    This is my linker configuration (in ld file)

          FLASH (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	SOFT_DEVICE (rw) : ORIGIN = 0x00000000, LENGTH = 0x1C000
    	
       /** slot 1 */
    	SLOT_1 (rw) : ORIGIN = 0x0001C000, LENGTH = 0x2C400
    	
      /** slot 2 */
    	SLOT_2 (rw) : ORIGIN = 0x00048400, LENGTH = 0x2C400
    	
      	/** Location of application data */
    	APPLICATION_DATA (rw) : ORIGIN = 0x00074800, LENGTH = 0x1000
      
      /** Flash start address for the bootloader. This setting will also be stored in UICR to allow the
       *  MBR to init the bootloader when starting the system. This value must correspond to 
       *  BOOTLOADER_REGION_START found in dfu_types.h. The system is prevented from starting up if 
       *  those values do not match. The check is performed in main.c, see
       *  APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
       */
      BOOTLOADER (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	/** Location of mbr params page in flash. */
      MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007B800, LENGTH = 0x1000
      
      /** Location of bootloader setting in flash. */
      BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007C800, LENGTH = 0x1000
      
      /** Update signing module */
      NRFSEC_SETTINGS (rw) : ORIGIN = 0x0007D800, LENGTH = 0x400
      NRFSEC_MODULE (rw) : ORIGIN = 0x0007DC00, LENGTH = 0x2400
    
      /** RAM Region for bootloader. This setting is suitable when used with s132. */ /* see in app_ram_base.h APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW */
      RAM (rwx) :  ORIGIN = 0x20002F50, LENGTH = 0xD030
    
      /** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information
       *  from application to bootloader when using buttonluss DFU OTA. 
       */
      NOINIT (rwx) :  ORIGIN = 0x2000FF80, LENGTH = 0x80
    
      /** Location in UICR where bootloader start address is stored. */
      UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
        
      /** Location in UICR where mbr params page address is stored. */
      UICR_MBR_PARAM_PAGE(r) : ORIGIN = 0x10001018, LENGTH = 0x04
    
Reply
  • Hello, I try to re open this question :-)

    I just thinked, NRFSEC_SETTINGS and NRFSEC_MODULE are specifics. Is there somewhere to set them in code ?

    This is my linker configuration (in ld file)

          FLASH (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	SOFT_DEVICE (rw) : ORIGIN = 0x00000000, LENGTH = 0x1C000
    	
       /** slot 1 */
    	SLOT_1 (rw) : ORIGIN = 0x0001C000, LENGTH = 0x2C400
    	
      /** slot 2 */
    	SLOT_2 (rw) : ORIGIN = 0x00048400, LENGTH = 0x2C400
    	
      	/** Location of application data */
    	APPLICATION_DATA (rw) : ORIGIN = 0x00074800, LENGTH = 0x1000
      
      /** Flash start address for the bootloader. This setting will also be stored in UICR to allow the
       *  MBR to init the bootloader when starting the system. This value must correspond to 
       *  BOOTLOADER_REGION_START found in dfu_types.h. The system is prevented from starting up if 
       *  those values do not match. The check is performed in main.c, see
       *  APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
       */
      BOOTLOADER (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	/** Location of mbr params page in flash. */
      MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007B800, LENGTH = 0x1000
      
      /** Location of bootloader setting in flash. */
      BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007C800, LENGTH = 0x1000
      
      /** Update signing module */
      NRFSEC_SETTINGS (rw) : ORIGIN = 0x0007D800, LENGTH = 0x400
      NRFSEC_MODULE (rw) : ORIGIN = 0x0007DC00, LENGTH = 0x2400
    
      /** RAM Region for bootloader. This setting is suitable when used with s132. */ /* see in app_ram_base.h APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW */
      RAM (rwx) :  ORIGIN = 0x20002F50, LENGTH = 0xD030
    
      /** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information
       *  from application to bootloader when using buttonluss DFU OTA. 
       */
      NOINIT (rwx) :  ORIGIN = 0x2000FF80, LENGTH = 0x80
    
      /** Location in UICR where bootloader start address is stored. */
      UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
        
      /** Location in UICR where mbr params page address is stored. */
      UICR_MBR_PARAM_PAGE(r) : ORIGIN = 0x10001018, LENGTH = 0x04
    
Children
No Data
Related