Hi, On Mon, May 05, 2025 at 09:21:39PM +0000, Rolf | Onethinx wrote: > I get a flash_init() failed trying to program an LPC55S69. Any Ideas? ... > I: Launching gdb-server: openocd -c "gdb_port 50000" -c "tcl_port 50002" -c > "telnet_port 50004" -s /usr/local/share/openocd/scripts -c "set > FLASH_API_ADDRESS 0x030010f0" -f
I wonder if this address is correct. It needs to be not the generic "ROM API" address but the "Flash API" part of it. What I found in some document was 0x130010f0 for the _ROM API_ table but I didn't have a chance to test it on hardware and the documention wasn't really complete. The pointer to the Flash API table is supposed to be at offset 0x10 in the ROM API table. During development I was manually inspecting the API tables with "mdw" to make sure I'm looking at the right addresses. > S: Info : SWD DPIDR 0x6ba02477 > S: Info : [lpc55xx.cpu] Cortex-M33 r0p3 processor detected > S: Info : [lpc55xx.cpu] target has 8 breakpoints, 4 watchpoints > S: Info : [lpc55xx.cpu] Examination succeed > S: Info : starting gdb server for lpc55xx.cpu on 50000 > S: Info : Listening on port 50000 for gdb connections > S: Info : accepting 'gdb' connection on tcp/50000 > S: Warn : [lpc55xx.cpu] target was in unknown state when halt was requested > S: Info : SWD DPIDR 0x6ba02477 > S: Info : [lpc55xx.cpu] external reset detected This last one looks suspicious, are you sure nothing can be pulling the hardware reset line? Do you have it physically connected to debug adapter? Do you enable it in reset_config? > S: [lpc55xx.cpu] halted due to debug-request, current mode: Thread > S: xPSR: 0x41000000 pc: 0x00019e02 psp: 0x20003ae8 > S: Error: flash_init() failed I suggest you run with -d3 to see additional debug messages, they might give more clue. But first things first, figuring out the correct Flash API address is needed, also since you have the hardware in your hands please try uncommenting the autodetection section for 55S6x, put the device id there that you observe on hardware and see if it works. HTH -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercer...@gmail.com