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

Secure DFU ble debug code

hello

I am using sdk 15.3 example code of DFU (secure_boot loader \ pca10040_ble)

I want to debug code but i can not.I getting error like that "Error Flash Download Failed - Cortex-m4"

I am using s132_nrf52_6.1.1_softdevice .i have using nrf52832 board and Compiler Keil 5

Also i have setting address of IROM1 = 0x78000 and Size 0x6000,  IRAM1 =0x200057B8 and size 0xa848.

Please help me to resolve these query

Parents Reply Children
  • Hello 

    I am also done with Full chip erase but still we found same issue.

    please refer attachment file this is log file of flash

    //*****************************************Log File ***************************************************//Log file of flash

    *** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'nrf52832_xxaa_s132'
    compiling nrf_bootloader_app_start_final.c...
    linking...
    Program Size: Code=28552 RO-data=2296 RW-data=188 ZI-data=25912
    FromELF: creating hex file...
    ".\_build\nrf52832_xxaa_s132.axf" - 0 Error(s), 0 Warning(s).
    Build Time Elapsed: 00:00:03
    Load "D:\\CurrentProject\\Nordic_Common_Code\\SoftDevice\\nRF5_SDK_15.3.0_59ac345\\bkup\\nRF5_SDK_15.3.0_59ac345\\examples\\dfu\\secure_bootloader\\pca10040_ble\\arm5_no_packs\\_build\\nrf52832_xxaa_s132.axf"
    Error: Flash Download failed - Target DLL has been cancelled
    Flash Load finished at 13:51:02
    Load "D:\\CurrentProject\\Nordic_Common_Code\\SoftDevice\\nRF5_SDK_15.3.0_59ac345\\bkup\\nRF5_SDK_15.3.0_59ac345\\examples\\dfu\\secure_bootloader\\pca10040_ble\\arm5_no_packs\\_build\\nrf52832_xxaa_s132.axf"
    Set JLink Project File to "D:\CurrentProject\Nordic_Common_Code\SoftDevice\nRF5_SDK_15.3.0_59ac345\bkup\nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_ble\arm5_no_packs\JLinkSettings.ini"
    * JLink Info: Device "NRF52832_XXAA" selected.

    JLink info:
    ------------
    DLL: V6.40 , compiled Oct 26 2018 15:06:02
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
    Hardware: V1.00
    S/N : 681936529

    * JLink Info: Found SW-DP with ID 0x2BA01477
    * JLink Info: Found SW-DP with ID 0x2BA01477
    * JLink Info: Scanning AP map to find all available APs
    * JLink Info: AP[2]: Stopped AP scan as end of AP map has been reached
    * JLink Info: AP[0]: AHB-AP (IDR: 0x24770011)
    * JLink Info: AP[1]: JTAG-AP (IDR: 0x02880000)
    * JLink Info: Iterating through AP map to find AHB-AP to use
    * JLink Info: AP[0]: Core found
    * JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
    * JLink Info: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    * JLink Info: Found Cortex-M4 r0p1, Little endian.
    * JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
    * JLink Info: CoreSight components:
    * JLink Info: ROMTbl[0] @ E00FF000
    * JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    * JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    * JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    * JLink Info: ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    * JLink Info: ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    * JLink Info: ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    ROMTableAddr = 0xE00FF000
    * JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
    * JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

    Target info:
    ------------
    Device: nRF52832_xxAA
    VTarget = 3.300V
    State of Pins:
    TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1
    Hardware-Breakpoints: 6
    Software-Breakpoints: 8192
    Watchpoints: 4
    JTAG speed: 1000 kHz

    Erase Failed!
    Error: Flash Download failed - "Cortex-M4"
    Flash Load finished at 13:53:46

  • Hi,

    The IC does not have a JTAG interface, only SWD. Maybe that's why the erase fails. Check if "SW" is selected in the Jlink settings. 

  • Hello 

    I am already set SW in Setting 

    Please Refer attachment file.

    jtag setting

  • That is strange. Are you able to program and debug other SDK examples? Have you tried to program the same hex with nrfjprog?

  • Before one year ago i had use in sdk 10 example that is working fine

    yup if we are using hex file then it's loded successfully.

    in my application already we have using in BLE dfu , It;s Working Fine

    But i want to make BLE + UART dfu that's why i needed Debugging code.

Related