Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,12 @@ def configure_debug_session(self, debug_config):
["-c", "adapter speed %s" % (debug_config.speed or "5000")]
)

# The images may not exist yet: `pio debug` configures the session
# before building them, and falling back to GDB `load` would write
# the new sections over the application already in flash
ignore_conds = [
debug_config.load_cmds != ["load"],
not flash_images,
not all([os.path.isfile(item["path"]) for item in flash_images]),
]

if any(ignore_conds):
Expand Down