espressif / esp-idf

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

Cannot debug in VSCode with ESP32-S3 and built-in JTAG (IDFGH-9416) #10785

Open mbastida123 opened 1 year ago

mbastida123 commented 1 year ago

Answers checklist.

General issue report

Hi,

I get an error when trying to debug with esp-idf debug on VSCode.

This is part of my settings.json:

    "idf.openOcdConfigs": [
        "board/esp32s3-bridge.cfg"
    ],
    "idf.adapterTargetName": "esp32s3"

launch.json

{
    "version": "0.2.0",
    "configurations": [
      {
        "type": "espidf",
        "name": "Launch",
        "request": "launch",
        "debugPort": 9998,
        "logLevel": 4,
        "mode": "auto",
        "verifyAppBinBeforeDebug": false,
        "tmoScaleFactor": 2
      }
    ]
  }

If I run openocd -f board/esp32s3-builtin.cfg from terminal everything seems to be in order:

Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:48) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect '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 Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED Info : esp_usb_jtag: serial (68:B6:B3:48:87:04) 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) Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Warn : target esp32s3.cpu1 examination failed Info : starting gdb server for esp32s3.cpu0 on 3333 Info : Listening on port 3333 for gdb connections Info : [esp32s3.cpu0] Target halted, PC=0x40041A79, debug_reason=00000000 Error: [esp32s3.cpu0] Timed out waiting for CPU to be reset, target state=2 Info : [esp32s3.cpu0] Reset cause (1) - (Power on reset) Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000

And moreover I can see the USB device on the device manager: image

Now if I press F5 to start debug session I get on the output:

[OpenOCD] Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48) 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] Info : Listening on port 6666 for tcl connections [OpenOCD] Info : Listening on port 4444 for telnet connections [OpenOCD] ❌ Error: no device found Error: unable to open ftdi device with vid 0403, pid 6010, description '', serial '' at bus location '' [OpenOCD] ❌ Error: no device found Error: unable to open ftdi device[OpenOCD] with vid 0403, pid 6014, description '', serial '' at bus location '' [OpenOCD]

[OpenOCD] [Stopped] : OpenOCD Server [Debug Adapter] 2023-02-17 10:00:40,255 - Debug Adapter (main) - DEBUG - START_TIME_2023_02_17_10-00-40 [Debug Adapter] 2023-02-17 10:00:40,255 - Debug Adapter (main) - DEBUG - Init errors:None 2023-02-17 10:00:40,263 - Debug Adapter (main) - INFO - Working directory: C:\Users\Marti\AppData\Local\Programs\Microsoft VS Code [Debug Adapter] 2023-02-17 10:00:40,263 - 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': ( 'c:\Users\Marti\Downloads\Modem_OTA_HTTPS\build\Modem_OTA_HTTPS.elf',), 'log_file': 'c:\Users\Marti\Downloads\Modem_OTA_HTTPS\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': 9998, 'postmortem': False, 'tmo_scale_factor': 2, 'toolchain_prefix': 'xtensa-esp32s3-elf-'} DEBUG_ADAPTER_STARTED 2023-02-17 10:00:40,263 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_STARTED 2023-02-17 10:00:40,263 - Debug Adapter (main) - INFO - Starting. Cmd: c:\Users\Marti.vscode\extensions\espressif.esp-idf-extension-1.5.1\esp_debug_adapter\debug_adapter_main.py -d 4 -e c:\Users\Marti\Downloads\Modem_OTA_HTTPS\build\Modem_OTA_HTTPS.elf -l c:\Users\Marti\Downloads\Modem_OTA_HTTPS\debug.log -p 9998 -dn esp32s3 -a 0x10000 -t xtensa-esp32s3-elf- -tsf 2

[Debug Adapter] 2023-02-17 10:00:40,271 - Debug Adapter (main) - INFO - Listening on port 9998 [Debug Adapter] DEBUG_ADAPTER_READY2CONNECT 2023-02-17 10:00:40,272 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_READY2CONNECT [Debug Adapter] 2023-02-17 10:00:40,275 - Debug Adapter (main) - DEBUG - Got connection [Debug Adapter] 2023-02-17 10:00:40,276 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug adapter -> Extension: DEBUG_ADAPTER_STARTED\n", "source": {}}, "seq": 0}

