Skip to content

Commit 6e5145b

Browse files
committed
platform: make debug_custom.json file customizable by board
1 parent 2fb5ee6 commit 6e5145b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: platform.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ build.openocdscript.esp32c6=esp32c6-builtin.cfg
115115
build.openocdscript.esp32c6=esp32h2-builtin.cfg
116116
build.openocdscript={build.openocdscript.{build.mcu}}
117117

118+
# Debug plugin configuration
119+
build.debugconfig={build.mcu}.json
120+
118121
# Custom build options
119122
build.opt.name=build_opt.h
120123
build.opt.path={build.path}/{build.opt.name}
@@ -156,8 +159,8 @@ recipe.hooks.postbuild.1.pattern=bash -c "[ {build.copy_jtag_files} -eq 0 ] || c
156159
recipe.hooks.postbuild.1.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{debug.server.openocd.scripts_dir}board\{build.openocdscript}" "{build.source.path}\debug.cfg"
157160

158161
# Generate debug_custom.json
159-
recipe.hooks.postbuild.2.pattern=bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{runtime.platform.path}"/tools/ide-debug/{build.mcu}.json "{build.source.path}"/debug_custom.json"
160-
recipe.hooks.postbuild.2.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{runtime.platform.path}\tools\ide-debug\{build.mcu}.json" "{build.source.path}\debug_custom.json"
162+
recipe.hooks.postbuild.2.pattern=bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{runtime.platform.path}"/tools/ide-debug/{build.debugconfig} "{build.source.path}"/debug_custom.json"
163+
recipe.hooks.postbuild.2.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{runtime.platform.path}\tools\ide-debug\{build.debugconfig}" "{build.source.path}\debug_custom.json"
161164

162165
# Generate chip.svd
163166
recipe.hooks.postbuild.3.pattern=bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{runtime.platform.path}"/tools/ide-debug/svd/{build.mcu}.svd "{build.source.path}"/debug.svd"

0 commit comments

Comments
 (0)