From cffc6ded38e6b058220d74c87ff015b2ee6fd6c7 Mon Sep 17 00:00:00 2001 From: Bart Meijer Date: Sun, 23 Oct 2022 11:23:01 +0200 Subject: [PATCH] Update platform.py Some boards in Marlin 2 trigger this assertion, preventing the boards list to load in platform I/O. This change at least makes is clear which board fails. But I think a warning would suffice here as well. --- platform.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform.py b/platform.py index 98459e3..653e4f2 100644 --- a/platform.py +++ b/platform.py @@ -151,7 +151,11 @@ def _add_default_debug_tools(self, board): else: openocd_chipname = debug.get("openocd_chipname") - assert openocd_chipname + + assert openocd_chipname, ( + "Missing openocd_chipname for %s" % board.id + ) + openocd_cmds = ["set CHIPNAME %s" % openocd_chipname] if link == "stlink" and "at91sam3" in openocd_chipname: openocd_cmds.append("set CPUTAPID 0x2ba01477")