[Debug Adapter] 2023-02-17 10:00:40,276 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Starting. Cmd: c:\Users\Marti\.vscode\extensions\espressif.esp-idf-extension-1.5.1\esp_debug_adapter\debug_adapter_main.py -d 4 -e c:\Users\Marti\Downloads\Modem_OTA_HTTPS\build\Modem_OTA_HTTPS.elf -l c:\Users\Marti\Downloads\Modem_OTA_HTTPS\debug.log -p 9998 -dn esp32s3 -a 0x10000 -t xtensa-esp32s3-elf- -tsf 2\n\n", "source": {}}, "seq": 1}

2023-02-17 10:00:40,276 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Listening on port 9998\n", "source": {}}, "seq": 2}

2023-02-17 10:00:40,276 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug adapter -> Extension: DEBUG_ADAPTER_READY2CONNECT\n", "source": {}}, "seq": 3}

2023-02-17 10:00:40,276 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got connection\n", "source": {}}, "seq": 4}

[Debug Adapter] 2023-02-17 10:00:40,282 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 477\r\n'<<

2023-02-17 10:00:40,283 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\r\n'<<

2023-02-17 10:00:40,284 - 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, "supportsVariablePaging": true, "supportsVariableType": true }, "command": "initialize", "seq": 1, "type": "request" } 2023-02-17 10:00:40,284 - 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 \"supportsVariablePaging\": true,\n \"supportsVariableType\": true\n },\n \"command\": \"initialize\",\n \"seq\": 1,\n \"type\": \"request\"\n}\n", "source": {}}, "seq": 5}

