espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.75k stars 7.3k forks source link

ESP32-S3 JTAG Debug problem : Unable to open ftdi device (IDFGH-11316) #12467

Open Sotung96 opened 1 year ago

Sotung96 commented 1 year ago

Answers checklist.

General issue report

Hi all, I try to use JTAG Debug on ESP32-S3 but it fails. I got some Error on it. I try to google it and follow to fix it but it's still not working. I have use USB Device Tools or Zadig to install libusb to the com port. I checked the PID & VID is correct in Device Manager. I type openocd -f board/esp32s3-builtin.cfg in VS Code Terminal and it is success to open. Do anyone can help me. Thanks.

OS
Windows

Operating System version
Windows 11

Visual Studio Code version
1.83.1

ESP-IDF version
5.1.1

Python version
3.11.2

==================================================================================
Settings.json :

{
    "idf.adapterTargetName": "esp32s3",
    "idf.portWin": "COM14",
    "idf.flashType": "UART",
    "files.associations": {
        "ethernet_init.h": "c"
    },
    "idf.openOcdConfigs": [
        "board/esp32s3-builtin.cfg"
    ],
}

==================================================================================
Launch.json :

{
    "version": "0.2.0",
    "configurations": [
      {
        "type": "espidf",
        "name": "Launch-name",
        "request": "launch"
      }
    ]
  }

==================================================================================
Open On-Chip Debugger v0.12.0-esp32-20230419 (2023-04-18-22:02)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : esp_usb_jtag: serial (EC:DA:3B:94:E0:D4)
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x4037A096, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (1) - (Power on reset)
Info : [esp32s3.cpu1] Target halted, PC=0x40043A3B, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (1) - (Power on reset)

==================================================================================
Output:

[OpenOCD]
Open On-Chip Debugger v0.12.0-esp32-20230419 (2023-04-18-22:02)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html

[OpenOCD]
debug_level: 2

[OpenOCD]
adapter speed: 20000 kHz

[OpenOCD]
WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.

[OpenOCD]
Info : Listening on port 6666 for tcl connections

[OpenOCD]
Info : Listening on port 4444 for telnet connections

c:\Espressif\tools\tools\openocd-esp32\v0.12.0-esp32-20230419\openocd-esp32\bin\openocd.exe

[Debug Adapter]
2023-10-26 12:28:48,899 - Debug Adapter (main) - DEBUG - START_TIME_2023_10_26_12-28-48
2023-10-26 12:28:48,899 - Debug Adapter (main) - DEBUG - Init errors:None
2023-10-26 12:28:48,899 - Debug Adapter (main) - INFO - Working directory: C:\Users\Albert So\AppData\Local\Programs\Microsoft VS Code
2023-10-26 12:28:48,899 - Debug Adapter (main) - INFO - Arguments: 
{   'app_flash_off': 65536,
    'board_type': None,
    'cmdfile': None,
    'core_file': (),
    'debug': 4,
    'developer_mode': 'none',
    'device_name': 'esp32s3',
    'elfpath': (   'd:\\Code\\GivCEM\\S3Ethernet_iperf\\build\\ethernet_basic.elf',),
    'log_file': 'd:\\Code\\GivCEM\\S3Ethernet_iperf\\debug.log',
    'log_mult_files': None,
    'log_no_debug_console': None,
    'oocd': 'openocd',
    'oocd_args': None,
    'oocd_ip': 'localhost',
    'oocd_mode': 'connect_to_instance',
    'oocd_scripts': None,
    'port': 43474,
    'postmortem': False,
    'tmo_scale_factor': 1,
    'toolchain_prefix': 'xtensa-esp32s3-elf-'}
DEBUG_ADAPTER_STARTED
2023-10-26 12:28:48,899 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_STARTED
2023-10-26 12:28:48,899 - Debug Adapter (main) - INFO - Starting. Cmd: c:\Users\Albert So\.vscode\extensions\espressif.esp-idf-extension-1.6.5\esp_debug_adapter\debug_adapter_main.py -d 4 -e d:\Code\GivCEM\S3Ethernet_iperf\build\ethernet_basic.elf -l d:\Code\GivCEM\S3Ethernet_iperf\debug.log -p 43474 -dn esp32s3 -a 0x10000 -t xtensa-esp32s3-elf-

[Debug Adapter]
2023-10-26 12:28:48,914 - Debug Adapter (main) - INFO - Listening on port 43474

[Debug Adapter]
DEBUG_ADAPTER_READY2CONNECT
2023-10-26 12:28:48,914 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_READY2CONNECT

[Debug Adapter]
2023-10-26 12:28:48,916 - Debug Adapter (main) - DEBUG - Got connection

[Debug Adapter]
2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug adapter -> Extension: DEBUG_ADAPTER_STARTED\n", "source": {}}, "seq": 0}

[Debug Adapter]
2023-10-26 12:28:48,916 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 514\\r\\n'<<

