Problem with reprogramming STM32 using J-Link with IAR Workbench V5.1

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Problem with reprogramming STM32 using J-Link with IAR Workbench V5.1

    I have been successfully debugging a board with an STM32 Cortex M3 processor using J-Link with IAR for ARM V5.1 but today, it suddenly failed to load the Flash Loader and, despite resetting everything, I cannot erase or reprogram the device. I have tried to use the demo version of J-Flash but it cannot see the STM32 on my board. Do you have any means of erasing the device?

    EDIT: I should add that I am using JTAG for the debug link and that the same thing has just happened on a second board which I started to use after writing this post; this board programmed fine the first time then, using the same code locked up.

    Here is the Debug Log:

    Tue Aug 19 16:12:35 2008: DLL version: V3.78b, compiled Dec 10 2007 17:56:48
    Tue Aug 19 16:12:35 2008: Firmware: J-Link ARM V6 compiled Jul 30 2008 11:24:59
    Tue Aug 19 16:12:35 2008: JTAG speed is initially set to: 32 kHz
    Tue Aug 19 16:12:35 2008: TotalIRLen = 9, IRPrint = 0x0011
    Tue Aug 19 16:12:35 2008: TotalIRLen = 9, IRPrint = 0x0011
    Tue Aug 19 16:12:36 2008: Found Cortex-M3, Little endian.
    Tue Aug 19 16:12:36 2008: TPIU fitted.
    Tue Aug 19 16:12:36 2008: FPUnit: 6 code (BP) slots and 2 literal slots
    Tue Aug 19 16:12:36 2008: Software reset was performed
    Tue Aug 19 16:12:36 2008: Initial reset was performed
    Tue Aug 19 16:12:36 2008: J-Link found 2 JTAG devices. ARM core Id: 3BA00477
    Tue Aug 19 16:12:36 2008: Device at TAP0 selected
    Tue Aug 19 16:12:37 2008: 5780 bytes downloaded and verified (4.76 Kbytes/sec)
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C00, target byte: 0x8C, byte in file: 0x20
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C01, target byte: 0x05, byte in file: 0x20
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C02, target byte: 0x3F, byte in file: 0x20
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C03, target byte: 0x05, byte in file: 0x20
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C04, target byte: 0x1A, byte in file: 0x20
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C05, target byte: 0x05, byte in file: 0x41
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C06, target byte: 0x75, byte in file: 0x6C
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C07, target byte: 0x05, byte in file: 0x6C
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C08, target byte: 0x27, byte in file: 0x6F
    Tue Aug 19 16:12:37 2008: Warning:
    Verify error at address 0x20000C09, target byte: 0x07, byte in file: 0x77
    Tue Aug 19 16:12:37 2008: Fatal error: There were warnings during download of FLASH loader, see Log Window

    Session aborted!
    Tue Aug 19 16:12:41 2008: Failed to load flash loader: C:\Program Files\IAR Systems\Embedded Workbench 5.0\ARM\config\flashloader\ST\FlashSTM32F10x.out


    Regards,

    Richard Gunn

    The post was edited 2 times, last by RichardGunn ().

  • It seems that you loaded a bad code in your boards. So to recover them you need to boot from RAM(if i's possible) then load any working example.
    With the latest version of EWARM5.20, you don't need to boot from RAM, you need just to setup the Reset type to core and peripherals and it will work fine.