Skip to content

Commit f2a5977

Browse files
committed
Properly propagate additional data to configure debug session
- Add extra data to "projenv" as well so that the extra data it can be overridden after the BuildProgram routine - Use the new INTEGRATION_EXTRA_DATA env variable instead of IDE_EXTRA_DATA
1 parent e66e12c commit f2a5977

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

builder/frameworks/arduino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
SConscript(
4242
join(DefaultEnvironment().PioPlatform().get_package_dir(
4343
"framework-arduinoespressif32"), "tools", "platformio-build.py"))
44-
env["IDE_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})
44+
env["INTEGRATION_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})

builder/frameworks/espidf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,4 +1470,4 @@ def _skip_prj_source_files(node):
14701470
)
14711471

14721472
# Propagate application offset to debug configurations
1473-
env["IDE_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})
1473+
env["INTEGRATION_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})

builder/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ def __fetch_fs_size(target, source, env):
169169
if mcu == "esp32c3":
170170
toolchain_arch = "riscv32-esp"
171171

172+
if "INTEGRATION_EXTRA_DATA" not in env:
173+
env["INTEGRATION_EXTRA_DATA"] = {}
174+
172175
env.Replace(
173176
__get_board_boot_mode=_get_board_boot_mode,
174177
__get_board_f_flash=_get_board_f_flash,
@@ -501,6 +504,13 @@ def __fetch_fs_size(target, source, env):
501504
print("Warning! '-Wl,-T' option for specifying linker scripts is deprecated. "
502505
"Please use 'board_build.ldscript' option in your 'platformio.ini' file.")
503506

507+
#
508+
# A temporary workaround to propagate additional data to the debug configuration routine
509+
#
510+
511+
Import("projenv")
512+
projenv["INTEGRATION_EXTRA_DATA"] = env.get("INTEGRATION_EXTRA_DATA")
513+
504514
#
505515
# Default targets
506516
#

0 commit comments

Comments
 (0)