Dear Everyone,
We run into strange issue recently and we can't seem to find a reason for it. We're on IMXRT1176 EVKB and we use MCU for VS-Code with LinkServer.
We have FreeRTOS setup. We can connect to the core and debug main task but as soon as the scheduler starts and we enter a breakpoint in first task, every next attempt to do a step or resume ends with logs:
```
"C:\\NXP\\LinkServer_25.12.83\\LinkServer.exe" -l5 gdbserver "MIMXRT1176xxxxx:MIMXRT1170-EVKB" --probe U03FONP053YJN --gdb-port 2352 --no-boot --redlink-port 2440 --core cm7
....
[25630]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25654]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25674]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25694]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25713]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25735]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25755]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25775]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25795]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25814]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25834]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25853]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25872]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25890]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25909]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25928]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25947]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25968]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[25988]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26007]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26027]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26046]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26066]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26085]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26167]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26189]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26210]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26230]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26250]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26270]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26290]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26310]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
[26330]INFO:launcher.core.stub: [stub (2352)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
```
Debug console
```
GDB -> App: {"outOfBandRecord":[{"isStream":true,"type":"log","content":"Could not read registers; remote failure reply '22'\n","output":[]}],"output":""}
Could not read registers; remote failure reply '22'
55-exec-interrupt
GDB -> App: {"token":55,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]},"output":""}
56-exec-interrupt
GDB -> App: {"token":56,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]},"output":""}
57-exec-interrupt
GDB -> App: {"token":57,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]},"output":""}
58-exec-interrupt
GDB -> App: {"token":58,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]},"output":""}
```
This is our launch json:
```
```
We use the first task as a scheduler to start another tasks and we noticed that once we remove some things from the task, like function calls which do: xTaskCreate mostly, so nothing major, the debugger seems to work again. It looks like we extend some buffer and it causes the debugger connection to break.
The MCU requires reset after that and it's not possible to connect.
The software DOES work without debugger.
We would appreciate any suggestions on why does it happen
Hello,
Would you help us validate if you added enough stack for the tasks that you mention ?
Also, would you help us try adding more stack size to your scheduler ?
Regards,