[Debug Adapter] 2023-02-17 10:00:40,293 - Gdb - DEBUG - MI->: -gdb-set mi-async on [Debug Adapter] 2023-02-17 10:00:40,320 - Gdb - DEBUG - MI<-: [{'message': None, 'payload': 'c:\Users\Marti\esp\.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch5-8.4.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gdb.exe: ' "warning: Couldn't determine a path for the index cache " 'directory.', 'stream': 'stderr', 'type': 'output'}, {'message': 'thread-group-added', 'payload': {'id': 'i1'}, 'stream': 'stdout', 'token': None, 'type': 'notify'}, {'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:40,320 - Gdb - INFO - NOTIFY: thread-group-added {'id': 'i1'} 2023-02-17 10:00:40,320 - Gdb - DEBUG - RESULT: done None [Debug Adapter] 2023-02-17 10:00:40,320 - Gdb - DEBUG - MI->: -gdb-set logging file C:\Users\Marti\AppData\Local\Temp\gdb_proc.log [Debug Adapter] 2023-02-17 10:00:40,345 - Gdb - DEBUG - MI<-: [{'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:40,345 - Gdb - DEBUG - RESULT: done None 2023-02-17 10:00:40,345 - Gdb - DEBUG - MI->: -gdb-set logging on [Debug Adapter] 2023-02-17 10:00:40,359 - Gdb - DEBUG - MI<-: [{'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:40,359 - Gdb - DEBUG - RESULT: done None 2023-02-17 10:00:40,359 - Debug Adapter (main) - DEBUG - Created gdb object of type: GdbEspXtensa [Debug Adapter] 2023-02-17 10:00:40,359 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Created gdb object of type: GdbEspXtensa\n", "source": {}}, "seq": 6}

2023-02-17 10:00:40,359 - Gdb - DEBUG - MI->: -file-exec-and-symbols c:/Users/Marti/Downloads/Modem_OTA_HTTPS/build/Modem_OTA_HTTPS.elf [Debug Adapter] 2023-02-17 10:00:40,715 - Gdb - DEBUG - MI<-: [{'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] 2023-02-17 10:00:40,715 - Gdb - DEBUG - RESULT: done None 2023-02-17 10:00:40,715 - Gdb - DEBUG - Connecting to 127.0.0.1:3333 [Debug Adapter] 2023-02-17 10:00:40,715 - Gdb - DEBUG - MI->: -target-select remote 127.0.0.1:3333 [Debug Adapter] 2023-02-17 10:00:41,034 - 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': '0x40041a79 in ?? ()\n', 'stream': 'stdout', 'type': 'console'}, {'message': 'stopped', 'payload': {'frame': {'addr': '0x40041a79', '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-02-17 10:00:41,034 - Gdb - INFO - NOTIFY: thread-group-started {'id': 'i1', 'pid': '42000'} [Debug Adapter] 2023-02-17 10:00:41,034 - Gdb - INFO - NOTIFY: thread-created {'group-id': 'i1', 'id': '1'} 2023-02-17 10:00:41,034 - Gdb - INFO - CONS: '0x40041a79 in ?? ()\n' 2023-02-17 10:00:41,035 - Gdb - INFO - NOTIFY: stopped {'frame': {'addr': '0x40041a79', 'arch': 'xtensa', 'args': [], 'func': '??'}, 'stopped-threads': 'all', 'thread-id': '1'} 2023-02-17 10:00:41,035 - Gdb - DEBUG - RESULT: connected None 2023-02-17 10:00:41,035 - Debug Adapter(Command Processor) - DEBUG - Processed command: initialize 2023-02-17 10:00:41,035 - 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": false, "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-02-17 10:00:41,035 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "initialized", "seq": 8}

2023-02-17 10:00:41,036 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter initialized\n", "source": {}}, "seq": 9}

2023-02-17 10:00:41,037 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: initialize\n", "source": {}}, "seq": 10}

[Debug Adapter] 2023-02-17 10:00:41,039 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 391\r\n'<<

[Debug Adapter] 2023-02-17 10:00:41,039 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\r\n'<<

2023-02-17 10:00:41,042 - Debug Adapter(Command Processor) - DEBUG - Got json: { "arguments": { "configurationTarget": 6, "sessionId": "d64e3079-c14a-4fc4-96b7-2e41f51450c6", "debugPort": 9998, "elfFilePath": "c:\Users\Marti\Downloads\Modem_OTA_HTTPS\build\Modem_OTA_HTTPS.elf", "logLevel": 4, "mode": "auto", "name": "Launch", "request": "launch", "tmoScaleFactor": 2, "type": "espidf", "verifyAppBinBeforeDebug": false }, "command": "launch", "seq": 2, "type": "request" } 2023-02-17 10:00:41,042 - Gdb - DEBUG - MI->: -interpreter-exec console "source C:/Users/Marti/.vscode/extensions/espressif.esp-idf-extension-1.5.1/esp_debug_adapter/debug_adapter/debug_backend/debug_backend/hw_specific/esp_init.gdb" 2023-02-17 10:00:41,042 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n \"arguments\": {\n \"configurationTarget\": 6,\n \"sessionId\": \"d64e3079-c14a-4fc4-96b7-2e41f51450c6\",\n \"debugPort\": 9998,\n \"elfFilePath\": \"c:\\Users\\Marti\\Downloads\\Modem_OTA_HTTPS\\build\\Modem_OTA_HTTPS.elf\",\n \"logLevel\": 4,\n \"mode\": \"auto\",\n \"name\": \"Launch\",\n \"request\": \"launch\",\n \"tmoScaleFactor\": 2,\n \"type\": \"espidf\",\n \"verifyAppBinBeforeDebug\": false\n },\n \"command\": \"launch\",\n \"seq\": 2,\n \"type\": \"request\"\n}\n", "source": {}}, "seq": 11}

[Debug Adapter] 2023-02-17 10:00:41,802 - 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': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] 2023-02-17 10:00:41,802 - Gdb - INFO - CONS: '[default ESP gdbinit file]' 2023-02-17 10:00:41,802 - Gdb - INFO - NOTIFY: cmd-param-changed {'param': 'remotetimeout', 'value': '3'} 2023-02-17 10:00:41,802 - Gdb - INFO - NOTIFY: cmd-param-changed {'param': 'remote hardware-watchpoint-limit', 'value': '2'} [Debug Adapter] 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: ('JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), ' 'part: 0x2003, ver: 0x1)\n') 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: ('JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), ' 'part: 0x2003, ver: 0x1)\n') 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] requesting target halt and executing a soft reset\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Debug controller was reset.\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Core was reset.\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] requesting target halt and executing a soft reset\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Core was reset.\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Debug controller was reset.\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Core was reset.\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu1] Reset cause (3) - (Software core reset)\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Reset cause (3) - (Software core reset)\n' 2023-02-17 10:00:41,802 - Gdb - DEBUG - RESULT: done None [Debug Adapter] 2023-02-17 10:00:42,303 - Gdb - DEBUG - MI->: mon esp appimage_offset 0x10000 [Debug Adapter] 2023-02-17 10:00:45,261 - Gdb - DEBUG - MI<-: [{'message': None, 'payload': 'mon esp appimage_offset 0x10000\n', 'stream': 'stdout', 'type': 'log'}, {'message': None, 'payload': '[esp32s3.cpu0] Target halted, PC=0x403B2482, ' 'debug_reason=00000001\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': "Using flash bank 'esp32s3.cpu0.irom' size 656 KB\n", 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': '[esp32s3.cpu0] Target halted, PC=0x403B2482, ' 'debug_reason=00000001\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': "Using flash bank 'esp32s3.cpu0.drom' size 268 KB\n", 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': '[esp32s3.cpu0] Target halted, PC=0x403B2482, ' 'debug_reason=00000001\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': "Using flash bank 'esp32s3.cpu1.irom' size 656 KB\n", 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': '[esp32s3.cpu0] Target halted, PC=0x403B2482, ' 'debug_reason=00000001\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n', 'stream': 'stdout', 'type': 'target'}, {'message': None, 'payload': "Using flash bank 'esp32s3.cpu1.drom' size 268 KB\n", 'stream': 'stdout', 'type': 'target'}, {'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:45,261 - Gdb - DEBUG - LOG: 'mon esp appimage_offset 0x10000\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B2482, debug_reason=00000001\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu0.irom' size 656 KB\n" 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B2482, debug_reason=00000001\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu0.drom' size 268 KB\n" 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B2482, debug_reason=00000001\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu1.irom' size 656 KB\n" 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: '[esp32s3.cpu0] Target halted, PC=0x403B2482, debug_reason=00000001\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 0: 0x10020 -> 0x3c0b0020, 265 KB\n' [Debug Adapter] 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: 'Flash mapping 1: 0x60020 -> 0x42000020, 652 KB\n' 2023-02-17 10:00:45,261 - Gdb - DEBUG - TGT: "Using flash bank 'esp32s3.cpu1.drom' size 268 KB\n" 2023-02-17 10:00:45,261 - Gdb - DEBUG - RESULT: done None 2023-02-17 10:00:45,261 - Gdb - DEBUG - MI->: -target-disconnect [Debug Adapter] 2023-02-17 10:00:45,285 - Gdb - DEBUG - MI<-: [{'message': 'thread-group-exited', 'payload': {'id': 'i1'}, 'stream': 'stdout', 'token': None, 'type': 'notify'}, {'message': 'done', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] 2023-02-17 10:00:45,285 - Gdb - INFO - NOTIFY: thread-group-exited {'id': 'i1'} 2023-02-17 10:00:45,285 - Gdb - DEBUG - RESULT: done None [Debug Adapter] 2023-02-17 10:00:45,285 - Gdb - DEBUG - Connecting to 127.0.0.1:3333 2023-02-17 10:00:45,285 - Gdb - DEBUG - MI->: -target-select remote 127.0.0.1:3333 [Debug Adapter] 2023-02-17 10:00:45,538 - 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'}] [Debug Adapter] 2023-02-17 10:00:45,538 - Gdb - INFO - NOTIFY: thread-group-started {'id': 'i1', 'pid': '42000'} 2023-02-17 10:00:45,538 - Gdb - INFO - NOTIFY: thread-created {'group-id': 'i1', 'id': '1'} 2023-02-17 10:00:45,538 - Gdb - INFO - CONS: '0x40000400 in ?? ()\n' 2023-02-17 10:00:45,538 - Gdb - INFO - NOTIFY: stopped {'frame': {'addr': '0x40000400', 'arch': 'xtensa', 'args': [], 'func': '??'}, 'stopped-threads': 'all', 'thread-id': '1'} 2023-02-17 10:00:45,538 - Gdb - DEBUG - RESULT: connected None 2023-02-17 10:00:45,538 - Gdb - DEBUG - MI->: -break-insert -t -i 0 app_main [Debug Adapter] 2023-02-17 10:00:45,614 - Gdb - DEBUG - MI<-: [{'message': 'done', 'payload': {'bkpt': {'addr': '0x42009658', 'disp': 'del', 'enabled': 'y', 'file': 'C:/Users/Marti/Downloads/Modem_OTA_HTTPS/main/main.cpp', 'fullname': 'C:\Users\Marti\Downloads\Modem_OTA_HTTPS\main\main.cpp', 'func': 'app_main()', 'line': '22', 'number': '1', 'original-location': 'app_main', 'thread-groups': ['i1'], 'times': '0', 'type': 'breakpoint'}}, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:45,614 - Gdb - DEBUG - RESULT: done {'bkpt': {'addr': '0x42009658', 'disp': 'del', 'enabled': 'y', 'file': 'C:/Users/Marti/Downloads/Modem_OTA_HTTPS/main/main.cpp', 'fullname': 'C:\Users\Marti\Downloads\Modem_OTA_HTTPS\main\main.cpp', 'func': 'app_main()', 'line': '22', 'number': '1', 'original-location': 'app_main', 'thread-groups': ['i1'], 'times': '0', 'type': 'breakpoint'}} [Debug Adapter] 2023-02-17 10:00:45,614 - Gdb - DEBUG - MI->: -exec-continue --all [Debug Adapter] 2023-02-17 10:00:45,630 - Gdb - DEBUG - MI<-: [{'message': 'running', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] [Debug Adapter] 2023-02-17 10:00:45,630 - Gdb - DEBUG - RESULT: running None [Debug Adapter] 2023-02-17 10:00:46,131 - Gdb - INFO - NOTIFY: running {'thread-id': 'all'} [Debug Adapter] 2023-02-17 10:00:46,131 - Gdb - DEBUG - new target state 2 [Debug Adapter] 2023-02-17 10:00:46,631 - Gdb - INFO - CONS: 'Note: automatically using hardware breakpoints for read-only addresses.\n' [Debug Adapter] 2023-02-17 10:01:06,225 - Debug Adapter (main) - ERROR - Failed to wait for target state 1! Current state 2 Traceback (most recent call last): File "c:\Users\Marti.vscode\extensions\espressif.esp-idf-extension-1.5.1\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\Marti.vscode\extensions\espressif.esp-idf-extension-1.5.1\esp_debug_adapter\debug_adapter\debug_adapter.py", line 901, in run rsn = self._gdb.wait_target_state(dbg.TARGET_STATE_STOPPED, 10) File "c:\Users\Marti.vscode\extensions\espressif.esp-idf-extension-1.5.1\esp_debug_adapter\debug_adapter\debug_backend\debug_backend\gdb.py", line 560, in wait_target_state raise DebuggerTargetStateTimeoutError("Failed to wait for target state %d! Current state %d" % (state, self._target_state)) debug_adapter.debug_backend.debug_backend.defs.DebuggerTargetStateTimeoutError: Failed to wait for target state 1! Current state 2 [Debug Adapter] 2023-02-17 10:01:06,225 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Failed to wait for target state 1! Current state 2\n", "source": {}}, "seq": 12}

2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Processed command: launch 2023-02-17 10:01:06,227 - 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-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 88\r\n'<<

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 2, "success": false, "command": "launch", "seq": 14}

2023-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\r\n'<<

2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Got json: { "arguments": { "breakpoints": [] }, "command": "setDataBreakpoints", "seq": 3, "type": "request" } 2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter is not running\n", "source": {}}, "seq": 15}

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Processed command: setDataBreakpoints 2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: launch\n", "source": {}}, "seq": 16}

2023-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 95\r\n'<<

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\r\n'<<

2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Got json: { "arguments": { "breakpoints": [] }, "command": "setInstructionBreakpoints", "seq": 4, "type": "request" } 2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Processed command: setInstructionBreakpoints 2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n \"arguments\": {\n \"breakpoints\": []\n },\n \"command\": \"setDataBreakpoints\",\n \"seq\": 3,\n \"type\": \"request\"\n}\n", "source": {}}, "seq": 17}

2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 3, "success": true, "command": "setDataBreakpoints", "body": {"breakpoints": []}, "seq": 18}

2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setDataBreakpoints\n", "source": {}}, "seq": 19}

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n \"arguments\": {\n \"breakpoints\": []\n },\n \"command\": \"setInstructionBreakpoints\",\n \"seq\": 4,\n \"type\": \"request\"\n}\n", "source": {}}, "seq": 20}

