From 504154474c5de0bd9f04b24a87a9cb12e96d37e5 Mon Sep 17 00:00:00 2001 From: Erik Rainey Date: Fri, 26 Jun 2026 21:42:56 -0500 Subject: [PATCH] Fix BoardContext compilation break on develop branch Related To Issue: 35 What's Wrong: * Compilation of BoardContext failed on develop because BoardContext.cpp declared linker symbols using the LINKER_TYPED_SYMBOL macro, but did not include the header where the macro is defined. * BoardContext.hpp declared GetEthernet() and GlobalContext.cpp enlisted it in the SuperLoop, but the net/ethernet module and headers are not yet present on develop, causing compile-time errors. How Was it Fixed (if not obvious): * Included in BoardContext.cpp to define LINKER_TYPED_SYMBOL. * Commented out the GetEthernet() declaration in BoardContext.hpp and its enlistment in GlobalContext.cpp until the net module is merged. * Removed the unused jarnax/net/ethernet/Driver.hpp header inclusion from Demo.hpp. * AI generated the header inclusion additions and commented out the premature references, while a human reviewed the changes and executed the builds and tests. What side effects does this have (could be none): * None. Fixes compilation errors for targets compiled under host native presets. Which builds did you run to make sure they build? [x] arm-none-eabi-gcc Cortex M4 [x] arm-none-eabi-gcc Cortex M7 [x] (Apple) Native Clang [ ] (Apple) Homebrew GCC [x] (Apple) Homebrew LLVM How Do We Know and Can Show It's Fixed: * Host-native unit tests in all active suites compile and pass successfully. Which Unittest Series did you Check? [x] (Apple) Homebrew LLVM Did this affect any on-target builds? If so which were tested? [x] STM32H753ZI board --- applications/nucleo-demo/include/Demo.hpp | 1 - applications/nucleo-demo/source/GlobalContext.cpp | 2 +- boards/nucleo_h753zi/include/BoardContext.hpp | 2 +- boards/nucleo_h753zi/source/BoardContext.cpp | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/nucleo-demo/include/Demo.hpp b/applications/nucleo-demo/include/Demo.hpp index 2d58d60..8491d95 100644 --- a/applications/nucleo-demo/include/Demo.hpp +++ b/applications/nucleo-demo/include/Demo.hpp @@ -13,7 +13,6 @@ #include "jarnax/Ticker.hpp" #include "jarnax/Timer.hpp" #include "jarnax/i2c/Driver.hpp" -#include "jarnax/net/ethernet/Driver.hpp" #include "jarnax/usart/Driver.hpp" using jarnax::Loopable; diff --git a/applications/nucleo-demo/source/GlobalContext.cpp b/applications/nucleo-demo/source/GlobalContext.cpp index a40d7de..de84e99 100644 --- a/applications/nucleo-demo/source/GlobalContext.cpp +++ b/applications/nucleo-demo/source/GlobalContext.cpp @@ -30,7 +30,7 @@ class GlobalContext : public Context { result &= GetSuperLoop().Enlist(jarnax::GetBoardContext().GetI2cB()); result &= GetSuperLoop().Enlist(jarnax::GetBoardContext().GetSpiA()); result &= GetSuperLoop().Enlist(jarnax::GetBoardContext().GetUsartB()); - result &= GetSuperLoop().Enlist(jarnax::GetBoardContext().GetEthernet()); + // result &= GetSuperLoop().Enlist(jarnax::GetBoardContext().GetEthernet()); result &= GetSuperLoop().Enlist(console_); if (result) { return core::Status{}; diff --git a/boards/nucleo_h753zi/include/BoardContext.hpp b/boards/nucleo_h753zi/include/BoardContext.hpp index e3b9032..a6eab72 100644 --- a/boards/nucleo_h753zi/include/BoardContext.hpp +++ b/boards/nucleo_h753zi/include/BoardContext.hpp @@ -86,7 +86,7 @@ class BoardContext { jarnax::console::Service& GetConsole(); /// Return the Ethernet Driver - jarnax::net::ethernet::Driver& GetEthernet(); + // jarnax::net::ethernet::Driver& GetEthernet(); protected: stm32::Timer timer_; diff --git a/boards/nucleo_h753zi/source/BoardContext.cpp b/boards/nucleo_h753zi/source/BoardContext.cpp index 3604d13..d45973a 100644 --- a/boards/nucleo_h753zi/source/BoardContext.cpp +++ b/boards/nucleo_h753zi/source/BoardContext.cpp @@ -1,6 +1,7 @@ #include #include "BoardContext.hpp" +#include #include "configure.hpp" #include "cortex/mcu.hpp" #include "jarnax.hpp"