2023-10-26 12:28:48,916 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Starting. Cmd: c:\\Users\\Albert So\\.vscode\\extensions\\espressif.esp-idf-extension-1.6.5\\esp_debug_adapter\\debug_adapter_main.py -d 4 -e d:\\Code\\GivCEM\\S3Ethernet_iperf\\build\\ethernet_basic.elf -l d:\\Code\\GivCEM\\S3Ethernet_iperf\\debug.log -p 43474 -dn esp32s3 -a 0x10000 -t xtensa-esp32s3-elf-\n\n", "source": {}}, "seq": 1}

[Debug Adapter]
2023-10-26 12:28:48,916 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "adapterID": "espidf",
        "clientID": "vscode",
        "clientName": "Visual Studio Code",
        "columnsStartAt1": true,
        "linesStartAt1": true,
        "locale": "en",
        "pathFormat": "path",
        "supportsArgsCanBeInterpretedByShell": true,
        "supportsInvalidatedEvent": true,
        "supportsMemoryEvent": true,
        "supportsMemoryReferences": true,
        "supportsProgressReporting": true,
        "supportsRunInTerminalRequest": true,
        "supportsStartDebuggingRequest": true,
        "supportsVariablePaging": true,
        "supportsVariableType": true
    },
    "command": "initialize",
    "seq": 1,
    "type": "request"
}
2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Listening on port 43474\n", "source": {}}, "seq": 2}

[Debug Adapter]
2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug adapter -> Extension: DEBUG_ADAPTER_READY2CONNECT\n", "source": {}}, "seq": 3}

2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got connection\n", "source": {}}, "seq": 4}

2023-10-26 12:28:48,916 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"adapterID\": \"espidf\",\n        \"clientID\": \"vscode\",\n        \"clientName\": \"Visual Studio Code\",\n        \"columnsStartAt1\": true,\n        \"linesStartAt1\": true,\n        \"locale\": \"en\",\n        \"pathFormat\": \"path\",\n        \"supportsArgsCanBeInterpretedByShell\": true,\n        \"supportsInvalidatedEvent\": true,\n        \"supportsMemoryEvent\": true,\n        \"supportsMemoryReferences\": true,\n        \"supportsProgressReporting\": true,\n        \"supportsRunInTerminalRequest\": true,\n        \"supportsStartDebuggingRequest\": true,\n        \"supportsVariablePaging\": true,\n        \"supportsVariableType\": true\n    },\n    \"command\": \"initialize\",\n    \"seq\": 1,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 5}

[Debug Adapter]
2023-10-26 12:28:48,916 - Gdb - DEBUG - MI->: -gdb-set mi-async on