2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "response", "request_seq": 4, "success": true, "command": "setInstructionBreakpoints", "body": {"breakpoints": []}, "seq": 21}

2023-02-17 10:01:06,227 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Processed command: setInstructionBreakpoints\n", "source": {}}, "seq": 22}

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'Content-Length: 79\r\n'<<

2023-02-17 10:01:06,227 - Debug Adapter (ReaderThread) - DEBUG - read line: >>b'\r\n'<<

[Debug Adapter] 2023-02-17 10:01:06,227 - Debug Adapter(Command Processor) - DEBUG - Got json: { "arguments": { "restart": false }, "command": "disconnect", "seq": 5, "type": "request" } 2023-02-17 10:01:06,235 - Debug Adapter (main) - DEBUG - Adapter is Stopping... [Debug Adapter] 2023-02-17 10:01:06,235 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Got json: {\n \"arguments\": {\n \"restart\": false\n },\n \"command\": \"disconnect\",\n \"seq\": 5,\n \"type\": \"request\"\n}\n", "source": {}}, "seq": 23}

2023-02-17 10:01:06,235 - Debug Adapter (main) - DEBUG - Stopping target poller 2023-02-17 10:01:06,235 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Debug Adapter stopped\n", "source": {}}, "seq": 24}

2023-02-17 10:01:06,235 - Debug Adapter (main) - DEBUG - Closing the GDB process 2023-02-17 10:01:06,235 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Adapter is Stopping...\n", "source": {}}, "seq": 25}

