ambiot / ambd_matter

AmebaD public SDK to support Matter project
https://www.amebaiot.com/en/
10 stars 10 forks source link

AmebaD Evaluation board is not detected by Jlink #105

Open LokrajPatro opened 6 months ago

LokrajPatro commented 6 months ago

Hi,

I am using Realtek AmebaD evolution board to explore Matter protocol feature for Thermostat applications. I could build and flash the device with thermostat example application , referred the

“AN0204 Realtek Matter Application Note” to perform the same.

Now, I am trying to setup the Debug environment for the device. I am referring section 1.4 Setting Debugger section “AN0400Ameba-D Application Note” to perform the same.

The Jlink Debugger is detecting by Jlink script. However, The AmebaD device is not detected.

Setup:

Linux OS version: Ubuntu 22.04.3

Debugger: Jlink Ultra +, Version 4.5

Please help me to resolve the issue.

Please find attached snapshot of log.

Thanks,

Lokraj Jlink_Debug_error

xshuqun commented 5 months ago

@LokrajPatro what command line did you use to start the jlink gdb server?

LokrajPatro commented 5 months ago

I am using "/opt/SEGGER/JLink/JLinkGDBServer –device cortex-m33 -if SWD -scriptfile AP2_KM4.JLinkScript –port 2335" command to start the jlink gdb server. As mentioned in “AN0400Ameba-D Application Note” document.

SandyYeow commented 5 months ago

Hi @LokrajPatro may I inquire about the version of JLink GDB Server you are currently using? Thank you.

xshuqun commented 5 months ago

I am using "/opt/SEGGER/JLink/JLinkGDBServer –device cortex-m33 -if SWD -scriptfile AP2_KM4.JLinkScript –port 2335" command to start the jlink gdb server. As mentioned in “AN0400Ameba-D Application Note” document.

@LokrajPatro Could you try to use this command /opt/SEGGER/JLink_V646b/JLinkGDBServer -device cortex-m33 -if SWD -scriptfile AP2_KM4.JLinkScript -port 2335 Please change the JLink GDB path according to your installation.

LokrajPatro commented 5 months ago

Hi @SandyYeow , The J-Link GDB server version is V7.94.

Thanks

LokrajPatro commented 5 months ago

Hi @xshuqun , I have tried "/opt/SEGGER/JLink_V794j/JLinkGDBServer -device cortex-m33 -if SWD -scriptfile AP2_KM4.JLinkScript -port 2335" command. But could not connect to target. Please find the error log below:

/*****/ /opt/SEGGER/JLink_V794j/JLinkGDBServer -device cortex-m33 -if SWD -sciptfile AP2_KM4.JLinkScript -port 2335 SEGGER J-Link GDB Server V7.94j Command Line Version

JLinkARM.dll V7.94j (DLL compiled Feb 14 2024 15:37:29)

WARNING: Unknown command line parameter -sciptfile found. WARNING: Unknown command line parameter AP2_KM4.JLinkScript found. Command line: -device cortex-m33 -if SWD -sciptfile AP2_KM4.JLinkScript -port 2335 -----GDB Server start settings----- GDBInit file: none GDB Server Listening port: 2335 SWO raw output listening port: 2332 Terminal I/O port: 2333 Accept remote connection: yes Generate logfile: off Verify download: off Init regs on start: off Silent mode: off Single run mode: off Target connection timeout: 0 ms ------J-Link related settings------ J-Link Host interface: USB J-Link script: none J-Link settings file: none ------Target related settings------ Target device: cortex-m33 Target device parameters: none Target interface: SWD Target interface speed: 4000kHz Target endian: little

Connecting to J-Link... J-Link is connected. Firmware: J-Link Ultra V4 compiled Sep 22 2022 15:00:10 Hardware: V4.00 S/N: 504503825 Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB Checking target voltage... Connecting to target failed. Connected correctly? GDB Server will be closed... Shutting down... Could not connect to target. /*****/

Thanks .

xshuqun commented 5 months ago

@LokrajPatro could you check the connections to the board again.

LokrajPatro commented 5 months ago

Hi @xshuqun , I have verified the wiring connection. This is as mentioned in 1.4.2 J-Link section of the AN0400 Ameba-D Application Note.

Thanks

Jlink_Connection

xshuqun commented 5 months ago

@LokrajPatro, could you check if the EVB (Evaluation Board) is powerup? Based of what I have tested, either the EVB is not powerup or the GND&1833 connection has been flipped.