From 481b7ae8fd62ae0a52aea0975c5f233f236f73a4 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:05:55 -0400 Subject: [PATCH 1/5] Extend project configuration and defines, using `get` is a bug --- tools/build_project.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/build_project.py b/tools/build_project.py index 5e72582d..c7c5fcc9 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -325,8 +325,14 @@ def main(): # Extend configuration and C defines for input_config, output_config in [ - (manifest.get("configuration", {}), output_project.get("configuration", [])), - (manifest.get("slcp_defines", {}), output_project.get("define", [])), + ( + manifest.get("configuration", {}), + output_project.setdefault("configuration", []), + ), + ( + manifest.get("slcp_defines", {}), + output_project.setdefault("define", []), + ), ]: for name, value in input_config.items(): # Values are always strings From d38781937bd54613d1be824d3db9594f425bda19 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:06:17 -0400 Subject: [PATCH 2/5] Error out on missing `remove_components` --- tools/build_project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_project.py b/tools/build_project.py index c7c5fcc9..2b31d0bf 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -322,6 +322,7 @@ def main(): LOGGER.warning( "Component %s is not present in manifest, cannot remove", component ) + sys.exit(1) # Extend configuration and C defines for input_config, output_config in [ From 3c8cbd908cee45cbb8e853d0d50f64280a732c51 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:07:47 -0400 Subject: [PATCH 3/5] Enable all compiler warnings --- .../inc/nc_efr32_wdog.h | 3 +-- .../src/nc_efr32_wdog.c | 2 +- src/ot-rcp/app.c | 1 + tools/build_project.py | 14 +++++++++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gecko_sdk_extensions/nc_efr32_watchdog_extension/inc/nc_efr32_wdog.h b/gecko_sdk_extensions/nc_efr32_watchdog_extension/inc/nc_efr32_wdog.h index d1af5b8b..db43de3f 100644 --- a/gecko_sdk_extensions/nc_efr32_watchdog_extension/inc/nc_efr32_wdog.h +++ b/gecko_sdk_extensions/nc_efr32_watchdog_extension/inc/nc_efr32_wdog.h @@ -19,8 +19,7 @@ #include "em_cmu.h" #include "em_wdog.h" #include "em_rmu.h" -#include "sli_cpc_timer.h" #include "sl_component_catalog.h" void nc_enable_watchdog(void); -void nc_periodic_timer(sli_cpc_timer_handle_t *handle, void *data); \ No newline at end of file +void nc_poke_watchdog(void); diff --git a/gecko_sdk_extensions/nc_efr32_watchdog_extension/src/nc_efr32_wdog.c b/gecko_sdk_extensions/nc_efr32_watchdog_extension/src/nc_efr32_wdog.c index 21979c00..f18b5a85 100644 --- a/gecko_sdk_extensions/nc_efr32_watchdog_extension/src/nc_efr32_wdog.c +++ b/gecko_sdk_extensions/nc_efr32_watchdog_extension/src/nc_efr32_wdog.c @@ -83,7 +83,7 @@ void nc_enable_watchdog(void) } -void nc_poke_watchdog() +void nc_poke_watchdog(void) { CORE_DECLARE_IRQ_STATE; CORE_ENTER_ATOMIC(); diff --git a/src/ot-rcp/app.c b/src/ot-rcp/app.c index b3af0528..24ac86e5 100644 --- a/src/ot-rcp/app.c +++ b/src/ot-rcp/app.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "openthread-system.h" #include "app.h" diff --git a/tools/build_project.py b/tools/build_project.py index 2b31d0bf..5dba1adf 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -549,6 +549,18 @@ def main(): LOGGER.error("Defines were unused, aborting: %s", unused_defines) sys.exit(1) + # Fix Gecko SDK bugs + sl_rail_util_pti_config_h = args.build_dir / "config/sl_rail_util_pti_config.h" + + # PTI seemingly cannot be excluded, even if it is disabled + if sl_rail_util_pti_config_h.exists(): + sl_rail_util_pti_config_h.write_text( + sl_rail_util_pti_config_h.read_text().replace( + '#warning "RAIL PTI peripheral not configured"\n', + '// #warning "RAIL PTI peripheral not configured"\n', + ) + ) + # Remove absolute paths from the build for reproducibility extra_compiler_flags = [ f"-ffile-prefix-map={str(src.absolute())}={dst}" @@ -557,7 +569,7 @@ def main(): args.build_dir: "/src", toolchain: "/toolchain", }.items() - ] + ] + ["-Wall", "-Wextra", "-Werror"] output_artifact = (args.build_dir / "build/debug" / base_project_name).with_suffix( ".gbl" From cb5c46f1ce0c25a5379a3d64d1bdfe8b66cb4e06 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:20:20 -0400 Subject: [PATCH 4/5] Include OpenThread logging header in multipan `app.c` --- src/rcp-uart-802154/app.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rcp-uart-802154/app.c b/src/rcp-uart-802154/app.c index 9f3b75ab..e0d57863 100644 --- a/src/rcp-uart-802154/app.c +++ b/src/rcp-uart-802154/app.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "openthread-system.h" #include "app.h" From 010ed4e3481d3d104a44cfb8811d24209eabb62b Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:08:08 -0400 Subject: [PATCH 5/5] Update src/ot-rcp/app.c --- src/ot-rcp/app.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ot-rcp/app.c b/src/ot-rcp/app.c index 24ac86e5..b3af0528 100644 --- a/src/ot-rcp/app.c +++ b/src/ot-rcp/app.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "openthread-system.h" #include "app.h"