Can't get JLINK working on new install on Windows 8, IAR

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

  • Can't get JLINK working on new install on Windows 8, IAR

    from IAR workbench, seems to start up and communicate but then get a dialog:

    larldePm - Execution failure in flash loader

    Any ideas? Log below



    Tue Aug 26, 2014 10:05:17: Loaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\debugger\ST\STM32F4xx.dmac
    Tue Aug 26, 2014 10:05:17: Loaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
    Tue Aug 26, 2014 10:05:24: Updating firmware: J-Link ARM V8 compiled Jul 17 2014 12:31:18
    Tue Aug 26, 2014 10:05:24: Replacing firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
    Tue Aug 26, 2014 10:05:28: Waiting for new firmware to boot
    Tue Aug 26, 2014 10:05:30: New firmware booted successfully
    Tue Aug 26, 2014 10:05:30: JLINK command: ProjectFile = C:\work\firmware\trunk\STM\Project\avi\printer\iar\settings\usbd_vcp_STM324xG-EVAL_USBD-FS.jlink, return = 0
    Tue Aug 26, 2014 10:05:30: Device "STM32F405ZG" selected (1024 KB flash, 128 KB RAM).
    Tue Aug 26, 2014 10:05:30: DLL version: V4.90b, compiled Aug 14 2014 09:40:57
    Tue Aug 26, 2014 10:05:30: Firmware: J-Link ARM V8 compiled Jul 17 2014 12:31:18
    Tue Aug 26, 2014 10:05:30: Selecting SWD as current target interface.
    Tue Aug 26, 2014 10:05:30: JTAG speed is initially set to: 32 kHz
    Tue Aug 26, 2014 10:05:30: Found SWD-DP with ID 0x2BA01477
    Tue Aug 26, 2014 10:05:31: Found SWD-DP with ID 0x2BA01477
    Tue Aug 26, 2014 10:05:31: Found Cortex-M4 r0p1, Little endian.
    Tue Aug 26, 2014 10:05:31: FPUnit: 6 code (BP) slots and 2 literal slots
    Tue Aug 26, 2014 10:05:31: TPIU fitted.
    Tue Aug 26, 2014 10:05:31: ETM fitted.
    Tue Aug 26, 2014 10:05:31: Hardware reset with strategy 0 was performed
    Tue Aug 26, 2014 10:05:31: Initial reset was performed
    Tue Aug 26, 2014 10:05:31: Setting FLASH readout protection level 0 (disabled)
    Tue Aug 26, 2014 10:05:41: Hardware reset with strategy 2 was performed
    Tue Aug 26, 2014 10:05:41: 1248 bytes downloaded and verified (6.00 Kbytes/sec)
    Tue Aug 26, 2014 10:05:41: Loaded debugee: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\ST\FlashSTM32F4xxx.out
    Tue Aug 26, 2014 10:05:41: Target reset
    Tue Aug 26, 2014 10:05:43: Unloaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
    Tue Aug 26, 2014 10:05:43: Execution failure in flash loader.
  • A couple of things to try:

    Uncheck "Use Flashloaders" in the debugger configuration. I always thought that was a terrible name for that option--if you aren't using a flash loader what *are* you using?--but I believe it selects which binary to download to perform the programming. When checked it uses the one that shipped with IAR. If not checked it will use the one that is part of the JLink DLL. Perhaps install the latest JLink software release if you haven't.

    Similarly you can run JLink Commander in the same directory that contains your application binary and use the loadbin command. You'll have to use the device command to select your specific STM32F4 (You can see this being done in your log). So open JLink commander, halt, reset, device STM32F***, loadbin filename.bin.

    The other thing to check is the reset type being used. Not sure why it would affect this. I believe "normal" will select that which is appropriate for your device. Another terrible name in my opinion. But hey, slap a name on it, ship it, and multiply the productivity loss due to confusion by the total number of users.

    K
    Images
    • Screen Shot 2014-08-27 at 10.27.14 PM.png

      130 kB, 818×634, viewed 1,571 times
  • Hi,

    Just for your info and completeness:

    Uncheck "Use Flashloaders" in the debugger configuration. I always thought that was a terrible name for that option--if you aren't using a flash loader what *are* you using?

    It basically means that the EWARM flashloader is *not* used and EWARM treats all writes to the target as writes to RAM.
    It is a J-Link specific feature that it detects what writes actually go to flash and then performs the flash download automatically.

    The other thing to check is the reset type being used. Not sure why it would affect this. I believe "normal" will select that which is appropriate for your device. Another terrible name in my opinion.

    Can be confusing but for most customers even things like "reset core + periherals", "core only", ... is too much info and they will be confused what type is the correct one for their target.
    So "normal" is something like "default" and the average user does not need to care about it by just leaving it at the default.


    - Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.