[Debug Adapter]
2023-10-26 12:28:49,095 - Gdb - DEBUG - MI<-:
[{'message': 'thread-group-added',
  'payload': {'id': 'i1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:49,095 - Gdb - INFO - NOTIFY: thread-group-added {'id': 'i1'}

[Debug Adapter]
2023-10-26 12:28:49,095 - Gdb - DEBUG - RESULT: done None
2023-10-26 12:28:49,095 - Gdb - DEBUG - MI->: -gdb-set logging file C:\Users\ALBERT~1\AppData\Local\Temp\gdb_proc.log

[Debug Adapter]
2023-10-26 12:28:49,114 - Gdb - DEBUG - MI<-:
[{'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:49,114 - Gdb - DEBUG - RESULT: done None
2023-10-26 12:28:49,114 - Gdb - DEBUG - MI->: -gdb-set logging on

[Debug Adapter]
2023-10-26 12:28:49,145 - Gdb - DEBUG - MI<-:
[{'message': None,
  'payload': "Warning: 'set logging on', an alias for the command 'set logging "
             "enabled', is deprecated.\\n",
  'stream': 'stdout',
  'type': 'console'},
 {'message': None,
  'payload': "Use 'set logging enabled on'.\\n\\n",
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]

[Debug Adapter]
2023-10-26 12:28:49,145 - Gdb - INFO - CONS: ("Warning: 'set logging on', an alias for the command 'set logging enabled', "
 'is deprecated.\\n')
2023-10-26 12:28:49,145 - Gdb - INFO - CONS: "Use 'set logging enabled on'.\\n\\n"
2023-10-26 12:28:49,145 - Gdb - DEBUG - RESULT: done None
2023-10-26 12:28:49,145 - Debug Adapter (main) - DEBUG - Created gdb object of type: GdbEspXtensa
2023-10-26 12:28:49,145 - Gdb - DEBUG - MI->: -file-exec-and-symbols d:/Code/GivCEM/S3Ethernet_iperf/build/ethernet_basic.elf
2023-10-26 12:28:49,145 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Created gdb object of type: GdbEspXtensa\n", "source": {}}, "seq": 6}

[OpenOCD]
❌ Error: unable to open ftdi device with description '*', serial '*' at bus location '*'

[OpenOCD]
❌ c:\Espressif\tools\tools\openocd-esp32\v0.12.0-esp32-20230419/openocd-esp32/share/openocd/scripts/target/esp_common.cfg:4: Error: 
at file "c:\Espressif\tools\tools\openocd-esp32\v0.12.0-esp32-20230419/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 4

[OpenOCD]
[Stopped] : OpenOCD Server
[Debug Adapter]
2023-10-26 12:28:51,912 - Gdb - DEBUG - MI<-:
[{'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:51,912 - Gdb - DEBUG - RESULT: done None
2023-10-26 12:28:51,912 - Gdb - DEBUG - Connecting to 127.0.0.1:3333
2023-10-26 12:28:51,912 - Gdb - DEBUG - MI->: -target-select remote 127.0.0.1:3333

[Debug Adapter]
2023-10-26 12:28:51,961 - Gdb - DEBUG - MI<-:
[{'message': 'thread-group-started',
  'payload': {'id': 'i1', 'pid': '42000'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'thread-created',
  'payload': {'group-id': 'i1', 'id': '1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': None,
  'payload': '0x40041a76 in ?? ()\\n',
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'stopped',
  'payload': {'frame': {'addr': '0x40041a76',
                        'arch': 'xtensa',
                        'args': [],
                        'func': '??'},
              'stopped-threads': 'all',
              'thread-id': '1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'connected',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]

[Debug Adapter]
2023-10-26 12:28:51,961 - Gdb - INFO - NOTIFY: thread-group-started {'id': 'i1', 'pid': '42000'}
2023-10-26 12:28:51,961 - Gdb - INFO - NOTIFY: thread-created {'group-id': 'i1', 'id': '1'}
2023-10-26 12:28:51,961 - Gdb - INFO - CONS: '0x40041a76 in ?? ()\\n'
2023-10-26 12:28:51,961 - Gdb - INFO - NOTIFY: stopped {'frame': {'addr': '0x40041a76', 'arch': 'xtensa', 'args': [], 'func': '??'},
 'stopped-threads': 'all',
 'thread-id': '1'}
2023-10-26 12:28:51,961 - Gdb - DEBUG - RESULT: connected None
2023-10-26 12:28:51,961 - Debug Adapter (main) - WARNING - The operation took too long! - Measured 3.044909 s ( from ~ 12:28:48,916571)
2023-10-26 12:28:51,962 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 1, "success": true, "command": "initialize", "seq": 7, "body": {"supportsConfigurationDoneRequest": true, "supportsFunctionBreakpoints": false, "supportsConditionalBreakpoints": true, "supportsHitConditionalBreakpoints": true, "supportsEvaluateForHovers": false, "exceptionBreakpointFilters": false, "supportsStepBack": false, "supportsSetVariable": true, "supportsRestartFrame": false, "supportsGotoTargetsRequest": false, "supportsStepInTargetsRequest": true, "supportsCompletionsRequest": false, "completionTriggerCharacters": false, "supportsModulesRequest": false, "additionalModuleColumns": false, "supportedChecksumAlgorithms": false, "supportsRestartRequest": true, "supportsExceptionOptions": false, "supportsValueFormattingOptions": false, "supportsExceptionInfoRequest": false, "supportTerminateDebuggee": true, "supportsDelayedStackTraceLoading": false, "supportsLoadedSourcesRequest": false, "supportsLogPoints": true, "supportsTerminateThreadsRequest": false, "supportsSetExpression": false, "supportsTerminateRequest": false, "supportsDataBreakpoints": true, "supportsReadMemoryRequest": true, "supportsDisassembleRequest": true, "supportsCancelRequest": false, "supportsBreakpointLocationsRequest": false, "supportsClipboardContext": false, "supportsSteppingGranularity": true, "supportsInstructionBreakpoints": true}}

[Debug Adapter]
2023-10-26 12:28:51,962 - Debug Adapter(Command Processor) - DEBUG - Processed command: initialize
2023-10-26 12:28:51,962 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "initialized", "seq": 8}

2023-10-26 12:28:51,962 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter initialized\n", "source": {}}, "seq": 9}

[Debug Adapter]
2023-10-26 12:28:51,962 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "The operation took too long! - Measured 3.044909 s ( from ~ 12:28:48,916571)\n", "source": {}}, "seq": 10}

2023-10-26 12:28:51,962 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: initialize\n", "source": {}}, "seq": 11}

[Debug Adapter]
2023-10-26 12:28:51,964 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 272\\r\\n'<<

2023-10-26 12:28:51,964 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

[Debug Adapter]
2023-10-26 12:28:51,964 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "__configurationTarget": 6,
        "__sessionId": "2398aea1-1b28-40e6-978c-d0167d8d8b1a",
        "elfFilePath": "d:\\Code\\GivCEM\\S3Ethernet_iperf\\build\\ethernet_basic.elf",
        "name": "Launch-name",
        "request": "launch",
        "type": "espidf"
    },
    "command": "launch",
    "seq": 2,
    "type": "request"
}
2023-10-26 12:28:51,964 - Gdb - DEBUG - MI->: -interpreter-exec console "source C:/Espressif/tools/python_env/idf5.1_py3.11_env/Lib/site-packages/esp_debug_backend/hw_specific/esp_init.gdb"
2023-10-26 12:28:51,964 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"__configurationTarget\": 6,\n        \"__sessionId\": \"2398aea1-1b28-40e6-978c-d0167d8d8b1a\",\n        \"elfFilePath\": \"d:\\\\Code\\\\GivCEM\\\\S3Ethernet_iperf\\\\build\\\\ethernet_basic.elf\",\n        \"name\": \"Launch-name\",\n        \"request\": \"launch\",\n        \"type\": \"espidf\"\n    },\n    \"command\": \"launch\",\n    \"seq\": 2,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 12}

[Debug Adapter]
2023-10-26 12:28:52,304 - Gdb - DEBUG - MI<-:
[{'message': None,
  'payload': '[default ESP gdbinit file]',
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'cmd-param-changed',
  'payload': {'param': 'remotetimeout', 'value': '3'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'cmd-param-changed',
  'payload': {'param': 'remote hardware-watchpoint-limit', 'value': '2'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': None,
  'payload': 'JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 '
             '(Tensilica), part: 0x2003, ver: 0x1)\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 '
             '(Tensilica), part: 0x2003, ver: 0x1)\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] requesting target halt and executing a soft '
             'reset\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Debug controller was reset.\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Core was reset.\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x500000EF, '
             'debug_reason=00000000\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu1] requesting target halt and executing a soft '
             'reset\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Core was reset.\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x40000400, '
             'debug_reason=00000000\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu1] Debug controller was reset.\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu1] Core was reset.\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu1] Target halted, PC=0x40000400, '
             'debug_reason=00000000\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu1] Reset cause (3) - (Software core reset)\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': "Warning: 'flushregs', an alias for the command 'maintenance "
             "flush register-cache', is deprecated.\\n",
  'stream': 'stdout',
  'type': 'console'},
 {'message': None,
  'payload': "Use 'maintenance flush register-cache'.\\n\\n",
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:52,304 - Gdb - INFO - CONS: '[default ESP gdbinit file]'

[Debug Adapter]
2023-10-26 12:28:52,304 - Gdb - INFO - NOTIFY: cmd-param-changed {'param': 'remotetimeout', 'value': '3'}
2023-10-26 12:28:52,304 - Gdb - INFO - NOTIFY: cmd-param-changed {'param': 'remote hardware-watchpoint-limit', 'value': '2'}
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: ('JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), '
 'part: 0x2003, ver: 0x1)\\n')
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: ('JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), '
 'part: 0x2003, ver: 0x1)\\n')
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] requesting target halt and executing a soft reset\\n'
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Debug controller was reset.\\n'
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Core was reset.\\n'
2023-10-26 12:28:52,304 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] requesting target halt and executing a soft reset\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Core was reset.\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Debug controller was reset.\\n'

[Debug Adapter]
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Core was reset.\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Reset cause (3) - (Software core reset)\\n'
2023-10-26 12:28:52,305 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\\n'
2023-10-26 12:28:52,305 - Gdb - INFO - CONS: ("Warning: 'flushregs', an alias for the command 'maintenance flush "
 "register-cache', is deprecated.\\n")
2023-10-26 12:28:52,305 - Gdb - INFO - CONS: "Use 'maintenance flush register-cache'.\\n\\n"
2023-10-26 12:28:52,305 - Gdb - DEBUG - RESULT: done None

[Debug Adapter]
2023-10-26 12:28:52,806 - Gdb - DEBUG - MI->: mon esp appimage_offset 0x10000

[Debug Adapter]
2023-10-26 12:28:54,529 - Gdb - DEBUG - MI<-:
[{'message': None,
  'payload': 'mon esp appimage_offset 0x10000\\n',
  'stream': 'stdout',
  'type': 'log'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x403B244A, '
             'debug_reason=00000001\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': "Using flash bank 'esp32s3.cpu0.irom' size 300 KB\\n",
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x403B244A, '
             'debug_reason=00000001\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': "Using flash bank 'esp32s3.cpu0.drom' size 92 KB\\n",
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x403B244A, '
             'debug_reason=00000001\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': "Using flash bank 'esp32s3.cpu1.irom' size 300 KB\\n",
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': '[esp32s3.cpu0] Target halted, PC=0x403B244A, '
             'debug_reason=00000001\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n',
  'stream': 'stdout',
  'type': 'target'},
 {'message': None,
  'payload': "Using flash bank 'esp32s3.cpu1.drom' size 92 KB\\n",
  'stream': 'stdout',
  'type': 'target'},
 {'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:54,530 - Gdb - DEBUG - LOG: 'mon esp appimage_offset 0x10000\\n'

[Debug Adapter]
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B244A, debug_reason=00000001\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu0.irom' size 300 KB\\n"
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B244A, debug_reason=00000001\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu0.drom' size 92 KB\\n"
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B244A, debug_reason=00000001\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu1.irom' size 300 KB\\n"
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B244A, debug_reason=00000001\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c050020, 90 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x30020 -> 0x42000020, 297 KB\\n'
2023-10-26 12:28:54,530 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu1.drom' size 92 KB\\n"
2023-10-26 12:28:54,530 - Gdb - DEBUG - RESULT: done None

[Debug Adapter]
2023-10-26 12:28:54,530 - Gdb - DEBUG - MI->: -target-disconnect

[Debug Adapter]
2023-10-26 12:28:54,546 - Gdb - DEBUG - MI<-:
[{'message': 'thread-exited',
  'payload': {'group-id': 'i1', 'id': '1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'thread-group-exited',
  'payload': {'id': 'i1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]

[Debug Adapter]
2023-10-26 12:28:54,546 - Gdb - INFO - NOTIFY: thread-exited {'group-id': 'i1', 'id': '1'}
2023-10-26 12:28:54,546 - Gdb - INFO - NOTIFY: thread-group-exited {'id': 'i1'}
2023-10-26 12:28:54,546 - Gdb - DEBUG - RESULT: done None
2023-10-26 12:28:54,546 - Gdb - DEBUG - Connecting to 127.0.0.1:3333
2023-10-26 12:28:54,546 - Gdb - DEBUG - MI->: -target-select remote 127.0.0.1:3333

[Debug Adapter]
2023-10-26 12:28:54,595 - Gdb - DEBUG - MI<-:
[{'message': 'thread-group-started',
  'payload': {'id': 'i1', 'pid': '42000'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'thread-created',
  'payload': {'group-id': 'i1', 'id': '1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': None,
  'payload': '0x40000400 in ?? ()\\n',
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'stopped',
  'payload': {'frame': {'addr': '0x40000400',
                        'arch': 'xtensa',
                        'args': [],
                        'func': '??'},
              'stopped-threads': 'all',
              'thread-id': '1'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'},
 {'message': 'connected',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:54,595 - Gdb - INFO - NOTIFY: thread-group-started {'id': 'i1', 'pid': '42000'}
2023-10-26 12:28:54,595 - Gdb - INFO - NOTIFY: thread-created {'group-id': 'i1', 'id': '1'}

[Debug Adapter]
2023-10-26 12:28:54,595 - Gdb - INFO - CONS: '0x40000400 in ?? ()\\n'
2023-10-26 12:28:54,595 - Gdb - INFO - NOTIFY: stopped {'frame': {'addr': '0x40000400', 'arch': 'xtensa', 'args': [], 'func': '??'},
 'stopped-threads': 'all',
 'thread-id': '1'}
2023-10-26 12:28:54,595 - Gdb - DEBUG - RESULT: connected None
2023-10-26 12:28:54,595 - Gdb - DEBUG - MI->: -break-insert -t -i 0 app_main

[Debug Adapter]
2023-10-26 12:28:54,612 - Gdb - DEBUG - MI<-:
[{'message': None,
  'payload': 'Note: automatically using hardware breakpoints for read-only '
             'addresses.\\n',
  'stream': 'stdout',
  'type': 'console'},
 {'message': 'done',
  'payload': {'bkpt': {'addr': '0x42009e08',
                       'disp': 'del',
                       'enabled': 'y',
                       'file': 'D:/Code/GivCEM/S3Ethernet_iperf/main/main.c',
                       'fullname': 'D:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c',
                       'func': 'app_main',
                       'line': '207',
                       'number': '1',
                       'original-location': 'app_main',
                       'thread-groups': ['i1'],
                       'times': '0',
                       'type': 'breakpoint'}},
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:28:54,612 - Gdb - INFO - CONS: 'Note: automatically using hardware breakpoints for read-only addresses.\\n'
2023-10-26 12:28:54,612 - Gdb - DEBUG - RESULT: done {'bkpt': {'addr': '0x42009e08',
          'disp': 'del',
          'enabled': 'y',
          'file': 'D:/Code/GivCEM/S3Ethernet_iperf/main/main.c',
          'fullname': 'D:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c',
          'func': 'app_main',
          'line': '207',
          'number': '1',
          'original-location': 'app_main',
          'thread-groups': ['i1'],
          'times': '0',
          'type': 'breakpoint'}}
2023-10-26 12:28:54,612 - Gdb - DEBUG - MI->: -exec-continue --all

[Debug Adapter]
2023-10-26 12:28:54,630 - Gdb - DEBUG - MI<-:
[{'message': 'running',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'},
 {'message': 'running',
  'payload': {'thread-id': 'all'},
  'stream': 'stdout',
  'token': None,
  'type': 'notify'}]
2023-10-26 12:28:54,630 - Gdb - DEBUG - RESULT: running None

[Debug Adapter]
2023-10-26 12:28:55,130 - Gdb - INFO - NOTIFY: running {'thread-id': 'all'}
2023-10-26 12:28:55,130 - Gdb - DEBUG - new target state 2

[Debug Adapter]
2023-10-26 12:29:05,166 - Debug Adapter (main) - ERROR - Failed to wait for target state 1! Current state 2
Traceback (most recent call last):
  File "c:\Users\Albert So\.vscode\extensions\espressif.esp-idf-extension-1.6.5\esp_debug_adapter\debug_adapter\command_processor.py", line 144, in on_launch_request
    self.da.run(start=(not self.da.state.no_debug))
  File "c:\Users\Albert So\.vscode\extensions\espressif.esp-idf-extension-1.6.5\esp_debug_adapter\debug_adapter\debug_adapter.py", line 950, in run
    rsn = self._gdb.wait_target_state(dbg.TARGET_STATE_STOPPED, 10)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Espressif\tools\python_env\idf5.1_py3.11_env\Lib\site-packages\esp_debug_backend\gdb.py", line 581, in wait_target_state
    raise DebuggerTargetStateTimeoutError("Failed to wait for target state %d! Current state %d" % (state, self._target_state))
esp_debug_backend.defs.DebuggerTargetStateTimeoutError: Failed to wait for target state 1! Current state 2

[Debug Adapter]
2023-10-26 12:29:05,166 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Failed to wait for target state 1! Current state 2\n", "source": {}}, "seq": 13}

2023-10-26 12:29:05,167 - Debug Adapter(Command Processor) - DEBUG - Processed command: launch
2023-10-26 12:29:05,167 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Failed to wait for target state 1! Current state 2\n", "source": {}}, "seq": 14}

2023-10-26 12:29:05,167 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 205\\r\\n'<<

2023-10-26 12:29:05,167 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 2, "success": false, "command": "launch", "seq": 15}

[Debug Adapter]
2023-10-26 12:29:05,167 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

2023-10-26 12:29:05,168 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter is not running\n", "source": {}}, "seq": 16}

2023-10-26 12:29:05,168 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "breakpoints": [],
        "lines": [],
        "source": {
            "name": "iperf.c",
            "path": "d:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\iperf.c"
        },
        "sourceModified": false
    },
    "command": "setBreakpoints",
    "seq": 3,
    "type": "request"
}

[Debug Adapter]
2023-10-26 12:29:05,168 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: launch\n", "source": {}}, "seq": 17}

2023-10-26 12:29:05,168 - Debug Adapter (main) - DEBUG - Target state 2
2023-10-26 12:29:05,168 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"breakpoints\": [],\n        \"lines\": [],\n        \"source\": {\n            \"name\": \"iperf.c\",\n            \"path\": \"d:\\\\Code\\\\GivCEM\\\\S3Ethernet_iperf\\\\main\\\\iperf.c\"\n        },\n        \"sourceModified\": false\n    },\n    \"command\": \"setBreakpoints\",\n    \"seq\": 3,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 18}

2023-10-26 12:29:05,168 - Gdb - DEBUG - MI->: -exec-interrupt --all
2023-10-26 12:29:05,169 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Target state 2\n", "source": {}}, "seq": 19}

[Debug Adapter]
2023-10-26 12:29:05,186 - Gdb - DEBUG - MI<-:
[{'message': 'done',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:29:05,186 - Gdb - DEBUG - RESULT: done None

[Debug Adapter]
2023-10-26 12:29:05,687 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x40041A79, debug_reason=00000000\\n'
2023-10-26 12:29:05,687 - Gdb - DEBUG - TGT: "Set GDB target to 'esp32s3.cpu0'\\n"
2023-10-26 12:29:05,687 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Target halted, PC=0x40043A40, debug_reason=00000000\\n'
2023-10-26 12:29:05,687 - Gdb - INFO - CONS: '\\nProgram'
2023-10-26 12:29:05,687 - Gdb - INFO - CONS: ' received signal SIGINT, Interrupt.\\n'
2023-10-26 12:29:05,687 - Gdb - INFO - CONS: '0x40041a79 in ?? ()\\n'
2023-10-26 12:29:05,687 - Gdb - INFO - NOTIFY: stopped {'frame': {'addr': '0x40041a79', 'arch': 'xtensa', 'args': [], 'func': '??'},
 'reason': 'signal-received',
 'signal-meaning': 'Interrupt',
 'signal-name': 'SIGINT',
 'stopped-threads': 'all',
 'thread-id': '1'}

[Debug Adapter]
2023-10-26 12:29:05,687 - Gdb - DEBUG - new target state 1
2023-10-26 12:29:05,687 - Debug Adapter (main) - DEBUG - Reason of pause: 1
2023-10-26 12:29:05,687 - Debug Adapter(Command Processor) - DEBUG - Processed command: setBreakpoints
2023-10-26 12:29:05,687 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 218\\r\\n'<<

2023-10-26 12:29:05,687 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

2023-10-26 12:29:05,687 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "breakpoints": [
            {
                "line": 271
            }
        ],
        "lines": [
            271
        ],
        "source": {
            "name": "main.c",
            "path": "d:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c"
        },
        "sourceModified": false
    },
    "command": "setBreakpoints",
    "seq": 4,
    "type": "request"
}
2023-10-26 12:29:05,687 - Debug Adapter (main) - DEBUG - Target state 1
2023-10-26 12:29:05,687 - Debug Adapter (main) - DEBUG - Reason of pause: 1

[Debug Adapter]
2023-10-26 12:29:05,687 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Reason of pause: 1\n", "source": {}}, "seq": 20}

2023-10-26 12:29:05,688 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 3, "success": false, "command": "setBreakpoints", "body": {"breakpoints": []}, "seq": 21}

2023-10-26 12:29:05,688 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setBreakpoints\n", "source": {}}, "seq": 22}

2023-10-26 12:29:05,688 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"breakpoints\": [\n            {\n                \"line\": 271\n            }\n        ],\n        \"lines\": [\n            271\n        ],\n        \"source\": {\n            \"name\": \"main.c\",\n            \"path\": \"d:\\\\Code\\\\GivCEM\\\\S3Ethernet_iperf\\\\main\\\\main.c\"\n        },\n        \"sourceModified\": false\n    },\n    \"command\": \"setBreakpoints\",\n    \"seq\": 4,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 23}

2023-10-26 12:29:05,688 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Target state 1\n", "source": {}}, "seq": 24}

2023-10-26 12:29:05,688 - Gdb - DEBUG - MI->: -break-insert -i 0 d:\Code\GivCEM\S3Ethernet_iperf\main\main.c:271

[Debug Adapter]
2023-10-26 12:29:05,688 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Reason of pause: 1\n", "source": {}}, "seq": 25}

[Debug Adapter]
2023-10-26 12:29:05,692 - Gdb - DEBUG - MI<-:
[{'message': 'done',
  'payload': {'bkpt': {'addr': '0x42009ea3',
                       'disp': 'keep',
                       'enabled': 'y',
                       'file': 'D:/Code/GivCEM/S3Ethernet_iperf/main/main.c',
                       'fullname': 'D:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c',
                       'func': 'app_main',
                       'line': '271',
                       'number': '2',
                       'original-location': 'd:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c:271',
                       'thread-groups': ['i1'],
                       'times': '0',
                       'type': 'breakpoint'}},
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:29:05,692 - Gdb - DEBUG - RESULT: done {'bkpt': {'addr': '0x42009ea3',
          'disp': 'keep',
          'enabled': 'y',
          'file': 'D:/Code/GivCEM/S3Ethernet_iperf/main/main.c',
          'fullname': 'D:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c',
          'func': 'app_main',
          'line': '271',
          'number': '2',
          'original-location': 'd:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c:271',
          'thread-groups': ['i1'],
          'times': '0',
          'type': 'breakpoint'}}

[Debug Adapter]
2023-10-26 12:29:05,692 - Debug Adapter(Command Processor) - DEBUG - Processed command: setBreakpoints
2023-10-26 12:29:05,692 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 88\\r\\n'<<

2023-10-26 12:29:05,692 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

2023-10-26 12:29:05,692 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 4, "success": true, "command": "setBreakpoints", "body": {"breakpoints": [{"line": 271, "verified": "true", "source": {"name": "main.c", "path": "d:\\Code\\GivCEM\\S3Ethernet_iperf\\main\\main.c"}}]}, "seq": 26}

2023-10-26 12:29:05,693 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "breakpoints": []
    },
    "command": "setDataBreakpoints",
    "seq": 5,
    "type": "request"
}
2023-10-26 12:29:05,693 - Debug Adapter (main) - DEBUG - Target state 1
2023-10-26 12:29:05,693 - Debug Adapter (main) - DEBUG - Reason of pause: 1
2023-10-26 12:29:05,693 - Debug Adapter(Command Processor) - DEBUG - Processed command: setDataBreakpoints
2023-10-26 12:29:05,693 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 95\\r\\n'<<

2023-10-26 12:29:05,693 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

[Debug Adapter]
2023-10-26 12:29:05,693 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setBreakpoints\n", "source": {}}, "seq": 27}

2023-10-26 12:29:05,693 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "breakpoints": []
    },
    "command": "setInstructionBreakpoints",
    "seq": 6,
    "type": "request"
}
2023-10-26 12:29:05,693 - Debug Adapter (main) - DEBUG - Target state 1
2023-10-26 12:29:05,693 - Debug Adapter (main) - DEBUG - Reason of pause: 1
2023-10-26 12:29:05,693 - Debug Adapter(Command Processor) - DEBUG - Processed command: setInstructionBreakpoints

[Debug Adapter]
2023-10-26 12:29:05,693 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"breakpoints\": []\n    },\n    \"command\": \"setDataBreakpoints\",\n    \"seq\": 5,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 28}

[Debug Adapter]
2023-10-26 12:29:05,694 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 79\\r\\n'<<

2023-10-26 12:29:05,694 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Target state 1\n", "source": {}}, "seq": 29}

2023-10-26 12:29:05,694 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\\r\\n'<<

[Debug Adapter]
2023-10-26 12:29:05,694 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Reason of pause: 1\n", "source": {}}, "seq": 30}

2023-10-26 12:29:05,694 - Debug Adapter(Command Processor) - DEBUG - Got json: {
    "arguments": {
        "restart": false
    },
    "command": "disconnect",
    "seq": 7,
    "type": "request"
}

[Debug Adapter]
2023-10-26 12:29:05,694 - Debug Adapter (main) - DEBUG - Adapter is Stopping...
2023-10-26 12:29:05,694 - Debug Adapter (main) - DEBUG - Stopping target poller
2023-10-26 12:29:05,694 - Debug Adapter (main) - DEBUG - Closing the GDB process
2023-10-26 12:29:05,694 - Gdb - DEBUG - MI->: -gdb-exit
2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 5, "success": true, "command": "setDataBreakpoints", "body": {"breakpoints": []}, "seq": 31}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setDataBreakpoints\n", "source": {}}, "seq": 32}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"breakpoints\": []\n    },\n    \"command\": \"setInstructionBreakpoints\",\n    \"seq\": 6,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 33}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Target state 1\n", "source": {}}, "seq": 34}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Reason of pause: 1\n", "source": {}}, "seq": 35}

[Debug Adapter]
2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 6, "success": true, "command": "setInstructionBreakpoints", "body": {"breakpoints": []}, "seq": 36}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setInstructionBreakpoints\n", "source": {}}, "seq": 37}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n    \"arguments\": {\n        \"restart\": false\n    },\n    \"command\": \"disconnect\",\n    \"seq\": 7,\n    \"type\": \"request\"\n}\n", "source": {}}, "seq": 38}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter stopped\n", "source": {}}, "seq": 39}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Adapter is Stopping...\n", "source": {}}, "seq": 40}

2023-10-26 12:29:05,695 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Stopping target poller\n", "source": {}}, "seq": 41}

[Debug Adapter]
2023-10-26 12:29:05,696 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Closing the GDB process\n", "source": {}}, "seq": 42}

[Debug Adapter]
2023-10-26 12:29:05,707 - Gdb - DEBUG - MI<-:
[{'message': 'exit',
  'payload': None,
  'stream': 'stdout',
  'token': None,
  'type': 'result'}]
2023-10-26 12:29:05,707 - Gdb - DEBUG - RESULT: exit None

[Debug Adapter]
Exception in thread Thread-1 (_readerthread):
Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner

[Debug Adapter]
Exception in thread Thread-2 (_readerthread):
Traceback (most recent call last):
  File "threading.py", line 1038, in _bootstrap_inner
  File "threading.py", line 975, in run
  File "threading.py", line 975, in run
  File "subprocess.py", line 1552, in _readerthread
  File "subprocess.py", line 1552, in _readerthread

[Debug Adapter]
OSError: [Errno 22] Invalid argument
OSError: [Errno 22] Invalid argument

[Debug Adapter]
2023-10-26 12:29:05,709 - Debug Adapter (main) - DEBUG - Closing the Socket
2023-10-26 12:29:05,709 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Closing the Socket\n", "source": {}}, "seq": 43}

2023-10-26 12:29:05,709 - Debug Adapter (main) - DEBUG - Stopping of the Writer thread
2023-10-26 12:29:05,709 - Debug Adapter (main) - DEBUG - Stopping of the Reader thread

[Debug Adapter]
2023-10-26 12:29:05,709 - Debug Adapter (main) - DEBUG - Adapter is Stopped
DEBUG_ADAPTER_STOPPED
2023-10-26 12:29:05,709 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_STOPPED
2023-10-26 12:29:05,709 - Debug Adapter(Command Processor) - DEBUG - Processed command: disconnect

[Stopped] : ESP-IDF Debug Adapter
ChristopheTeillotHager commented 5 months ago

I encountered the same error and it was due to the fact that I hadn't selected the right target in the bottom bar of the VSCode environment (right next to the selected COM port). The default setting was esp32, but you need to be more precise. Maybe it's the same problem.