[Debug Adapter] 2023-02-17 10:01:06,235 - Gdb - DEBUG - MI->: -gdb-exit [Debug Adapter] 2023-02-17 10:01:06,235 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Stopping target poller\n", "source": {}}, "seq": 26}

2023-02-17 10:01:06,235 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Closing the GDB process\n", "source": {}}, "seq": 27}

[Debug Adapter] 2023-02-17 10:01:06,242 - Gdb - DEBUG - MI<-: [{'message': 'exit', 'payload': None, 'stream': 'stdout', 'token': None, 'type': 'result'}] 2023-02-17 10:01:06,242 - Gdb - DEBUG - RESULT: exit None 2023-02-17 10:01:06,245 - Debug Adapter (main) - DEBUG - list index out of range [Debug Adapter] Exception in thread Thread-1: Traceback (most recent call last): File "threading.py", line 932, in _bootstrap_inner Exception in thread Thread-2: Traceback (most recent call last): File "threading.py", line 932, in _bootstrap_inner File "threading.py", line 870, in run File "threading.py", line 870, in run File "subprocess.py", line 1366, in _readerthread File "subprocess.py", line 1366, in _readerthread OSError: [Errno 22] Invalid argument OSError: [Errno 22] Invalid argument [Debug Adapter] 2023-02-17 10:01:06,245 - Debug Adapter (main) - DEBUG - Closing the Socket 2023-02-17 10:01:06,245 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "list index out of range\n", "source": {}}, "seq": 28}

