cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RG Nucleo: Failed to load flash loader IAR 7.3 EWARM 7.5

e_wakefield
Associate
Posted on February 29, 2016 at 17:39

Running the most up to date EWARM on IAR. I receive the following problem in my Debug Log:

Mon Feb 29, 2016 10:17:59: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\ST\STM32L4xx.dmac 

Mon Feb 29, 2016 10:17:59: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32L4xxx.mac 

Mon Feb 29, 2016 10:17:59: Connected to ST-Link/V2-1 [SWD mode 1800 kHz] Firmware V2.J23.S6 (Probe no: 74622707) 

Mon Feb 29, 2016 10:17:59: Software reset was performed 

Mon Feb 29, 2016 10:17:59: Initial reset was performed 

Mon Feb 29, 2016 10:17:59: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32L4xxx.mac(13,33): Error: Operation error.  

Mon Feb 29, 2016 10:17:59: Error while calling macro execUserFlashInit 

Mon Feb 29, 2016 10:17:59: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32L4xxx.mac 

Mon Feb 29, 2016 10:17:59: Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32L4xxxG.flash 

I made sure to check to make sure my ST Link utilities were up to date and have selected SBW in my project options under ST link. I also made sure my device firmware was upd to date and can talk to the board. 

Using IAR 7.3.4, EWARM 7.50.3

Please help!
3 REPLIES 3
Posted on February 29, 2016 at 18:19

Devices going into Low Power Modes tend to disconnect.

Check that you have enabled any ''Connect under reset'' options, and trying to connect or erase with the BOOT[0] pin pulled high.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
e_wakefield
Associate
Posted on February 29, 2016 at 22:07

clive1,

Thanks for the quick reply. So I used the STM32 ST-Link Utility to access the device and erase it and program it with my .bin from my project, however I really need access from IAR to set breakpoints to run a few tests. 

My settings are as followed in IAR:

Debugger:

Setup ST-Link

Download: Use flash loaders checked, no override default board file

STLink SWD with 5kHz speed

connect during reset enabled

I tried to do this set up with both the BOOT0 pin high and it low and they both do not work. To fact check, BOOT0 is pin 7 on the Morpho connector CN7 correct?

Any other suggestions? I feel as if I'm missing something basic and just am overlooking something. Weird that I can use the ST-Utility and yet still not connect through IAR..

Thanks!

Posted on March 01, 2016 at 00:28

I'm not an IAR user, but the thing I'd probably double check is that they are using the current DLLs, you should be able to pull these from the driver or utilities directories.

C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\drivers\ST-Link\STLinkUSBDriver.dll

C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\bin\STLinkUSBDriver.dll

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..