Using external Black Magic Debugger on MIMXRT1180-EVK

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using external Black Magic Debugger on MIMXRT1180-EVK

363 次查看
ryan714
Contributor I

Hello, I have a Black Magic Probe (firmware version 2.0) that I am using as an external debugger with a 20-pin JTAG to 10-pin SWD adapter. I’m having trouble getting it to work with the MIMXRT1180-EVK. Could you please let me know which jumpers need to be shorted on the board to enable external debugging with this probe?

I tried shorting JP4, and using the following commands:

arm-none-eabi-gdb Debug/evkmimxrt1180_rled_blinky_cm33.axf


(gdb) target extended-remote /dev/ttyACM0
Remote debugging using /dev/ttyACM0
(gdb) monitor swdp_scan
Target voltage: 0.0V
SWD scan failed!
Failed

0 项奖励
回复
4 回复数

342 次查看
ryan714
Contributor I
I also tried shorting JP5, with no avail.
0 项奖励
回复

284 次查看
ryan714
Contributor I

Today I powered the MIMXRT1180-EVK board using the barrel jack instead of the usb_debug port on my laptop and retried the setup. The result was:

(gdb) monitor swdp_scan
Target voltage: 3.2V
SWD scan failed!
Failed

Previously, I had only powered the board via the usb_debug  port. I tested several configurations:

  • JP4 shorted

  • JP4 and JP5 shorted

  • JP4 shorted with DIP switch SW5 set to 0100

  • JP4 and JP5 shorted with DIP switch SW5 set to 0100

According to the zephyr docs: https://docs.zephyrproject.org/latest/boards/nxp/mimxrt1180_evk/doc/index.html

SW5 should be set to 0100 when debugging the CM33 core and 0001 when debugging the CM7 core.

In all test configurations, the debugger detected target voltage but the scan still failed. One additional note: when powering the board through the barrel jack, the pre-flashed LED blink demo did not run, which might be a clue. 

 

0 项奖励
回复

212 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

To use the Black Magic Debugger with the i.MX RT1180-EVK:
 
Black Magic Probe Hardware:
Obtain a Black Magic Probe or another compatible hardware running the Black Magic Debug firmware.

 

 

Connections:
Connect the Black Magic Probe to the i.MX RT1180-EVK using the appropriate debug interface, typically Serial Wire Debug (SWD) or JTAG. Refer to the i.MX RT1180-EVK documentation for the specific debug port pinout and connection details.
Host Setup:
Install the GNU cross-compilation toolchain, including GCC and GDB, on your host machine. 
GDB Connection:
Launch GDB and instruct it to connect to the Black Magic Probe as a remote target. This is usually done using the target extended-remote /dev/ttyUSB0 command (or the corresponding serial port on your operating system).
Debugging:
Once connected, you can use standard GDB commands to debug your application running on the i.MX RT1180, including setting breakpoints, stepping through code, examining memory, and inspecting registers.
 

 

Considerations:
Connections:
Connect the Black Magic Probe to the i.MX RT1180-EVK using the appropriate debug interface, typically Serial Wire Debug (SWD) or JTAG. Refer to the i.MX RT1180-EVK documentation for the specific debug port pinout and connection details
Boot Mode:
Depending on your debugging scenario and whether your application is in internal flash or external memory (like SDRAM), you might need to adjust the board's boot mode or use tools like MCUBootUtility for flashing.
 
F
irmware Compatibility:
Ensure the Black Magic Debug firmware on your probe is compatible with the i.MX RT1180 and its specific core architecture. 
 
By following these steps, you can leverage the Black Magic Debugger for efficient in-application debugging of your firmware on the NXP i.MX RT1180-EVK.
 
Regards
0 项奖励
回复

179 次查看
ryan714
Contributor I

I tested different jumper configurations: JP4 shorted with JP5 open, and JP4 open with JP5 shorted, both with SW5 set to 0100, which according to the documentation should boot from FlexSPI quad SPI serial NOR (or octal SPI NOR in quad SPI NOR mode) when powered from the 5 V barrel jack. With SW5 in this setting, D7 blinks red and D6 blinks green, but the pre-flashed LED blink program does not run.

When powering through the USB debug port with SW5 at the default 0001 (Serial Downloader), the pre-flashed LED blink program does run as expected.

The Black Magic Probe reports “Target voltage: 3.3V” when the EVK is powered from the barrel jack, but the SWD scan still fails. When powered through the USB debug port, the Black Magic Probe reports “Target voltage: 0V” and the SWD scan also fails.

0 项奖励
回复