OpenOCD configuration for FRDM-MCXN947 board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OpenOCD configuration for FRDM-MCXN947 board

133 Views
robmeades
Contributor I

I need to use OpenOCD to program/debug my FRDM-MCXN947 board.  I have updated the debug chip on the board to use CMSIS-DAP and have been able to connect OpenOCD however OpenOCD always bombs out with the error embedded:startup.tcl:1524: Error: ** Unable to reset target **.

I have tried setting the OpenOCD reset_config to none and to srst_only but neither has helped.  Can anyone suggest a working OpenOCD configuration for this board?

FYI, here is the full output:

openocd -f ../openocd/scripts/interface/cmsis-dap.cfg -c "transport select swd" -c "reset_config srst_only" -c "gdb_port disabled" -c "tcl_port disabled" -c "telnet_port disabled" -c "adapter speed 1000" -c "program /TEMP/test_main reset"

xPack Open On-Chip Debugger 0.12.0+dev-01312-g18281b0c4-dirty (2023-09-04-22:32)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
swd
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 1000 kHz
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: JTAG supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Serial# = KBEE1LS3QWE4M
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Warn : gdb services need one or more targets defined
embedded:startup.tcl:1524: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1561
at file "embedded:startup.tcl", line 1524

 

Labels (1)
Tags (1)
0 Kudos
2 Replies

57 Views
robmeades
Contributor I

Hi, and thanks for the response.  The warning:

Warn : gdb services need one or more targets defined

...is only about `gdb` services, which are not being used here (the GDB port is deliberately disabled).  OpenOCD needs to reset the target before it can do anything and that is the part that is failing. It is following the `reset_config` instruction given on the command-line to determine how to reset the target but I can't determine what reset configuration is meant to be used, meant to succeed, with the `FRDM-MCXN947` board.

0 Kudos

71 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The openocd is third party tools, from the message, it appears that the startup.tcl script has issue, have you checked the file?

BR

Xiangjun Rong

 

0 Kudos