cancel
Showing results for 
Search instead for 
Did you mean: 

Error when flashing STM32L4R9I-DISCO

BNach
Associate

Hi to All !

I'm a new in STM32 MCU programming. (But with big experience in C/C++).

Just bought STM32L4R9I-DISCO, install eclipse with plugin for AC6 toolchain, STM32Cube under Linux. Build one of the examples : RTC-timestamp, erase the Flash (without problems) and try to install example, but got :

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

auto erase enabled

Info : Device id = 0x10036470

Info : STM32L4xx flash size is 2048kb, base address is 0x8000000

Info : Erase the padded zone before the write

Error: Whole bank access must start at beginning of bank.

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x20000050 msp: 0xfffffffc

Info : block write succeeded

wrote 16384 bytes from file Debug/STM32L4R9I-Discovery_RTC_TimeStamp.elf in 0.443163s (36.104 KiB/s)

** Programming Finished **

** Verify Started **

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000002e msp: 0xfffffffc

target halted due to breakpoint, current mode: Thread 

xPSR: 0x61000000 pc: 0x2000002e msp: 0xfffffffc

verified 16112 bytes in 0.506380s (31.072 KiB/s)

** Verified OK **

shutdown command invoked

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

in my ...FLASH.ld :

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

/* Specify the memory areas */

MEMORY

{

RAM (xrw)   : ORIGIN = 0x20000000, LENGTH = 640K

FLASH (rx)   : ORIGIN = 0x8000000, LENGTH = 1024K

}

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

What is my mistake ? I not changed example package in any way ...

***********************************************************

My second question : Can I restore factory image with demonstration on the LCD ?

Sorry, if my questions seem to you too stupid, but excuse my first attempts with STM32 programming !

Thank you for you help in advance !

Regards,

Branimir

1 ACCEPTED SOLUTION

Accepted Solutions

The L4R may have different flash banking options that the OpenOCD software is not entirely capable of dealing with.

Unless you saved the original content perhaps not exactly

There are some .HEX files in the various demo directories for CubeL4

STM32Cube_FW_L4_V1.13.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Binary\STemWin-STM32L4R9I-Discovery_V1.0.0.hex

These might require the ST-LINK Utilities, and its External Loaders

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

View solution in original post

2 REPLIES 2

The L4R may have different flash banking options that the OpenOCD software is not entirely capable of dealing with.

Unless you saved the original content perhaps not exactly

There are some .HEX files in the various demo directories for CubeL4

STM32Cube_FW_L4_V1.13.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Binary\STemWin-STM32L4R9I-Discovery_V1.0.0.hex

These might require the ST-LINK Utilities, and its External Loaders

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

Later, I found, that no matter of this error program is flashed on target ;)

Thank you for your answer !