01:49
thinkfat_ has quit [Ping timeout: 268 seconds]
01:49
thinkfat has joined #openocd
02:57
Hawk777 has joined #openocd
05:31
jancoow has joined #openocd
05:47
nerozero has joined #openocd
05:58
borneoa_ has joined #openocd
06:49
Hawk777 has quit [Quit: Leaving.]
06:54
Haohmaru has joined #openocd
07:53
defiant has joined #openocd
08:35
kraiskil has joined #openocd
08:41
zkrx has quit [Ping timeout: 268 seconds]
08:48
zkrx has joined #openocd
09:00
zerous has quit [Quit: WeeChat 3.4.1]
10:40
kraiskil has quit [Ping timeout: 265 seconds]
10:48
wingsorc__ has quit [Ping timeout: 252 seconds]
11:14
_olerem has joined #openocd
11:15
_olerem has quit [Client Quit]
12:33
shoragan has quit [Ping timeout: 240 seconds]
12:36
shoragan has joined #openocd
12:42
kraiskil has joined #openocd
12:42
shoragan has quit [Quit: quit]
12:51
shoragan has joined #openocd
12:53
shoragan has quit [Client Quit]
12:54
shoragan has joined #openocd
13:06
shoragan has quit [Ping timeout: 268 seconds]
13:06
olerem has quit [Ping timeout: 268 seconds]
13:07
olerem has joined #openocd
13:07
shoragan has joined #openocd
13:27
kraiskil has quit [Quit: Leaving]
13:58
tlwoerner_ has quit [Quit: Leaving]
13:59
tlwoerner has joined #openocd
14:59
wingsorc has joined #openocd
15:19
shoragan has quit [Quit: quit]
15:20
shoragan has joined #openocd
15:28
shoragan has quit [Ping timeout: 246 seconds]
15:30
shoragan has joined #openocd
15:44
Haohmaru has quit []
15:52
crabbedhaloablut has quit [Remote host closed the connection]
15:52
crabbedhaloablut has joined #openocd
16:31
JakeSays has quit [Ping timeout: 265 seconds]
16:33
JakeSays has joined #openocd
16:48
noperator[m] has joined #openocd
18:11
nerozero has quit [Ping timeout: 265 seconds]
18:41
kkk has joined #openocd
18:42
kkk has quit [Client Quit]
18:42
kkk4444 has joined #openocd
18:48
<
kkk4444 >
Hi all, I have a problem with openocd reset option. I'm using 0.11.0+dev-00561-gdbbac5f11 on Ubuntu 20.04 with following command:
18:48
<
kkk4444 >
"/usr/local/bin/openocd" -d3 -f ./openocd.cfg -c "program build_release/file.elf verify reset exit"
18:48
<
kkk4444 >
If I use reset argument I get following output, without the reset everything is okay:
18:48
<
kkk4444 >
Debug: 1842 1605 hla_target.c:347 hl_assert_reset(): hl_assert_reset
18:48
<
kkk4444 >
Debug: 1843 1605 core.c:630 adapter_system_reset(): SRST line asserted
18:48
<
kkk4444 >
Debug: 1844 1609 command.c:166 script_debug(): command - stm32wlx.cpu0 invoke-event reset-assert-post
18:48
<
kkk4444 >
Debug: 1845 1609 command.c:166 script_debug(): command - stm32wlx.cpu0 invoke-event reset-deassert-pre
18:48
<
kkk4444 >
Debug: 1846 1609 command.c:166 script_debug(): command - transport select
18:48
<
kkk4444 >
Debug: 1847 1609 command.c:166 script_debug(): command - expr [ string first "jtag" $_TRANSPORT ] != -1
18:48
<
kkk4444 >
Debug: 1848 1610 command.c:166 script_debug(): command - stm32wlx.cpu0 arp_reset deassert 0
18:48
<
kkk4444 >
Debug: 1849 1610 target.c:2193 target_free_all_working_areas_restore(): freeing all working areas
18:48
<
kkk4444 >
Debug: 1850 1610 target.c:1962 print_wa_layout(): 0x20008000-0x20009fff (8192 bytes)
18:48
<
kkk4444 >
Debug: 1851 1610 hla_target.c:406 hl_deassert_reset(): hl_deassert_reset
18:48
<
kkk4444 >
Debug: 1852 1610 core.c:634 adapter_system_reset(): SRST line released
18:48
<
kkk4444 >
Debug: 1853 1711 target.c:1836 target_call_event_callbacks(): target event 3 (resume-start) for core stm32wlx.cpu0
18:48
<
kkk4444 >
Debug: 1854 1711 hla_target.c:452 adapter_resume(): adapter_resume 1 0x00000000 0 0
18:48
<
kkk4444 >
Debug: 1855 1711 target.c:2193 target_free_all_working_areas_restore(): freeing all working areas
18:48
<
kkk4444 >
Debug: 1856 1711 target.c:1962 print_wa_layout(): 0x20008000-0x20009fff (8192 bytes)
18:48
<
PaulFertser >
kkk4444: please do not paste more than 3 lines to a public channel.
18:48
<
PaulFertser >
kkk4444: use some pastebin instead.
18:49
<
PaulFertser >
kkk4444: what debug adapter are you using, do you have srst line connected and what reset_config is used?
18:51
<
kkk4444 >
I'm using NUCLEO L476 dev board st-link as my debugger
18:51
<
kkk4444 >
here is my reset_config: reset_config srst_only srst_nogate connect_assert_srst
18:54
<
kkk4444 >
I see that the problem is: adapter_read_memory 0x08005950 2 1
18:54
<
kkk4444 >
When I search for the 0x08005950 address I see that it was previous PC value:
18:56
<
kkk4444 >
Why it is trying to restore the PC if the board is reset and it needs some time to start. can I somehow disable this behaviour?
19:04
<
kkk4444 >
the target I'm trying to flash is stm32wle5
19:05
<
PaulFertser >
adapter_read_memory just reads memory, not restores anything.
19:05
<
PaulFertser >
kkk4444: please pastebin full -d3 log.
19:05
<
kkk4444 >
oh, you are right, my bad
19:06
<
PaulFertser >
kkk4444: hm, you say it printns some error when you add "reset" but probably it's ok and expected if your target firmware puts device to sleep or remaps swd pins.
19:08
<
kkk4444 >
that's correct, I remap my swd pins in firmware
19:08
<
kkk4444 >
I will check if this is also the wen I don't do it
19:10
<
PaulFertser >
kkk4444: reset means "reset run" but it's still trying to talk to the target before it exits.
19:10
<
PaulFertser >
So a failure there might be expected.
19:12
<
PaulFertser >
kkk4444: yes, looks like the target can't communicate after reset run, expected if you remap swd pins.
19:20
<
kkk4444 >
that's pity, I;m using makefile recipe to flash my board
19:20
<
kkk4444 >
something like this:
19:20
<
kkk4444 >
flash_release: $(REL_BUILD_DIR)/$(TARGET).elf
19:20
<
kkk4444 >
"/usr/local/bin/openocd" -f ./openocd.cfg -c "program $(REL_BUILD_DIR)/$(TARGET).elf verify reset exit"
19:21
<
PaulFertser >
kkk4444: why do you need "reset" there?
19:21
<
PaulFertser >
To see it running?
19:21
<
kkk4444 >
well, I have to reset the board after flashing, I don't want to do it manually
19:24
<
PaulFertser >
kkk4444: ok then, a bit of Tcl should help:
19:27
<
PaulFertser >
-c "set err [catch {program ...}]; if {$err != 0} {shutdown error} else {reset run; shutdown}"
19:28
<
PaulFertser >
kkk4444: ^^ there the program arguments should be without reset and exit.
19:28
<
PaulFertser >
Not tested, but I hope you get the idea.
19:28
<
kkk4444 >
okay, I will try it out, thanks
19:38
<
PaulFertser >
You do not actually need that set if you do not need to print the exception, so it can be just -c "if {[catch {program...}] != 0} { ..."
20:42
nvmd has joined #openocd
20:43
<
kkk4444 >
PaulFertser maybe I'm doing something wrong but reset run; shutdown will throw error anyway
20:56
<
PaulFertser >
kkk4444: it should print an error but does it really return an error exit code?
21:09
<
kkk4444 >
this is the recipe I'm using
21:09
<
kkk4444 >
flash_debug: $(DBG_BUILD_DIR)/$(TARGET).elf
21:09
<
kkk4444 >
"/usr/local/bin/openocd" -f ./openocd.cfg -c "if {[catch {program $(DBG_BUILD_DIR)/$(TARGET).elf verify}] != 0} {shutdown} else {reset run; shutdown}"
21:10
<
PaulFertser >
kkk4444: what exit code does it produce?
21:16
<
PaulFertser >
kkk4444: did it run though?
21:16
<
PaulFertser >
(the target after that command)
21:16
<
PaulFertser >
probably it needs to be catch {reset run} then.
21:17
<
PaulFertser >
btw, your line is missing "error" from shutdown in case verify wasn't successful.
21:18
<
PaulFertser >
Then I'd try to catch {reset run}
21:43
kkk4444 has quit [Ping timeout: 252 seconds]
22:27
wingsorc__ has joined #openocd