Ok, so I’m trying to debug the ATSAM3X8E with a Atmel-ICE, via the JTAG port. I tried to use openocd with the following config file:
set CHIPNAME at91sam3X8E
source [find target/at91samdXX.cfg]
Then I ran the following command (terminal a): openocd
Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'. none separate adapter speed: 400 kHz cortex_m reset_config sysresetreq Info : CMSIS-DAP: SWD Supported Info : CMSIS-DAP: JTAG Supported Info : CMSIS-DAP: Interface Initialised (SWD) Info : CMSIS-DAP: FW Version = 1.0 Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1 Info : CMSIS-DAP: Interface ready Info : clock speed 400 kHz Info : SWD DPIDR 0x2ba01477 Info : atsam3X8E.cpu: hardware has 6 breakpoints, 4 watchpoints
So far so good. Now I opened a second terminal (terminal b) and executed the following: arm-none-eabi-gdb -iex "target extended-remote localhost:3333"
With the following Output in terminal a:
Info : accepting 'gdb' connection on tcp/3333 Info : SWD DPIDR 0x2ba01477 Error: Failed to read memory at 0x4100201c Error: Couldn't read Device ID register Error: auto_probe failed Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'. Error: attempted 'gdb' connection rejected
If I get something totally wrong please tell me where it should be, thanks. If there is another way to debug the MCU, please also tell me the right way.