On Tue, May 06, 2025 at 07:13:17PM +0000, Rolf | Onethinx wrote:
> It’s very hard to get consistent results. 
> I am using Okdo E1 Evaluation Board which has an onboard CMSIS-DAP programmer.
> It am experiencing issues with PyOCD as well (programs one out of 3 times).
> I found out that flash erase works, however after flash erase_address 
> 0x00000000
> 0x98000, I cannot connect anymore with OpenOCD ( If I do erase from 
> 0x00008000,
> it will occasionally connect after erase).

Well, that's mentioned in the patch:

+The MCU will appear unresponsive when the first flash sector doesn't contain
+valid firmware header (e.g. when the flash is blank), to attach to the target
+@code{lpc55xx_start_debug_session} procedure is offered by the target config.

So do not reset after erasing the first sector or if you do call that
additional proc to connect.

> After that I can only connect with PyOCD:

I tested lpc55xx_start_debug_session many times, worked reliably for
me. Can't see in the log, probably you're not using it?

> mon flash erase_check 0
> G: successfully checked erase state
> G: Bank is erased

Guess that means erase works nicely on your part with this driver.

> load
> /Volumes/Data/VScode/DAPlink/DAPLink/projectfiles/make_gcc_arm/lpc55s69_bl/build/lpc55s69_bl.elf
> 
> G: Loading section .interrupts, size 0x400 lma 0x0
> 
> G: Loading section .text, size 0x9160 lma 0x400
> 
> G: Loading section .ARM, size 0x8 lma 0x9560
> 
> G: Loading section .init_array, size 0x4 lma 0x9568
> 
> G: Loading section .fini_array, size 0x4 lma 0x956c
> 
> G: Loading section .data, size 0x248 lma 0x9570
> 
> G: Loading section .fill, size 0x6848 lma 0x97b8
> 
> G: Start address 0x000004bc, load size 65536
> 
> G: Transfer rate: 16 KB/sec, 6553 bytes/write.
> 
> {"output":"","token":17,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
> 
> mon verify_image
> /Volumes/Data/VScode/DAPlink/DAPLink/projectfiles/make_gcc_arm/lpc55s69_bl/build/lpc55s69_bl.elf
> 
> G: verified 65536 bytes in 0.432980s (147.813 KiB/s)

You can also use GDB command "compare-sections" to verify.

So this looks like flashing was fully successful, so far it looks like
everything works as expected from your logs, just resetting after
erasing the first sector is problematic but is anticipated and has a
known solution.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

Reply via email to