EspProg problem
Posted: Thu Jul 01, 2021 1:28 pm
Hi everyone,
I am trying to run esp-prog debugging on my ESP32-solo-1 chip using VSCode. Unfortunately I can't get it running, but if I switch to esp-wroom-32 it works fine.
Can anybody give me some ideas what should I do? Are there any differences between esp32-solo-1 and esp-wroom-32?
VSCode scripts:
launch.json
tasks.json
I am trying to run esp-prog debugging on my ESP32-solo-1 chip using VSCode. Unfortunately I can't get it running, but if I switch to esp-wroom-32 it works fine.
Can anybody give me some ideas what should I do? Are there any differences between esp32-solo-1 and esp-wroom-32?
VSCode scripts:
launch.json
Code: Select all
// ======================== launch.json ========================
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "launch",
"name": "Debug ESP32",
"target": "${workspaceFolder}/build/WiFi_Devices.elf",
"cwd": "${workspaceFolder}",
"gdbpath": "%userprofile%/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb", // Path of the toolchain
"autorun": [
"target remote :3333", // Connect to OpenOCD
"mon reset halt", // Reset the chip and keep the CPUs halted
"set remote hardware-watchpoint-limit 2", // Restrict GDB to using two hardware watchpoints supported by ESP32
"flushregs", // Force GDB to get new state from the target
"thb app_main", // Insert a temporary hardware breakpoint at the main function
"c" // Resume the program. It will then stop at breakpoint inserted at app_main
],
"preLaunchTask": "OpenOCD"
}
]
}
Code: Select all
// ======================== tasks.json ========================
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [{
"label": "Configure",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py menuconfig",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py menuconfig" }
},
{
"label": "Build",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py build",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py build" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Get size",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py size",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py size" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Clean",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py clean",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py clean" }
},
{
"label": "Clean (full)",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py fullclean",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py fullclean" }
},
{
"label": "Flash",
"group": "test",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py flash",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py flash" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Erase flash",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py erase_flash",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py erase_flash" }
},
{
"label": "Monitor",
"group": "test",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py monitor",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py monitor" },
"isBackground": true,
//"dependsOn": ["Flash"]
},
{
"label": "OpenOCD",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-solo-1.cfg",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-solo-1.cfg" },
"isBackground": true,
"problemMatcher": {
"pattern": {
"regexp": "^(Info |Warn ):(.*)$", // Ignore errors
"severity": 1,
"message": 2
},
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "Info : Listening on port \\d+ for gdb connections"
}
}
}
]
}