1. 概述
AMP(Asymmetric Multi-Processing)是一种多核异构架构编程模型,常用于在不同核心上运行不同操作系统或裸机程序(如:Cortex-A运行Linux,Cortex-M运行RTOS或裸机固件)。Rockchip RK3562 是一款支持多核异构处理的SoC,通常包含 Cortex-A55 和 Cortex-M 核心。
本文将指导你如何使用 OpenOCD(Open On-Chip Debugger)调试运行在 RK3562 上的 AMP 程序,包括多核调试、断点设置、寄存器查看等操作。
2. 准备工作
2.1 硬件要求
- Neardi RK3562 开发板
- JTAG/SWD 调试器(推荐:J-Link、Rockchip官方调试器)
- 连接线(JTAG/SWD 接口连线)
Rockchip 调试器如下:

2.2 软件要求
- OpenOCD (从Rockchip redmine下载)
- GDB(Rockchip 调试包里包含此工具)
- RK3562 的 OpenOCD 配置文件
下载的调试工具包内容如下:

2.3 修改CPU配置
在DTS里修改成如下:
diff --git a/arch/arm64/boot/dts/rockchip/neardi-rk3562.dtsi b/arch/arm64/boot/dts/rockchip/neardi-rk3562.dtsi
index d3575081acbf..c9775ec79944 100644
--- a/arch/arm64/boot/dts/rockchip/neardi-rk3562.dtsi
+++ b/arch/arm64/boot/dts/rockchip/neardi-rk3562.dtsi
@@ -243,6 +243,7 @@ CPU_SLEEP: cpu-sleep {
entry-latency-us = <120>;
exit-latency-us = <250>;
min-residency-us = <900>;
+ status = "disabled";
};
};
};
3. 配置 OpenOCD
3.1 配置 AMP_RK3562, 如下:

配置文件AMP_RK3562.launch, 内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType">
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals/> "/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateConsole" value="true"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateTelnetConsole" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doSecondReset" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbCLient" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbServer" value="true"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.enableSemihosting" value="false"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.firstResetType" value="init"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherCommands" value="set mem inaccessible-by-default off set remotetimeout 888"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherOptions" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerConnectionAddress" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerExecutable" value="${eclipse_home}RK\OpenOCD\bin\openocd.exe"/>
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerOther" value="-c "set SMPMASK 0x8" -r rk3562"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTclPortNumber" value="6666"/>
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherRunCommands" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.secondResetType" value="halt"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="elf"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU OpenOCD"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="elf"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${eclipse_home}RK\OpenOCD\bin\aarch64-arm-riscv-none-elf-gdb.exe"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/test.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="test"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.cdt.debug.core.sourceLocator"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;mapping backend_enabled=&quot;true&quot; name=&quot;New Mapping&quot;&gt;&#13;&#10; &lt;mapEntry memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;mapEntry backendPath=&amp;quot;/mnt/data/wumingfeng/rk3562_amp/rk3562_amp_510_next/rtos&amp;quot; localPath=&amp;quot;Y:\&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot;/&gt;&#13;&#10;&lt;/mapping&gt;&#13;&#10;" typeId="org.eclipse.cdt.debug.core.containerType.mapping"/> <container memento="AbsolutePath" typeId="org.eclipse.cdt.debug.core.containerType.absolutePath"/> </sourceContainers> </sourceLookupDirector> "/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"> <memoryBlockExpression address="18446743524108184216" label="str"/> </memoryBlockExpressionList> "/>
<stringAttribute key="org.eclipse.embedcdt.debug.gdbjtag.core.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals/> "/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
<stringAttribute key="saved_expressions<seperator>Unknown" value="0x20000000,0x20001000"/>
</launchConfiguration>
或者把上面的文件拷贝到:
openocd_eclipse-2020-09\RK\eclipse-workspace\.metadata\.plugins\org.eclipse.debug.core\.launches
3.2 配置AMP_RK3562_cpu3

