I have some time to spend now ,
STM32L011K4 st-flash problem Topic is solved
Moderator: RoccoMarco
Re: STM32L011K4 st-flash problem
I'm feeling stupid
, finily I have crate a simple cfg file that allow me to connect to the board with openocd by using the following command in a terminal:
openocd -f st_nucleo_l011k4.cfg
In another terminal, I can run gdb:
I have add my openocd cfg file for nucleo L011k4
I still have an error when I try to flash the board with openocd.
The same result if I try to use telnet connection trough telnet localhost 4444
Any idea
openocd -f st_nucleo_l011k4.cfg
In another terminal, I can run gdb:
arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()
(gdb) monitor reset halt
Unable to match requested speed 300 kHz, using 240 kHz
Unable to match requested speed 300 kHz, using 240 kHz
adapter speed: 240 kHz
stm32l0.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xf0000000 pc: 00000000 msp: 00000000
(gdb) file ch.elf
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from ch.elf...done.
(gdb) load
Loading section .vectors, size 0xc0 lma 0x8000000
Loading section .text, size 0xbd6 lma 0x80000c0
Loading section .rodata, size 0xb0 lma 0x8000c98
Error finishing flash operation
I have add my openocd cfg file for nucleo L011k4
I still have an error when I try to flash the board with openocd.
The same result if I try to use telnet connection trough telnet localhost 4444
Any idea
Re: STM32L011K4 st-flash problem
Sorry, I forgot to attach the file in the previous message.
- Attachments
-
- st_nucleo_l011k4-config-file.zip
- (346 Bytes) Downloaded 326 times
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Has thanked: 83 times
- Been thanked: 67 times
Re: STM32L011K4 st-flash problem
Theo,
try this
Add it in openocd\scripts\board
It sets working area size to 2k (default script set it to 8k exceeding real flash size)
try this
Add it in openocd\scripts\board
It sets working area size to 2k (default script set it to 8k exceeding real flash size)
Re: STM32L011K4 st-flash problem
Yes it was my problem, a have modify my cfg to specify the working area:
source [find interface/stlink-v2-1.cfg]
transport select hla_swd
set WORKAREASIZE 0x0800
source [find target/stm32l0.cfg]
reset_config srst_only
It work now, I can program the board trough the openocd and gdb connections.
I'm going to test with your zip just to make a comparison.
Your method is may be better because you store your file in openocd folder rather than what I'm doing for now. I store the cfg file in my project
Re: STM32L011K4 st-flash problem
Thanks RoccoMarco,
Now I can program the board with openocd+gdb, I finally added your cfg file to the openocd path.
What about st-flash do you have a way to resolve the problem for this tool? It is a good alternative when I don't want to debug, I can quickly program the board by adding a rules to the make file.
So I will be happy if you also have a solution for st-flash.
Thanks you a lot for your help.
Now I can program the board with openocd+gdb, I finally added your cfg file to the openocd path.
What about st-flash do you have a way to resolve the problem for this tool? It is a good alternative when I don't want to debug, I can quickly program the board by adding a rules to the make file.
So I will be happy if you also have a solution for st-flash.
Thanks you a lot for your help.
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Has thanked: 83 times
- Been thanked: 67 times