Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platform: make debug_custom.json file customizable by board
Browse files Browse the repository at this point in the history
pillo79 committed Aug 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5a48caa commit 4119409
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
@@ -160,6 +160,9 @@ build.openocdscript.esp32s3=esp32s3-builtin.cfg
build.openocdscript.esp32c3=esp32c3-builtin.cfg
build.openocdscript={build.openocdscript.{build.mcu}}

# Debug plugin configuration
build.debugconfig={build.mcu}.json

# Custom build options
build.opt.name=build_opt.h
build.opt.path={build.path}/{build.opt.name}
@@ -201,8 +204,8 @@ recipe.hooks.postbuild.1.pattern=bash -c "[ {build.copy_jtag_files} -eq 0 ] || c
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"

# Generate debug_custom.json
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"
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"
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"
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"

# Generate chip.svd
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 comments on commit 4119409

Please sign in to comment.