cancel
Showing results for 
Search instead for 
Did you mean: 

Memory-Loader error

shravan
Associate II
Posted on April 12, 2017 at 15:22

Hi all,

        I am facing some issues here on flash erasing and programming. I am not getting where is the actual problem. I am using STM32F429ZET on our custom board. For testing purpose is used provided blinky example's hex file which support same controller. Problem here is that when i am trying to program this hex file using ST-Link utility it throws errors as:

18:22:34 : ST-LINK SN : 49FF70065178505057391687

18:22:34 : ST-LINK Firmware version : V2J28S6

18:22:34 : Connected via SWD.

18:22:34 : SWD Frequency = 4,0 MHz.

18:22:34 : Connection mode : Normal.

18:22:34 : Debug in Low Power mode enabled.

18:22:34 : Device ID:0x419

18:22:34 : Device flash Size : 512KBytes

18:22:34 : Device family :STM32F42xxx/F43xxx

18:23:04 : [Blinky.hex] opened successfully.

18:23:04 : [Blinky.hex] checksum : 0x000F72B6

18:23:07 : Memory-Loader error

18:23:07 : Error occured during erase operation!

18:23:07 : Programmed memory Checksum: 0x00000000

Any idea?

Any suggestions might help me.

27 REPLIES 27
Imen.D
ST Employee
Posted on April 12, 2017 at 15:28

Hi

p.Shravan

,

I recommend you to upgrade the ST-Link firmware version through this link

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fdevelopment-tool-software%2Fstsw-linkhtml

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fdevelopment-tool-software%2Fstsw-linkhtml

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 12, 2017 at 17:19

What did you use to create the file?

What memory regions are described in the linker script or scatter file?

If Keil, what does the internal download/debug report when configuring the ST-LINK in SWD mode?

Have you done any other testing on your board?

Can you use the System Loader via USART or USB in your design?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 12, 2017 at 15:56

Hi Imen D,

Thank you for your quick reply. I tried this option but nothing changed.

Max
ST Employee
Posted on April 13, 2017 at 04:28

Could it be that you have an external memory configured in ST-Link Utility/External Loader menu that do not mach with your hardware on your custom board?

Posted on April 13, 2017 at 06:47

Hi Clive One,

            Please find my answers here,

   

What did you use to create the file?

I actually used Keil IDE.

What memory regions are described in the linker script or scatter file?

This is the memory region: Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002b1c, Max: 0x00010000, ABSOLUTE)

If Keil, what does the internal download/debug report when configuring the ST-LINK in SWD mode?

This is the Build Output from Keil:

C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe -c SWD -p 'D:\SANDBOX\STM32\Blinky\Flash\Blinky.hex' 0x08000000 -V -Rst

STM32 ST-LINK CLI v3.0.0.0

STM32 ST-LINK Command Line Interface

ST-LINK SN : 49FF70065178505057391687

ST-LINK Firmware version : V2J28S7

Connected via SWD.

SWD Frequency = 4000K.

Target voltage = 3.0 V.

Connection mode : Normal.

Device ID:0x419

Device flash Size : 512 Kbytes

Device family :STM32F42xxx/F43xxx

Loading file...

Flash Programming:

File : D:\SANDBOX\STM32\Blinky\Flash\Blinky.hex

Address : 0x08000000

Memory programming...

±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0% 0%

Memory-Loader error

Error occured during erase operation!

ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%

Programming Complete.

Programmed memory Checksum: 0x00000000

MCU Reset.

Have you done any other testing on your board?

No, I haven't done any testing. We just got this new custom board. 

Can you use the System Loader via USART or USB in your design?

I think this custom board don't have such provision. Only what I got is SWD pins for programming.

Posted on April 13, 2017 at 06:53

Hi Max,

            I haven't selected any External Loader. All these Loaders are deselected. Can you please tell me what is exactly meant by Memory-Loader error .

Posted on April 13, 2017 at 11:20

Looks like you build process uses external tools to download code. What about Keil's normal way of configuring the ST-LINK as a debugger internally and using that to download and debug? Make sure update target is selected and you have a flash algorithm selected for the STM32. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 13, 2017 at 11:47

I think the answer is on the next line of your log:

Error occured during erase operation!

but at this stage, I have no idea what could be causing that error.

There are a few possible directions to investigate, in no particular order:

- follow

Turvey.Clive.002

recommendation and try if the debugger works

- check the hex file content to make sure it'scorrect, i.e. not trying to use memory that dos not exist in your device

- check the protection in the option bytes (but I think the error message should be different in this case)

- check your power supply. If the supply is not able to sustain the programming current, you may have this kind of behavior.

- observe the reset pin during programming with an oscilloscope

Were you able to program this device on this board before or is it the first time?

Do you have several boards or only one? if you have several, you may want to try on another one.

regards,

Max

Posted on April 13, 2017 at 12:11

Hi,

What is the address that you want to program ?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen