From ec2d2bc954f491e98e10de4e15f7e2653b3d5973 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 19:57:55 +0000 Subject: [PATCH 1/3] Initial plan From 52f578bbff9a228985a2df9183de359ac7af2400 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:00:26 +0000 Subject: [PATCH 2/3] Add validation for required bootloader fields Co-authored-by: h2zero <32826625+h2zero@users.noreply.github.com> --- builder/frameworks/arduino/nrf5.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builder/frameworks/arduino/nrf5.py b/builder/frameworks/arduino/nrf5.py index 56af0bf..96b0851 100644 --- a/builder/frameworks/arduino/nrf5.py +++ b/builder/frameworks/arduino/nrf5.py @@ -182,6 +182,16 @@ env.Exit(1) if selected_bl: + # Validate required bootloader fields + required_fields = ["bootloader_file", "linker_script", "max_size", "max_ram_size"] + missing_fields = [field for field in required_fields if field not in selected_bl] + + if missing_fields: + sys.stderr.write( + "Error. Bootloader '%s' is missing required fields: %s\n" % + (selected_bl.get("name", "unknown"), ", ".join(missing_fields))) + env.Exit(1) + # Use bootloader_file, linker_script, max_size, max_ram_size from selected_bl env.Replace(BOOTLOADERHEX=join(FRAMEWORK_DIR, "variants", board.get("build.variant", ""), selected_bl["bootloader_file"])) if "flags" in selected_bl: From 93e7d7dd079b33a6312c54aea6f46679c23c1ee7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:01:28 +0000 Subject: [PATCH 3/3] Fix code style - adjust spacing Co-authored-by: h2zero <32826625+h2zero@users.noreply.github.com> --- builder/frameworks/arduino/nrf5.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builder/frameworks/arduino/nrf5.py b/builder/frameworks/arduino/nrf5.py index 96b0851..60a540b 100644 --- a/builder/frameworks/arduino/nrf5.py +++ b/builder/frameworks/arduino/nrf5.py @@ -185,13 +185,12 @@ # Validate required bootloader fields required_fields = ["bootloader_file", "linker_script", "max_size", "max_ram_size"] missing_fields = [field for field in required_fields if field not in selected_bl] - if missing_fields: sys.stderr.write( "Error. Bootloader '%s' is missing required fields: %s\n" % (selected_bl.get("name", "unknown"), ", ".join(missing_fields))) env.Exit(1) - + # Use bootloader_file, linker_script, max_size, max_ram_size from selected_bl env.Replace(BOOTLOADERHEX=join(FRAMEWORK_DIR, "variants", board.get("build.variant", ""), selected_bl["bootloader_file"])) if "flags" in selected_bl: