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

Bootloader problem in gcc eclipse

I am working the signed image signing by taking the bootloader example in examples\dfu\experimental\bootloader_signing of SDK9.0.0 when I compiled in the Keil and flash on to the board its working fine. But when I created a make file to run in eclipse and flash onto the board its advertising as dfutarg(well). But when I'm trying to do dfu it gives an error like "Error on Init Packet Message:Operation failed" can any one advice where may be the problem

I'm using nrf51 DK board and SDK9.0.0 softdevice and nrf tool box for doin dfu thanx all

Parents
  • Hi, have you loaded the ECC module to flash? Otherwise the call to nrf_sec_svc_verify() will not work, and therefore fail the pre-validation step. Note that we have not tested this particular example with GCC yet.

  • The way it works is when nrf_sec_svc_verify() is called you're in reality passing a SVC number(and the arguments of nrf_sec_svc_verify()) SVC_Handler in dfu_ble_svc.c which based on this number branches to the address in flash where this function is defined( like sd_ -functions). If the SVC number is equal to 8 the SVC_Handler will branch to Security_SVC_Handler(), which in turn will branch to the nrf_sec module.

    However, Security_SVC_Handler()has only been defined for the ARM compiler(__CC_ARM) and not GCC.

    You'll have to port Security_SVC_Handler() from ARM to GCC and modify the GCC SVC_Handler() so that it branches to Security_SVC_Handler() if the SVC number is equal to 8

Reply
  • The way it works is when nrf_sec_svc_verify() is called you're in reality passing a SVC number(and the arguments of nrf_sec_svc_verify()) SVC_Handler in dfu_ble_svc.c which based on this number branches to the address in flash where this function is defined( like sd_ -functions). If the SVC number is equal to 8 the SVC_Handler will branch to Security_SVC_Handler(), which in turn will branch to the nrf_sec module.

    However, Security_SVC_Handler()has only been defined for the ARM compiler(__CC_ARM) and not GCC.

    You'll have to port Security_SVC_Handler() from ARM to GCC and modify the GCC SVC_Handler() so that it branches to Security_SVC_Handler() if the SVC number is equal to 8

Children
Related