Skip to content

Commit

Permalink
Merge branch 'fix/execute-gdb-without-built-app' into 'master'
Browse files Browse the repository at this point in the history
tools: fix idf.py gdb execution in case app was not built

See merge request espressif/esp-idf!35485
  • Loading branch information
Lapshin committed Dec 6, 2024
2 parents 05db66b + e0bb3a2 commit 6469852
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/idf_py_actions/debug_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ def openocd(action: str, ctx: Context, args: PropertyDict, openocd_scripts: Opti
print('OpenOCD started as a background task {}'.format(process.pid))

def get_gdb_args(project_desc: Dict[str, Any], gdb_x: Tuple, gdb_ex: Tuple, gdb_commands: Optional[str]) -> List[str]:
# check if the application was built and ELF file is in place.
app_elf = os.path.join(project_desc.get('build_dir', ''), project_desc.get('app_elf', ''))
if not os.path.exists(app_elf):
raise FatalError('ELF file not found. You need to build & flash the project before running debug targets')
# debugger application name (xtensa-esp32-elf-gdb, riscv32-esp-elf-gdb, ...)
gdb_name = project_desc.get('monitor_toolprefix', '') + 'gdb'
gdb_args = [gdb_name]
Expand Down

0 comments on commit 6469852

Please sign in to comment.