2023-02-17 10:01:06,245 - Debug Adapter (main) - DEBUG - Stopping of the Writer thread 2023-02-17 10:01:06,245 - Debug Adapter (WriterThread) - DEBUG - Writing: {"type": "event", "event": "output", "body": {"output": "Closing the Socket\n", "source": {}}, "seq": 29}

2023-02-17 10:01:06,247 - Debug Adapter (main) - DEBUG - Stopping of the Reader thread 2023-02-17 10:01:06,247 - Debug Adapter (main) - DEBUG - Adapter is Stopped DEBUG_ADAPTER_STOPPED 2023-02-17 10:01:06,247 - Debug Adapter (main) - CRITICAL - Debug adapter -> Extension: DEBUG_ADAPTER_STOPPED 2023-02-17 10:01:06,248 - Debug Adapter(Command Processor) - DEBUG - Processed command: disconnect [Stopped] : ESP-IDF Debug Adapter

brianignacio5 commented 1 year ago

It seems that Failed to wait for target state %d! Current state %d" % I would suggest to update the launch.json to increase the timeout "tmoScaleFactor": 2 for a bigger factor. Using the logLevel 4 would also show more timeout issues if you think the application is working fine reduce the logLevel to 2.

mbastida123 commented 1 year ago

It seems that Failed to wait for target state %d! Current state %d" % I would suggest to update the launch.json to increase the timeout "tmoScaleFactor": 2 for a bigger factor. Using the logLevel 4 would also show more timeout issues if you think the application is working fine reduce the logLevel to 2.

