cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L053 Nucleo how to flash

Wleon.1
Associate II

Hi, I would like to know how to flash a program to my STM32L053 Nucleo board, for now after each power cycle I need to download the program via a debugger to the board, is how do I flash the program to the board ?

6 REPLIES 6

Your tools should be flashing the firmware, it would be quite difficult to create a project that didn't, so more likely something in your process is wrong.

Did you set any option bytes?

How do you know your code isn't running?

Are you linking for operation at 0x08000000 ?

Try one of the examples in CubeMX for your board.​

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

0693W000000UMSbQAO.png

it is targeting the ram which is 0x200000000 ++

Wleon.1
Associate II

I am using cubeMX to generate this program

Try examples in CubeL0, for instance one that blink LED/GPIO

Pick FLASH as the target​

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

How do you pick FLASH as the target ?

Hi, i manage to load it to the flash i think, however the reset button wont work when i use build and run. even I have set the STARTUP_FROM_RESET.

below is the download log:

xecuting match part name script

Loading target script file STM32_Target.js

Executing script MatchPartName("STM32L053R8")

Preparing target for download

Loading target script file STM32_Target.js

Executing script FLASHReset()

Downloading ‘STM32L0_Loader_rpc.elf’ to ST-LINK/V2

Programming

Programming 2.1 KB of .load_section addresses 20000000 — 2000087b

Programming completed in 64 ms — 33,937 bytes/sec

Download successful

Verifying ‘STM32L0_Loader_rpc.elf’ on ST-LINK/V2

Verifying

Verifying 2.1 KB of .load_section addresses 20000000 — 2000087b

Verifying completed in 45 ms — 48,266 bytes/sec

Verify successful

Erasing ‘FlirTest.elf’ on ST-LINK/V2

Erasing

Erasing 12.6 KB of addresses 08000000 — 080032bc

Erasing 0.0 KB of addresses 080032c0 — 080032c3

Erasing completed in 592 ms — 21,947 bytes/sec

Erase successful

Downloading ‘FlirTest.elf’ to ST-LINK/V2

Programming

Programming 12.6 KB of addresses 08000000 — 080032bc

Programming 0.0 KB of addresses 080032c0 — 080032c3

Programming completed in 7 ms — 1,856,142 bytes/sec

Download successful

Verifying ‘FlirTest.elf’ on ST-LINK/V2

Verifying

Verifying 12.6 KB of addresses 08000000 — 080032bc

Verifying 0.0 KB of addresses 080032c0 — 080032c3

Verifying completed in 9 ms — 1,443,666 bytes/sec

Verify successful

Preparing target for user application

Loading target script file STM32_Target.js

Executing script FLASHReset()