cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Debug in Engineering Mode using STM32MP157-DK2. OpenOCD Error: Could not find MEM-AP to control the core

BMcCa.3
Associate II

Trying to create a simple application that will toggle LD9 in Engineering Mode but get an error with the OpenOCD.

Output on console window is as follows:

Open On-Chip Debugger 0.10.0+dev-01124-gbfb41e6 (2018-11-16-15:23) 

Licensed under GNU GPL v2 

For bug reports, read 

http://openocd.org/doc/doxygen/bugs.html 

debug_level: 1 

cortex_a interrupt mask on 

cortex_a interrupt mask on 

cortex_a domain access control fixup on 

cortex_a domain access control fixup on 

3333 

none separate 

adapter speed: 5000 kHz 

adapter_nsrst_assert_width: 200 

adapter_nsrst_delay: 200 

none srst_pulls_trst 

srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst 

Error: Could not find MEM-AP to control the core 

ap 0 selected, csw 0x10006000 

Error: Target not examined yet

undefined debug reason 7 - target needs reset 

Error: Target not examined yet 

Error: Could not find MEM-AP to control the core 

Error: Target not examined yet 

embedded:startup.tcl:24: Error: 

in procedure ‘stm32mp15x.cpu2’ called at file “embedded:startup.tcl�?, line 283 

in procedure ‘ocd_bouncer’ 

at file “embedded:startup.tcl�?, line 24 

Error: Target not examined yet 

Error: Target not examined yet 

Error: Target not examined yet 

Error: Target not examined yet

3 REPLIES 3
AntonioST
ST Employee

In Engineering mode, OpenOCD should be run setting the variable "ENG_MODE" to examine the Cortex-M.

This is already done by the IDE.

Running OpenOCD from the command line, use:

openocd -c 'set ENG_MODE 1' -f board/stm32mp15x_dk2.cfg

BMcCa.3
Associate II

​Hi Antonio.

I am using the IDE using the default settings. 

The Script File does inevitably load the …_dk2.cfg file.

I want to test using the command line.  How do I do this? With the "Command Shell Console" using local settings?

BMcCa.3
Associate II

​The image wasn't captured in the previous post0690X000009YqjZQAS.jpg