配置文件AMP_RK3562_cpu3.launch, 内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType">
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals/> "/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateConsole" value="true"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateTelnetConsole" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doSecondReset" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbCLient" value="true"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbServer" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.enableSemihosting" value="false"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.firstResetType" value="init"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherCommands" value="set mem inaccessible-by-default off set remotetimeout 888"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherOptions" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerConnectionAddress" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerExecutable" value=""/>
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerOther" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTclPortNumber" value="6666"/>
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherRunCommands" value=""/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.secondResetType" value="halt"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU OpenOCD"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3334"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="Y:\hal\project\rk3562\GCC\TestDemo.elf"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${eclipse_home}RK\OpenOCD\bin\aarch64-arm-riscv-none-elf-gdb.exe"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="true"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/test.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="test"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.754998717"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.cdt.debug.core.sourceLocator"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;mapping backend_enabled=&quot;true&quot; name=&quot;New Mapping&quot;&gt;&#13;&#10; &lt;mapEntry memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;mapEntry backendPath=&amp;quot;/mnt/data/wumingfeng/rk3562_amp/rk3562_amp_510_next/rtos/bsp/rockchip/common/hal/lib/hal/src&amp;quot; localPath=&amp;quot;Y:\rtos\bsp\rockchip\common\hal\lib\hal\src&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot;/&gt;&#13;&#10; &lt;mapEntry memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;mapEntry backendPath=&amp;quot;/mnt/data/wumingfeng/rk3562_amp/rk3562_amp_510_next/rtos/bsp/rockchip/common/drivers&amp;quot; localPath=&amp;quot;Y:\rtos\bsp\rockchip\common\drivers&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot;/&gt;&#13;&#10; &lt;mapEntry memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;mapEntry backendPath=&amp;quot;/mnt/data/wumingfeng/rk3562_amp/rk3562_amp_510_next/rtos/bsp/rockchip/rk3562-32&amp;quot; localPath=&amp;quot;Y:\rtos\bsp\rockchip\rk3562-32&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot;/&gt;&#13;&#10;&lt;/mapping&gt;&#13;&#10;" typeId="org.eclipse.cdt.debug.core.containerType.mapping"/> <container memento="AbsolutePath" typeId="org.eclipse.cdt.debug.core.containerType.absolutePath"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;mapping backend_enabled=&quot;true&quot; name=&quot;Found Mappings&quot;&gt;&#13;&#10; &lt;mapEntry memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;mapEntry backendPath=&amp;quot;/mnt/data/wumingfeng/rk3562_amp/rk3562_amp_510_next/rtos/bsp/rockchip/common/hal/project/rk3562/GCC/../src/&amp;quot; localPath=&amp;quot;Y:\hal\project\rk3562\src\&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot;/&gt;&#13;&#10;&lt;/mapping&gt;&#13;&#10;" typeId="org.eclipse.cdt.debug.core.containerType.mapping"/> </sourceContainers> </sourceLookupDirector> "/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
<stringAttribute key="org.eclipse.embedcdt.debug.gdbjtag.core.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals> <peripheral name="GRF"/> </peripherals> "/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
<stringAttribute key="saved_expressions<seperator>Unknown" value="0x20000000,0x20001000"/>
</launchConfiguration>
同样, 可以拷贝此文件放到eclipse的工程配置目录里。
4. 启动调试
4.1 先启动AMP_RK3562
确保调试适配器和Neardi RK3562开发板上面的SWD pin连接, 适配器驱动安装正确, 则如下启动:

连接成功, 有如下log:
Open On-Chip Debugger 0.12.0+dev-00908-g1ce92f0eb-dirty (2024-10-08-14:35)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Please follow steps below:
Info : step1: run (./openocd -r rk3399) to connect the target board
Info : step2: run (telnet localhost 4444) to enter command mode
Info : step3: telnet command mode, use the command below:
Info : (l) list the targets support
Info : (l cpu0) set cpu0 as current target
Info : (pcsr) dump the pc of cpu when cpu is running
Info : (io) io -4 [-r(w)] [-l size] addr [write val]
Info : (halt) stop cpu
Info : (resume) resume cpu
Info : (step) step cpu
Info : (mdw) read memory in 4 bytes
Info : (mww) write memory in 4 bytes
Info : (smdw) secure read memory in 4 bytes
Info : (smww) secure write memory in 4 bytes
Info : (reg [x0] [val]) display cpu reg or set cpu reg as val
Info : (bp -h) add breakpoint
Info : (rbp -h) remove breakpoint
Info : (wp -h) remove watchpoint
Info : (rwp -h) remove watchpoint
Info : (asm pc [count ['thumb']]) disassemble
Info : (msr TCR_EL1 0x55aa55aa) write cpu system control register
Info : (mrs TCR_EL1) read cpu system control register
Info : (virt2phys) transform the virtual address to physical address
Info : (load_image filename) [p:]address ['bin'|'ihex'|'elf'|'s19'] [min_address] [max_length]
Info : (verify_image filename) [offset [type]]
Info : (dump_image filename) [p:]address size
Info : (rk_debug) rockchip define some script functions
Info : (help) list all openocd commands
.openocd/ft232h.cfg
adapter speed: 2000 kHz
.openocd/rk3562.cfg
Info : FTDI SWD mode enabled
swd
force hard breakpoints
Info : Hardware thread awareness created
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
apb
cpu0
cpu1
cpu2
cpu3
Info : clock speed 2000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [apb] Examination succeed
Info : cpu0: hardware has 6 breakpoints, 4 watchpoints
Info : [cpu0] Examination succeed
Info : cpu1: hardware has 6 breakpoints, 4 watchpoints
Info : [cpu1] Examination succeed
Info : cpu2: hardware has 6 breakpoints, 4 watchpoints
Info : [cpu2] Examination succeed
Info : cpu3: hardware has 6 breakpoints, 4 watchpoints
Info : [cpu3] Examination succeed
Info : gdb port disabled
Info : starting gdb server for cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : starting gdb server for cpu3 on 3334
Info : Listening on port 3334 for gdb connections
成功连接调试板后, 再启动AMP_RK3562_cpu3配置, 如下:

运行成功后, 有如下界面:

5. 配置源代码路径
步骤4调试成功后, 如果没有设置源代码路径, eclipse里则不会显示源代码。 如下设置源代码路径:
5.1 映射elf文件的编译路径
openocd如果是在Windows上面调试, 则在Windows系统上面映射网络驱动盘, 把rk3562在Linux的SDK路径映射到Windows, 如下:

之后, 在eclipse里如下映射:
