|
From: Antonio B. <bor...@gm...> - 2025-06-21 07:34:03
|
On Sat, Jun 21, 2025 at 3:28 AM Thomas D. Dean <to...@wa...> wrote:
>
> I have a web server on a pico_w. It works correctly. One problem.
>
> When I make a change and reprogram with openocd, the pico_w does not
> restart properly. A browser on a local PC will not load the web page
> until I power-cycle the pico_w.
>
> Code: Select all
>
> > sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c
> "adapter speed 5000" -c "program mycode.elf verify reset exit"
> Open On-Chip Debugger 0.12.0+dev-g8b8c9731a (2025-06-19-01:48)
Hi Thomas,
the git SHA1 reported in the line above '8b8c9731a' does not match
anything in OpenOCD upstream.
Are you using a fork taken somewhere else?
> Licensed under GNU GPL v2
> ...
> embedded:startup.tcl:1427: Error: args[i] option value ('CX') is not valid
> in procedure 'program'
> in procedure 'ocd_process_reset'
> in procedure 'ocd_process_reset_inner' called at file
> "embedded:startup.tcl", line 1427
This reports that a command was expecting a numeric or boolean
argument and instead got the string 'CX' !!!
I cannot detect which command. In OpenOCD upstream source code
cat src/helper/startup.tcl src/jtag/startup.tcl src/target/startup.tcl
src/server/startup.tcl src/flash/startup.tcl | less -N
reports that line 1427 is the caller to 'ocd_process_reset_inner' ,
that's not useful info.
Try to add '-d' to the command line to get more logs, and try to
detect why a command gets 'CX' as an argument.
Antonio
> ** Programming Started **
> Info : Padding image section 1 at 0x1004c324 with 220 bytes (bank write
> end alignment)
> Warn : Adding extra erase range, 0x1004c400 .. 0x1004cfff
> Info : Erase chunk: 0x00000000 -> 0x0001ffff
> Info : Erase chunk: 0x00020000 -> 0x0003ffff
> Info : Erase chunk: 0x00040000 -> 0x0004cfff
> ** Programming Finished **
> ** Verify Started **
> ** Verified OK **
> ** Resetting Target **
> shutdown command invoked
>
> But, the target is not properly reset. A local browser will not load the
> page.
> If I cycle power, the local browser will always load the page.
>
> As suggested in the RPi forums, I tried:
>
> > sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c
> "adapter speed 5000" -c "program kiki_picow.elf verify ; reset halt;
> rp2040.core1 arp_reset assert 0 ; rp2040.core0 arp_reset assert 0 ; exit"
>
> No improvement.
>
> What am I doing wrong? Any ideas?
>
> Tom Dean
|