cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer 2.12 - Operation exceeds memory limits

THein.3
Associate II

Hello Everyone,

Here is my 512kB STM32L15xxE:

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.12.0

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : STM32

SN         : 8D8D90395A58

DFU protocol: 1.1

Board      : --

Device ID  : 0x0437

Device name : STM32L15xxE/STM32L162xE

Flash size : 512 KBytes (default)

Device type : MCU

Revision ID : --

Device CPU : Cortex-M3

When I'm executing:

STM32_Programmer_CLI.exe -c port=usb1 myHex.hex

I get the following:

Error: Operation exceeds memory limits

Looking like that:

0693W00000Y9FcEQAV.pngSo apparently it fails after 256k, which is half of the 512k Flash it has...

The Hex-File also contains some EEPROM-Section (starting @ 0x0808 0000)

And some RAM-Section (starting @ 0x2000 0000)

===================================

When I take the same Hex-file, and convert it with DFU-File-Manager, and then flash it via DFuse, it just works, as it should...

DfuSeCommand.exe -c -d --o --fn RESET_VERSION_IN_EEPROM_TO_0.0.0.dfu

Any idea what's breaking CubeProgrammer?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Aziz BRIGUI
ST Employee

Hello @THein.3​,

I don't think this is related to the erase of flash sectors after 0x08040000 (to confirm this, you can use "Erasing and programming -> Erase flash memory" then, select some sectors after 1024 to see if the erase works).

The fail seems to come from the fact that the bootloader interface doesn't support the erase on EEPROM (AN2606 page 41). Since you said that your hex file contains EEPROM data, that might be the reason behind the issue.

A workaround for this would be to perform a full chip erase (EEPROM is not included by default), than to skip the erase before programming :

>STM32_Programmer_CLI -c port=USB1 -e all
>STM32_Programmer_CLI -c port=USB1 -d myHex.hex --skipErase

DFuse tool is working because of the fact that it's skipping the erase by default. However I agree with you on the point that CubeProgrammer should be handling this better. An improvement have been requested internally.

Internal ticket number: 145189 (This is an internal tracking number and is not accessible or usable by customers).

Let me know if you find this helpful.

Thanks,

Aziz


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
THein.3
Associate II

GUI shows the same behavior... (guess that's a good thing :tired_face: )

0693W00000Y9SjDQAV.png

THein.3
Associate II

Notice, how the tool itself shows MCU has 512k, but crashes at 256k...

Aziz BRIGUI
ST Employee

Hello @THein.3​,

I don't think this is related to the erase of flash sectors after 0x08040000 (to confirm this, you can use "Erasing and programming -> Erase flash memory" then, select some sectors after 1024 to see if the erase works).

The fail seems to come from the fact that the bootloader interface doesn't support the erase on EEPROM (AN2606 page 41). Since you said that your hex file contains EEPROM data, that might be the reason behind the issue.

A workaround for this would be to perform a full chip erase (EEPROM is not included by default), than to skip the erase before programming :

>STM32_Programmer_CLI -c port=USB1 -e all
>STM32_Programmer_CLI -c port=USB1 -d myHex.hex --skipErase

DFuse tool is working because of the fact that it's skipping the erase by default. However I agree with you on the point that CubeProgrammer should be handling this better. An improvement have been requested internally.

Internal ticket number: 145189 (This is an internal tracking number and is not accessible or usable by customers).

Let me know if you find this helpful.

Thanks,

Aziz


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.