mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined options that described in project_description.json file allow to pass custom options to "idf.py gdb": --gdb-commands: command line arguments for gdb. (without changes) -ex: pass command to gdb. -x: pass gdbinit file to gdb. Alias for old --gdbinit command
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# __get_openocd_options
|
||||
# Prepares openocd default options for the target.
|
||||
function(__get_openocd_options openocd_option_var)
|
||||
if(CONFIG_IDF_TARGET STREQUAL "esp32")
|
||||
set(${openocd_option_var} "-f board/esp32-wrover-kit-3.3v.cfg" PARENT_SCOPE)
|
||||
elseif(CONFIG_IDF_TARGET STREQUAL "esp32s2")
|
||||
set(${openocd_option_var} "-f board/esp32s2-kaluga-1.cfg" PARENT_SCOPE)
|
||||
elseif(CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED)
|
||||
set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-builtin.cfg" PARENT_SCOPE)
|
||||
else()
|
||||
set(${openocd_option_var}
|
||||
"-f interface/ftdi/esp32_devkitj_v1.cfg -f target/${CONFIG_IDF_TARGET}.cfg" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user