Skip to main content
Visitor II
December 12, 2018
Question

How to overcome flash download problem (CPU data abort) using ST-Link V3 and IAR workbench?

  • December 12, 2018
  • 4 replies
  • 2697 views

I am able to connect in SWD mode and debug target hardware but am unable to flash images to target by overriding Flash loader with my .board file in "Debugger->Download" option

Keep getting following warnings and no flash download occurs:

Wed Dec 12, 2018 11:06:42: Warning: Write failed (CPU data abort) at Memory address 0x40023C04 

Wed Dec 12, 2018 11:06:43: Warning: Write failed (CPU data abort) at Memory address 0x40023C04 

Wed Dec 12, 2018 11:06:43: 7392 bytes downloaded (77.62 Kbytes/sec) 

Wed Dec 12, 2018 11:06:43: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\ST\FlashSTM32F77xx_256.out 

Wed Dec 12, 2018 11:06:43: Target reset 

Wed Dec 12, 2018 11:06:44: Warning: Write failed (CPU data abort) at Memory address 0x2001EFA8 

Wed Dec 12, 2018 11:06:46: Warning: Write failed (CPU data abort) at Memory address 0x2001EF94

    This topic has been closed for replies.

    4 replies

    Visitor II
    May 1, 2022

    Did you ever solve this? It's driving me nuts. It's random, and it seems like if I just keep trying, completely powering down my device and unhooking the STLink, then it eventually works.

    Graduate II
    May 1, 2022

    Almost certainly different drivers and firmware at this point.

    What STM32 model are you working with? Same STM32F77x of the OP ?

    Version of IAR?

    Might want to back-off the frequency of the SWD clock could be dropped.

    Double check quality of USB cable.

    Visitor II
    May 1, 2022

    It's an 32F215RET6. I've flashed it many times, always with some quirkiness, but now I can't seem to get it to go no matter how many times I try.

    Good thought about the USB cable. I was using an older one, but I swapped it out for a new one that I know works.

    The IAR version is 8.42.2. There's some inertia to overcome to get my team to upgrade. I know it's old, but again, it's worked many times.

    ** UPDATE, GOT IT WORKING **

    I rebooted many times to no avail. Shutting down, unplugging my computer from my docking station, and unplugging my docking station seems to have corrected things. And yes, I tried plugging directly into a USB port on the laptop. Touchy stuff!

    *** UPDATE 2, NOPE ***

    Well, I managed to flash it once. Now, when I try again, it's the same thing. I don't have it in me right now to try shutting down and unplugging everything again, so I guess I'll try again later.

    Visitor II
    May 1, 2022

    Here's the log. Note that I don't have any breakpoints set.

    Sat Apr 30, 2022 19:30:32: IAR Embedded Workbench 8.42.2 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armproc.dll) 
    Sat Apr 30, 2022 19:30:32: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\debugger\ST\STM32F2xx.dmac 
    Sat Apr 30, 2022 19:30:32: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F2xxxx.mac 
    Sat Apr 30, 2022 19:30:37: Connected to ST-LINK/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J39.S7 (Probe no: 36FF71065648343845530543) 
    Sat Apr 30, 2022 19:30:37: Hardware reset with strategy 0 was performed 
    Sat Apr 30, 2022 19:30:37: Initial reset was performed 
    Sat Apr 30, 2022 19:30:37: 992 bytes downloaded (12.42 Kbytes/sec) 
    Sat Apr 30, 2022 19:30:37: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F2xxxx.out 
    Sat Apr 30, 2022 19:30:37: Target reset 
    Sat Apr 30, 2022 19:30:40: Warning: Write failed (CPU data abort) at Memory address 0x2001EF98 
    Sat Apr 30, 2022 19:30:40: Warning: Write failed (CPU data abort) at Memory address 0x2001EF84 
    Sat Apr 30, 2022 19:30:40: Failed to set breakpoint at 0x200000C4 (out of breakpoints?) 
    Sat Apr 30, 2022 19:30:40: Failed to set breakpoint: Driver error. 
    Sat Apr 30, 2022 19:36:22: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F2xxxx.mac 
    Sat Apr 30, 2022 19:36:23: IAR Embedded Workbench 8.42.2 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armproc.dll) 

    Visitor II
    May 10, 2022

    Following up, what ultimately solved this for me is disassembling my device and reseating all connections. I'm a software person, so I hadn't thought of that. To a hammer, every problem looks like a nail. I assumed it was a software configuration problem.