Hi @brianignacio5 and thanks for the reply.

incressing tmoScaleFactor to 4 didin't yield any result.

However using openOCD I see this output now:

Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:48) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect '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 Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED Info : esp_usb_jtag: serial (68:B6:B3:48:87:04) 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) Error: [esp32s3.cpu1] Unexpected OCD_ID = 00000000 Warn : target esp32s3.cpu1 examination failed Info : starting gdb server for esp32s3.cpu0 on 3333 Info : Listening on port 3333 for gdb connections Info : [esp32s3.cpu0] Debug controller was reset. Error: libusb_bulk_write error: LIBUSB_ERROR_PIPE Info : [esp32s3.cpu0] Core was reset. Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: Failed to exec JTAG queue! Error: Failed to read debug stubs address location (-104)! Polling target esp32s3.cpu0 failed, trying to reexamine Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: [esp32s3.cpu0] Unexpected OCD_ID = 0b339fd2 Examination failed, GDB will be halted. Polling again in 100ms Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: Failed to exec JTAG queue! Error: Failed to read debug stubs address location (-104)! Polling target esp32s3.cpu0 failed, trying to reexamine Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: [esp32s3.cpu0] Unexpected OCD_ID = 0b339fd2 Examination failed, GDB will be halted. Polling again in 300ms Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: Failed to exec JTAG queue! Error: Failed to read debug stubs address location (-104)! Polling target esp32s3.cpu0 failed, trying to reexamine Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: [esp32s3.cpu0] Unexpected OCD_ID = 0b339fd2 Examination failed, GDB will be halted. Polling again in 700ms Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE Error: missing data from bitq interface Error: Failed to exec JTAG queue! Error: Failed to read debug stubs address location (-104)! Polling target esp32s3.cpu0 failed, trying to reexamine Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: [esp32s3.cpu0] Unexpected OCD_ID = 0b339fd2 Examination failed, GDB will be halted. Polling again in 1500ms Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: Failed to exec JTAG queue! Error: Failed to read debug stubs address location (-104)! Polling target esp32s3.cpu0 failed, trying to reexamine Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: libusb_bulk_write error: LIBUSB_ERROR_IO Error: missing data from bitq interface Error: [esp32s3.cpu0] Unexpected OCD_ID = 0b339fd2 Examination failed, GDB will be halted. Polling again in 3100ms shutdown command invoked Error: libusb_bulk_write error: LIBUSB_ERROR_IO

Is this LIBUSB_ERROR_IO normal?

brianignacio5 commented 1 year ago

Something's off here in openOCD result. Maybe there is some information in the openOCD troubleshooting FAQ. Could you please take a look @gerekon ?

mituritsyn commented 11 months ago

Is this LIBUSB_ERROR_IO normal?

you need to connect with boot shorted.

Faced same issue any solutions?