Hi,
I'm working with an MIMXRT1040-EVK, and I've been using the Cortex-Debug extension in VSCode to program and debug my application, along with LinkServer
LinkServer gdbserver --keep-alive MIMXRT1042xxxxB:MIMXRT1040-EVK
At one point I flashed Zephyr's HelloWorld sample, after which GDB seems to be unable to connect to the GDB server. Even doing it manually doesn't work:
# Terminal 1
LinkServer gdbserver --keep-alive MIMXRT1042xxxxB:MIMXRT1040-EVK
NFO: Exact match for MIMXRT1042xxxxB:MIMXRT1040-EVK found
INFO: Selected device MIMXRT1042xxxxB:MIMXRT1040-EVK
INFO: Getting available probes
INFO: Selected probe #1 022900003ac6651a00000000000000000000000097969905 (DAPLink CMSIS-DAP)
GDB server listening on port 3333 in debug mode (core cm7)
Semihosting server listening on port 4444 (core cm7)
# Halts here until GDB tries to connect
INFO: Connected to core cm7
INFO: Disconnected from core cm7
Gdbserver on port 3333 has closed
# Terminal 2
<toolchain path>/arm-none-eabi-gdb <path to elf>
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Remote connection closed
I initially thought I might be doing something wrong, but I've got a second MIMXRT1040-EVK, and programming Zephyr's HelloWorld sample on it works repeatedly.
I've tried power-cycling the EVK, as well as pressing SW1 and SW7, upon which the sample seems to run fine, but I'm still unable to connect. I also tried putting on new FW for the LPC4322, but it didn't seem to make a difference.
Is there anything else I could try? I'm scared I'll end up in the same situation with my 2nd EVK, without being able to recover from it.
Here are my versions:
LinkServer v1.3.15 [Build 15] [2023-10-19 13:58:16]
Cortex-Debug 1.12.1
GNU gdb (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.90.20231008-git
Thanks,
Daniel