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

Problem with the bootloader start adress

Hii all I am trying to run bootloader_signing example from the gcc. Nordic already gave an example for Keil I wanted to port the same thing for gcc. But its not working, On verifcation I come to notice that there is problem with the start address of bootloader even though I changed in the linker script I'm attching my results Test results.rar I'm unable to find where the problem was. I am using nrf51 dk board and SDK9.0.0 can any one help me in this regards and this is the linker script that I'm using dfu_gcc_nrf51.ld

Parents
  • Hi,

    I have a similar issue. After changing the linker script and adding the macro SIGNING to the makefile is was able to launch the signing bootloader. But when I try to upload the new firmware 'dfu_init_prevalidate' always returns NRF_ERROR_SVC_HANDLER_MISSING. I tried SDK v10 and v11 but the problem stays the same.

    I used the following commands to flash the code

    nrfjprog -e
    nrfjprog --program s110_nrf51_8.0.0_softdevice.hex
    nrfjprog --program nrf51422_xxac_s110.hex
    nrfjprog --program nrf_sec.hex
    
  • This is the ported code for Security_SVC_Handler

    void __attribute__ (( naked )) Security_SVC_Handler(void)
    

    { const uint32_t sec_svc_handler = 0x0003DC00; const uint32_t svcall_irq_offset = 0x2c;

    __asm volatile(
    		"mov r2,%0\t\n"
    		"add r2,r2,#44\t\n"
    		"ldr r2,[r2]\t\n"
    		"bx r2\t\n"
    		".align\t\n"
    		:: "r" (sec_svc_handler), "r" (svcall_irq_offset)
    		: "r2"
    		);
    

    }

Reply Children
No Data
Related