diff --git a/ref_app/src/mcal/am335x/mcal_gpt.h b/ref_app/src/mcal/am335x/mcal_gpt.h index ba1623554..329850b0f 100644 --- a/ref_app/src/mcal/am335x/mcal_gpt.h +++ b/ref_app/src/mcal/am335x/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/am335x/mcal_wdg.h b/ref_app/src/mcal/am335x/mcal_wdg.h index 7689fd65c..67f728105 100644 --- a/ref_app/src/mcal/am335x/mcal_wdg.h +++ b/ref_app/src/mcal/am335x/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2013 - 2020. +// Copyright Christopher Kormanyos 2013 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/am6254_soc/mcal_gpt.h b/ref_app/src/mcal/am6254_soc/mcal_gpt.h index fe0e99df9..ad9e21609 100644 --- a/ref_app/src/mcal/am6254_soc/mcal_gpt.h +++ b/ref_app/src/mcal/am6254_soc/mcal_gpt.h @@ -8,16 +8,8 @@ #ifndef MCAL_GPT_2025_02_22_H #define MCAL_GPT_2025_02_22_H - #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,13 +21,7 @@ struct secure final { - private: static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/am6254_soc/mcal_wdg.h b/ref_app/src/mcal/am6254_soc/mcal_wdg.h index b080a2e75..996659eea 100644 --- a/ref_app/src/mcal/am6254_soc/mcal_wdg.h +++ b/ref_app/src/mcal/am6254_soc/mcal_wdg.h @@ -5,12 +5,8 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - namespace util { template class timer; } - - namespace sys { namespace idle { auto task_func() -> void; } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,16 +16,11 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto trigger() -> void; - - template - friend class util::timer; - - friend auto ::sys::idle::task_func() -> void; }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/atmega2560/mcal_gpt.h b/ref_app/src/mcal/atmega2560/mcal_gpt.h index 28b0d3628..123bfe8be 100644 --- a/ref_app/src/mcal/atmega2560/mcal_gpt.h +++ b/ref_app/src/mcal/atmega2560/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -31,15 +21,9 @@ struct secure final { - private: static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/atmega2560/mcal_wdg.h b/ref_app/src/mcal/atmega2560/mcal_wdg.h index 31d5324fd..d3faa7654 100644 --- a/ref_app/src/mcal/atmega2560/mcal_wdg.h +++ b/ref_app/src/mcal/atmega2560/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2018. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,12 +8,6 @@ #ifndef MCAL_WDT_2010_04_10_H_ #define MCAL_WDT_2010_04_10_H_ - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - - namespace util { template class timer; } - namespace mcal { namespace wdg @@ -24,13 +18,6 @@ struct secure final { - private: - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); - - template - friend class util::timer; - static void trigger() { asm volatile("wdr"); } }; } diff --git a/ref_app/src/mcal/atmega4809/mcal_gpt.h b/ref_app/src/mcal/atmega4809/mcal_gpt.h index 28b0d3628..123bfe8be 100644 --- a/ref_app/src/mcal/atmega4809/mcal_gpt.h +++ b/ref_app/src/mcal/atmega4809/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -31,15 +21,9 @@ struct secure final { - private: static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/atmega4809/mcal_wdg.h b/ref_app/src/mcal/atmega4809/mcal_wdg.h index eadf1f248..94949ac58 100644 --- a/ref_app/src/mcal/atmega4809/mcal_wdg.h +++ b/ref_app/src/mcal/atmega4809/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,12 +8,6 @@ #ifndef MCAL_WDT_2010_04_10_H #define MCAL_WDT_2010_04_10_H - extern "C" auto __my_startup() -> void __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { auto task_func() -> void; } } - - namespace util { template class timer; } - namespace mcal { namespace wdg @@ -24,13 +18,6 @@ struct secure final { - private: - friend auto ::sys::idle::task_func() -> void; - friend auto ::__my_startup() -> void; - - template - friend class util::timer; - static auto trigger() -> void; }; } diff --git a/ref_app/src/mcal/avr/mcal_gpt.h b/ref_app/src/mcal/avr/mcal_gpt.h index 12896218b..daf0c1ef0 100644 --- a/ref_app/src/mcal/avr/mcal_gpt.h +++ b/ref_app/src/mcal/avr/mcal_gpt.h @@ -8,16 +8,8 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,13 +21,7 @@ struct secure final { - private: static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/avr/mcal_wdg.h b/ref_app/src/mcal/avr/mcal_wdg.h index d34bbcbfe..3ac7d44ea 100644 --- a/ref_app/src/mcal/avr/mcal_wdg.h +++ b/ref_app/src/mcal/avr/mcal_wdg.h @@ -8,14 +8,6 @@ #ifndef MCAL_WDT_2010_04_10_H #define MCAL_WDT_2010_04_10_H - #include - - extern "C" void __my_startup() ATTRIBUTE(section(".startup"), used, noinline); - - namespace sys { namespace idle { auto task_func() -> void; } } - - namespace util { template class timer; } - namespace mcal { namespace wdg @@ -26,13 +18,6 @@ struct secure final { - private: - friend auto ::sys::idle::task_func() -> void; - friend void ::__my_startup(); - - template - friend class util::timer; - static auto trigger() -> void; }; } diff --git a/ref_app/src/mcal/bcm2835_raspi_b/mcal_gpt.h b/ref_app/src/mcal/bcm2835_raspi_b/mcal_gpt.h index bbb559e17..329850b0f 100644 --- a/ref_app/src/mcal/bcm2835_raspi_b/mcal_gpt.h +++ b/ref_app/src/mcal/bcm2835_raspi_b/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/bcm2835_raspi_b/mcal_wdg.h b/ref_app/src/mcal/bcm2835_raspi_b/mcal_wdg.h index 907653a92..5ff25f0f7 100644 --- a/ref_app/src/mcal/bcm2835_raspi_b/mcal_wdg.h +++ b/ref_app/src/mcal/bcm2835_raspi_b/mcal_wdg.h @@ -1,18 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - - namespace util { template class timer; } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -24,16 +18,9 @@ struct secure final { - private: - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); - - template - friend class util::timer; - static void trigger() { } }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/host/mcal_gpt.h b/ref_app/src/mcal/host/mcal_gpt.h index a11bed209..e1a6ee00e 100644 --- a/ref_app/src/mcal/host/mcal_gpt.h +++ b/ref_app/src/mcal/host/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,8 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } // namespace util - namespace mcal { namespace gpt @@ -29,14 +19,9 @@ inline auto init(const config_type*) noexcept -> void { } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type; - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } // namespace gpt } // namespace mcal diff --git a/ref_app/src/mcal/host/mcal_wdg.h b/ref_app/src/mcal/host/mcal_wdg.h index c016b718e..a26e36a84 100644 --- a/ref_app/src/mcal/host/mcal_wdg.h +++ b/ref_app/src/mcal/host/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,21 +8,6 @@ #ifndef MCAL_WDG_2010_04_10_H #define MCAL_WDG_2010_04_10_H - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } // namespace util - - namespace sys - { - namespace idle - { - void task_func(); - } // namespace idle - } // namespace sys - namespace mcal { namespace wdg @@ -31,14 +16,9 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto trigger() -> void; - - friend auto ::sys::idle::task_func() -> void; - - template - friend class util::timer; }; } // namespace wdg } // namespace mcal diff --git a/ref_app/src/mcal/host/mcal_wdg_watchdog.h b/ref_app/src/mcal/host/mcal_wdg_watchdog.h index 0bc8240dc..d93c2eda2 100644 --- a/ref_app/src/mcal/host/mcal_wdg_watchdog.h +++ b/ref_app/src/mcal/host/mcal_wdg_watchdog.h @@ -115,7 +115,7 @@ } } - friend class ::mcal::wdg::secure; + friend struct ::mcal::wdg::secure; }; template diff --git a/ref_app/src/mcal/lpc11c24/mcal_gpt.h b/ref_app/src/mcal/lpc11c24/mcal_gpt.h index 74d62b6c8..6101c7078 100644 --- a/ref_app/src/mcal/lpc11c24/mcal_gpt.h +++ b/ref_app/src/mcal/lpc11c24/mcal_gpt.h @@ -1,26 +1,16 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Copyright Joel Winarske 2019. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -30,14 +20,9 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; constexpr std::uint32_t systick_ctrl_enable = UINT32_C(1UL << 0); // 32-bit register. enable @@ -46,4 +31,4 @@ } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/lpc11c24/mcal_wdg.h b/ref_app/src/mcal/lpc11c24/mcal_wdg.h index 649b038dd..a9c89f5f2 100644 --- a/ref_app/src/mcal/lpc11c24/mcal_wdg.h +++ b/ref_app/src/mcal/lpc11c24/mcal_wdg.h @@ -1,20 +1,16 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Copyright Joel Winarske 2019. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H #include - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - namespace mcal { namespace wdg @@ -32,15 +28,11 @@ constexpr std::uint32_t wdt_feed_seq_1 = UINT32_C(0xAA); constexpr std::uint32_t wdt_feed_seq_2 = UINT32_C(0x55); - class secure final + struct secure final { static void trigger(); - - friend void __wdt_handler() __attribute__((interrupt)); - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/nxp_imxrt1062/mcal_gpt.h b/ref_app/src/mcal/nxp_imxrt1062/mcal_gpt.h index 04200ee68..6c0ed2372 100644 --- a/ref_app/src/mcal/nxp_imxrt1062/mcal_gpt.h +++ b/ref_app/src/mcal/nxp_imxrt1062/mcal_gpt.h @@ -1,14 +1,13 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include #include @@ -17,7 +16,7 @@ namespace util { template - class timer; + class default_timer_backend; } namespace mcal @@ -38,7 +37,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,13 +45,8 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/nxp_imxrt1062/mcal_wdg.h b/ref_app/src/mcal/nxp_imxrt1062/mcal_wdg.h index 160c1b14e..4ed91adc9 100644 --- a/ref_app/src/mcal/nxp_imxrt1062/mcal_wdg.h +++ b/ref_app/src/mcal/nxp_imxrt1062/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/riscvfe310/mcal_gpt.h b/ref_app/src/mcal/riscvfe310/mcal_gpt.h index 132406380..2994ffe99 100644 --- a/ref_app/src/mcal/riscvfe310/mcal_gpt.h +++ b/ref_app/src/mcal/riscvfe310/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2022. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2022_12_16_H_ - #define MCAL_GPT_2022_12_16_H_ +#ifndef MCAL_GPT_2022_12_16_H + #define MCAL_GPT_2022_12_16_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2022_12_16_H_ +#endif // MCAL_GPT_2022_12_16_H diff --git a/ref_app/src/mcal/riscvfe310/mcal_wdg.h b/ref_app/src/mcal/riscvfe310/mcal_wdg.h index 2e791e7c9..4ed91adc9 100644 --- a/ref_app/src/mcal/riscvfe310/mcal_wdg.h +++ b/ref_app/src/mcal/riscvfe310/mcal_wdg.h @@ -1,18 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - - namespace util { template class timer; } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -22,18 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - - template - friend class util::timer; - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/rl78/mcal_gpt.h b/ref_app/src/mcal/rl78/mcal_gpt.h index ba1623554..329850b0f 100644 --- a/ref_app/src/mcal/rl78/mcal_gpt.h +++ b/ref_app/src/mcal/rl78/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/rl78/mcal_wdg.h b/ref_app/src/mcal/rl78/mcal_wdg.h index 2909c62d2..423f178a5 100644 --- a/ref_app/src/mcal/rl78/mcal_wdg.h +++ b/ref_app/src/mcal/rl78/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,10 +8,6 @@ #ifndef MCAL_WDT_2010_04_10_H_ #define MCAL_WDT_2010_04_10_H_ - extern "C" void __my_startup(); - - namespace sys { namespace idle { void task_func(); } } - namespace mcal { namespace wdg @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDT_2010_04_10_H_ +#endif // MCAL_WDT_2010_04_10_H diff --git a/ref_app/src/mcal/rpi_pico2_rp2350/mcal_gpt.h b/ref_app/src/mcal/rpi_pico2_rp2350/mcal_gpt.h index 4b366c60d..837f148aa 100644 --- a/ref_app/src/mcal/rpi_pico2_rp2350/mcal_gpt.h +++ b/ref_app/src/mcal/rpi_pico2_rp2350/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,10 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,11 +38,6 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/rpi_pico2_rp2350/mcal_wdg.h b/ref_app/src/mcal/rpi_pico2_rp2350/mcal_wdg.h index 817769d13..4ed91adc9 100644 --- a/ref_app/src/mcal/rpi_pico2_rp2350/mcal_wdg.h +++ b/ref_app/src/mcal/rpi_pico2_rp2350/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/ref_app/src/mcal/rpi_pico_rp2040/mcal_gpt.h b/ref_app/src/mcal/rpi_pico_rp2040/mcal_gpt.h index 9fcc882f3..667d95f19 100644 --- a/ref_app/src/mcal/rpi_pico_rp2040/mcal_gpt.h +++ b/ref_app/src/mcal/rpi_pico_rp2040/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,10 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,11 +38,6 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/rx63n/mcal_gpt.h b/ref_app/src/mcal/rx63n/mcal_gpt.h index ba1623554..329850b0f 100644 --- a/ref_app/src/mcal/rx63n/mcal_gpt.h +++ b/ref_app/src/mcal/rx63n/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/rx63n/mcal_wdg.h b/ref_app/src/mcal/rx63n/mcal_wdg.h index 2909c62d2..0b5f72ad4 100644 --- a/ref_app/src/mcal/rx63n/mcal_wdg.h +++ b/ref_app/src/mcal/rx63n/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDT_2010_04_10_H_ - #define MCAL_WDT_2010_04_10_H_ - - extern "C" void __my_startup(); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDT_2010_04_10_H + #define MCAL_WDT_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDT_2010_04_10_H_ +#endif // MCAL_WDT_2010_04_10_H diff --git a/ref_app/src/mcal/stm32f100/mcal_gpt.h b/ref_app/src/mcal/stm32f100/mcal_gpt.h index ea6b073cc..a1f6918e5 100644 --- a/ref_app/src/mcal/stm32f100/mcal_gpt.h +++ b/ref_app/src/mcal/stm32f100/mcal_gpt.h @@ -1,24 +1,16 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ - - #include - #include +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } + #include namespace mcal { @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,13 +38,8 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/stm32f100/mcal_wdg.h b/ref_app/src/mcal/stm32f100/mcal_wdg.h index 45e5a9bb5..78de3a080 100644 --- a/ref_app/src/mcal/stm32f100/mcal_wdg.h +++ b/ref_app/src/mcal/stm32f100/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32f407/mcal_gpt.h b/ref_app/src/mcal/stm32f407/mcal_gpt.h index bc838d8b2..1d1e219fc 100644 --- a/ref_app/src/mcal/stm32f407/mcal_gpt.h +++ b/ref_app/src/mcal/stm32f407/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,17 +8,9 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include - #include - #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } + #include namespace mcal { @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,11 +38,6 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/stm32f407/mcal_wdg.h b/ref_app/src/mcal/stm32f407/mcal_wdg.h index 45e5a9bb5..78de3a080 100644 --- a/ref_app/src/mcal/stm32f407/mcal_wdg.h +++ b/ref_app/src/mcal/stm32f407/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32f429/mcal_gpt.h b/ref_app/src/mcal/stm32f429/mcal_gpt.h index 09e9eb1ea..1d1e219fc 100644 --- a/ref_app/src/mcal/stm32f429/mcal_gpt.h +++ b/ref_app/src/mcal/stm32f429/mcal_gpt.h @@ -1,24 +1,16 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ - - #include - #include +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } + #include namespace mcal { @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,13 +38,8 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/stm32f429/mcal_wdg.h b/ref_app/src/mcal/stm32f429/mcal_wdg.h index 45e5a9bb5..78de3a080 100644 --- a/ref_app/src/mcal/stm32f429/mcal_wdg.h +++ b/ref_app/src/mcal/stm32f429/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32f446/mcal_gpt.h b/ref_app/src/mcal/stm32f446/mcal_gpt.h index 885ed47bc..76ca59c4a 100644 --- a/ref_app/src/mcal/stm32f446/mcal_gpt.h +++ b/ref_app/src/mcal/stm32f446/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,10 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,11 +38,6 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/stm32f446/mcal_wdg.h b/ref_app/src/mcal/stm32f446/mcal_wdg.h index 21bb694a1..bb913c526 100644 --- a/ref_app/src/mcal/stm32f446/mcal_wdg.h +++ b/ref_app/src/mcal/stm32f446/mcal_wdg.h @@ -5,14 +5,8 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace util { template class timer; } - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -22,17 +16,11 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static void trigger(); - - template - friend class util::timer; - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32h7a3/mcal_gpt.h b/ref_app/src/mcal/stm32h7a3/mcal_gpt.h index c68c5bdd9..726395b56 100644 --- a/ref_app/src/mcal/stm32h7a3/mcal_gpt.h +++ b/ref_app/src/mcal/stm32h7a3/mcal_gpt.h @@ -1,25 +1,17 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,13 +38,8 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/stm32h7a3/mcal_wdg.h b/ref_app/src/mcal/stm32h7a3/mcal_wdg.h index 160c1b14e..4ed91adc9 100644 --- a/ref_app/src/mcal/stm32h7a3/mcal_wdg.h +++ b/ref_app/src/mcal/stm32h7a3/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32l100c/mcal_gpt.h b/ref_app/src/mcal/stm32l100c/mcal_gpt.h index d62a0e7ca..b9d6795c4 100644 --- a/ref_app/src/mcal/stm32l100c/mcal_gpt.h +++ b/ref_app/src/mcal/stm32l100c/mcal_gpt.h @@ -1,25 +1,17 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2023. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,13 +38,8 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() noexcept; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/stm32l100c/mcal_wdg.h b/ref_app/src/mcal/stm32l100c/mcal_wdg.h index 160c1b14e..4ed91adc9 100644 --- a/ref_app/src/mcal/stm32l100c/mcal_wdg.h +++ b/ref_app/src/mcal/stm32l100c/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32l152/mcal_gpt.h b/ref_app/src/mcal/stm32l152/mcal_gpt.h index fb391e9b3..123bfe8be 100644 --- a/ref_app/src/mcal/stm32l152/mcal_gpt.h +++ b/ref_app/src/mcal/stm32l152/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/stm32l152/mcal_wdg.h b/ref_app/src/mcal/stm32l152/mcal_wdg.h index 160c1b14e..4ed91adc9 100644 --- a/ref_app/src/mcal/stm32l152/mcal_wdg.h +++ b/ref_app/src/mcal/stm32l152/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/stm32l432/mcal_gpt.h b/ref_app/src/mcal/stm32l432/mcal_gpt.h index 373a3bbe7..9518adc98 100644 --- a/ref_app/src/mcal/stm32l432/mcal_gpt.h +++ b/ref_app/src/mcal/stm32l432/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,10 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -38,7 +30,7 @@ local_arm_sys_tick_type::init(); } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type { @@ -46,11 +38,6 @@ return static_cast(local_arm_sys_tick_type::get_time_elapsed()); } - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/stm32l432/mcal_wdg.h b/ref_app/src/mcal/stm32l432/mcal_wdg.h index 557bb6309..996659eea 100644 --- a/ref_app/src/mcal/stm32l432/mcal_wdg.h +++ b/ref_app/src/mcal/stm32l432/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,10 +8,6 @@ #ifndef MCAL_WDG_2010_04_10_H #define MCAL_WDG_2010_04_10_H - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { auto task_func() -> void; } } - namespace mcal { namespace wdg @@ -20,12 +16,9 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto trigger() -> void; - - friend auto ::sys::idle::task_func() -> void; - friend void ::__my_startup(); }; } } diff --git a/ref_app/src/mcal/v850es_fx2/mcal_gpt.h b/ref_app/src/mcal/v850es_fx2/mcal_gpt.h index fb391e9b3..66143bb8a 100644 --- a/ref_app/src/mcal/v850es_fx2/mcal_gpt.h +++ b/ref_app/src/mcal/v850es_fx2/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2024. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/v850es_fx2/mcal_wdg.h b/ref_app/src/mcal/v850es_fx2/mcal_wdg.h index 71b2c05fc..daa7e09f7 100644 --- a/ref_app/src/mcal/v850es_fx2/mcal_wdg.h +++ b/ref_app/src/mcal/v850es_fx2/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2021. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDT_2010_04_10_H_ - #define MCAL_WDT_2010_04_10_H_ - - extern "C" void __my_startup(); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDT_2010_04_10_H + #define MCAL_WDT_2010_04_10_H namespace mcal { @@ -23,11 +19,8 @@ struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDT_2010_04_10_H_ +#endif // MCAL_WDT_2010_04_10_H diff --git a/ref_app/src/mcal/wch_ch32v307/mcal_gpt.h b/ref_app/src/mcal/wch_ch32v307/mcal_gpt.h index 132406380..2994ffe99 100644 --- a/ref_app/src/mcal/wch_ch32v307/mcal_gpt.h +++ b/ref_app/src/mcal/wch_ch32v307/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2022. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2022_12_16_H_ - #define MCAL_GPT_2022_12_16_H_ +#ifndef MCAL_GPT_2022_12_16_H + #define MCAL_GPT_2022_12_16_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2022_12_16_H_ +#endif // MCAL_GPT_2022_12_16_H diff --git a/ref_app/src/mcal/wch_ch32v307/mcal_wdg.h b/ref_app/src/mcal/wch_ch32v307/mcal_wdg.h index 220b0dd09..4ed91adc9 100644 --- a/ref_app/src/mcal/wch_ch32v307/mcal_wdg.h +++ b/ref_app/src/mcal/wch_ch32v307/mcal_wdg.h @@ -1,18 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - - namespace util { template class timer; } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -22,17 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - template - friend class util::timer; - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/wch_ch32v307_llvm/mcal_gpt.h b/ref_app/src/mcal/wch_ch32v307_llvm/mcal_gpt.h index 132406380..2994ffe99 100644 --- a/ref_app/src/mcal/wch_ch32v307_llvm/mcal_gpt.h +++ b/ref_app/src/mcal/wch_ch32v307_llvm/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2022. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2022_12_16_H_ - #define MCAL_GPT_2022_12_16_H_ +#ifndef MCAL_GPT_2022_12_16_H + #define MCAL_GPT_2022_12_16_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2022_12_16_H_ +#endif // MCAL_GPT_2022_12_16_H diff --git a/ref_app/src/mcal/wch_ch32v307_llvm/mcal_wdg.h b/ref_app/src/mcal/wch_ch32v307_llvm/mcal_wdg.h index 220b0dd09..4ed91adc9 100644 --- a/ref_app/src/mcal/wch_ch32v307_llvm/mcal_wdg.h +++ b/ref_app/src/mcal/wch_ch32v307_llvm/mcal_wdg.h @@ -1,18 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2024. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - - namespace util { template class timer; } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -22,17 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - template - friend class util::timer; - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_gpt.h b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_gpt.h index 3b887f325..9dce56ba1 100644 --- a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_gpt.h +++ b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_gpt.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2022. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,18 +8,8 @@ #ifndef MCAL_GPT_2011_10_20_H #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,14 +19,9 @@ inline auto init(const config_type*) noexcept -> void { } - class secure final + struct secure final { static auto get_time_elapsed() -> value_type; - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg.h b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg.h index b7731e800..996659eea 100644 --- a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg.h +++ b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2022. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,15 +8,6 @@ #ifndef MCAL_WDG_2010_04_10_H #define MCAL_WDG_2010_04_10_H - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - - namespace sys { namespace idle { void task_func(); } } - namespace mcal { namespace wdg @@ -25,14 +16,9 @@ auto init(const config_type*) -> void; - class secure final + struct secure final { static auto trigger() -> void; - - friend auto ::sys::idle::task_func() -> void; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg_watchdog.h b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg_watchdog.h index 646287880..504b66875 100644 --- a/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg_watchdog.h +++ b/ref_app/src/mcal/x86_64-w64-mingw32/mcal_wdg_watchdog.h @@ -114,7 +114,7 @@ } } - friend class ::mcal::wdg::secure; + friend struct ::mcal::wdg::secure; }; template diff --git a/ref_app/src/mcal/xtensa32/mcal_gpt.h b/ref_app/src/mcal/xtensa32/mcal_gpt.h index fb391e9b3..123bfe8be 100644 --- a/ref_app/src/mcal/xtensa32/mcal_gpt.h +++ b/ref_app/src/mcal/xtensa32/mcal_gpt.h @@ -1,25 +1,15 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2014. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_GPT_2011_10_20_H_ - #define MCAL_GPT_2011_10_20_H_ +#ifndef MCAL_GPT_2011_10_20_H + #define MCAL_GPT_2011_10_20_H - #include #include - #include - - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -29,16 +19,11 @@ void init(const config_type*); - class secure final + struct secure final { static value_type get_time_elapsed(); - - friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT; - - template - friend class util::timer; }; } } -#endif // MCAL_GPT_2011_10_20_H_ +#endif // MCAL_GPT_2011_10_20_H diff --git a/ref_app/src/mcal/xtensa32/mcal_wdg.h b/ref_app/src/mcal/xtensa32/mcal_wdg.h index 160c1b14e..4ed91adc9 100644 --- a/ref_app/src/mcal/xtensa32/mcal_wdg.h +++ b/ref_app/src/mcal/xtensa32/mcal_wdg.h @@ -1,16 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2007 - 2020. +// Copyright Christopher Kormanyos 2007 - 2025. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // -#ifndef MCAL_WDG_2010_04_10_H_ - #define MCAL_WDG_2010_04_10_H_ - - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } +#ifndef MCAL_WDG_2010_04_10_H + #define MCAL_WDG_2010_04_10_H namespace mcal { @@ -20,14 +16,11 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } -#endif // MCAL_WDG_2010_04_10_H_ +#endif // MCAL_WDG_2010_04_10_H diff --git a/ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp b/ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp index 2046b6f50..d944988f0 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp +++ b/ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp @@ -14,6 +14,8 @@ #include #include +#include + extern "C" { auto main_c1() -> void; @@ -24,12 +26,28 @@ extern "C" extern auto _start() -> void; } +namespace local +{ + auto main_worker_core1(mcal::led::led_base& my_led) -> void; + + template + struct timer_core1_backend + { + using tick_type = unsigned_tick_type; + + constexpr static auto get_now() -> tick_type + { + return static_cast(mcal::gpt::secure::get_time_elapsed_core1()); + } + }; +} // namespace local + extern "C" auto Mcu_StartCore1() -> void { // Note: This subroutine is called from core0. - // Firstly we need to unstall core1. + // As a first step, we need to un-stall core1. // RTC_CNTL->OPTIONS0.bit.SW_STALL_APPCPU_C0 = 0; // RTC_CNTL->SW_CPU_STALL.bit.SW_STALL_APPCPU_C1 = 0; @@ -122,10 +140,9 @@ auto main_c1() -> void // Enable all interrupts on core1. mcal::irq::init(nullptr); - // GPIO->OUT.reg |= CORE1_LED; - mcal::led::led1().toggle(); - - for(;;) { mcal::cpu::nop(); } + // Perpetually toggle the LED with a flag-based trigger + // in the for(ever)-loop of main_worker_core1(). + local::main_worker_core1(mcal::led::led1()); } auto mcal::cpu::post_init() noexcept -> void @@ -148,3 +165,18 @@ auto mcal::cpu::init() -> void mcal::port::init(nullptr); mcal::osc::init(nullptr); } + +auto local::main_worker_core1(mcal::led::led_base& my_led) -> void +{ + my_led.toggle(); + + for(;;) + { + using local_timer_type = util::timer>; + using local_tick_type = typename local_timer_type::tick_type; + + local_timer_type::blocking_delay(local_timer_type::seconds(local_tick_type { UINT8_C(1) })); + + my_led.toggle(); + } +} diff --git a/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.cpp b/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.cpp index 6fa8c5bb7..f89997a0f 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.cpp +++ b/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.cpp @@ -9,6 +9,8 @@ #include #include +#include + extern "C" { extern auto get_core_id() -> uint32_t; @@ -19,15 +21,18 @@ extern "C" namespace { - volatile mcal::gpt::value_type system_tick; + volatile mcal::gpt::value_type system_tick[std::size_t { UINT8_C(2) }]; + template auto get_consistent_tick() -> mcal::gpt::value_type { using value_type = mcal::gpt::value_type; + constexpr std::size_t core_index = CoreIndex; + // Do the first read of the timer1 counter and the system tick. const volatile std::uint32_t t1_cnt_1 = get_cpu_private_timer1(); - const volatile std::uint64_t sys_tick_1 = system_tick; + const volatile std::uint64_t sys_tick_1 = system_tick[core_index]; // Do the second read of the timer1 counter. const volatile std::uint32_t t1_cnt_2 = get_cpu_private_timer1(); @@ -37,7 +42,7 @@ namespace static_cast ( (t1_cnt_2 >= t1_cnt_1) ? static_cast(sys_tick_1 + t1_cnt_1) - : static_cast(system_tick + t1_cnt_2) + : static_cast(system_tick[core_index] + t1_cnt_2) ); } @@ -56,12 +61,21 @@ extern "C" void __system_tick_handler() // Reload the private timer1 for the running core. set_cpu_private_timer1(mcal::gpt::detail::timer1_reload()); - const bool is_not_core0 { (get_core_id() != std::uint32_t { UINT8_C(0) }) }; + const bool is_core0 { (get_core_id() == std::uint32_t { UINT8_C(0) }) }; - // Toggle the LED (on core1) or increment the 64-bit system tick (on core0). + // Increment the 64-bit system tick (on core0). Here, we + // service the system tick for core0 only. This is because + // there is only one tick but it is used in the timer + // facility by both cores. - if(is_not_core0) { mcal::led::led1().toggle(); } - else { system_tick += mcal::gpt::detail::timer1_max(); } + if(is_core0) + { + system_tick[std::size_t { UINT8_C(0) }] += mcal::gpt::detail::timer1_max(); + } + else + { + system_tick[std::size_t { UINT8_C(1) }] += mcal::gpt::detail::timer1_max(); + } } auto mcal::gpt::init(const config_type*) -> void @@ -75,14 +89,28 @@ auto mcal::gpt::init(const config_type*) -> void auto mcal::gpt::secure::get_time_elapsed() -> mcal::gpt::value_type { - mcal::gpt::value_type result { }; - - if(gpt_is_initialized()) - { - constexpr std::uint32_t mhz_value { (mcal::gpt::detail::timer1_max() / UINT32_C(1000000)) }; - - result = get_consistent_tick() / mhz_value; - } + // At the moment, mhz_value is equal to 80. + constexpr std::uint32_t mhz_value { (mcal::gpt::detail::timer1_max() / UINT32_C(1000000)) }; + + return + (gpt_is_initialized() + ? static_cast + ( + static_cast(get_consistent_tick() + mhz_value) / mhz_value + ) + : mcal::gpt::value_type { }); +} - return result; +auto mcal::gpt::secure::get_time_elapsed_core1() -> mcal::gpt::value_type_core1 +{ + // At the moment, mhz_value is equal to 80. + constexpr std::uint32_t mhz_value { (mcal::gpt::detail::timer1_max() / UINT32_C(1000000)) }; + + return + (gpt_is_initialized() + ? static_cast + ( + static_cast(get_consistent_tick() + mhz_value) / mhz_value + ) + : mcal::gpt::value_type { }); } diff --git a/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.h b/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.h index 050668d4e..53c19abff 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.h +++ b/ref_app/src/mcal/xtensa_esp32_s3/mcal_gpt.h @@ -8,16 +8,8 @@ #ifndef MCAL_GPT_2025_02_22_H #define MCAL_GPT_2025_02_22_H - #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -30,18 +22,14 @@ using config_type = void; using value_type = std::uint64_t; + using value_type_core1 = value_type; auto init(const config_type*) -> void; struct secure final { - private: static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; + static auto get_time_elapsed_core1() -> value_type_core1; }; } } diff --git a/ref_app/src/mcal/xtensa_esp32_s3/mcal_wdg.h b/ref_app/src/mcal/xtensa_esp32_s3/mcal_wdg.h index 12f70f0ab..02e59978b 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3/mcal_wdg.h +++ b/ref_app/src/mcal/xtensa_esp32_s3/mcal_wdg.h @@ -8,10 +8,6 @@ #ifndef MCAL_WDG_2025_02_22_H #define MCAL_WDG_2025_02_22_H - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - namespace mcal { namespace wdg @@ -20,12 +16,9 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } diff --git a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_gpt.h b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_gpt.h index 049ba66b4..ad9e21609 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_gpt.h +++ b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_gpt.h @@ -8,16 +8,8 @@ #ifndef MCAL_GPT_2025_02_22_H #define MCAL_GPT_2025_02_22_H - #include #include - // Forward declaration of the util::timer template class. - namespace util - { - template - class timer; - } - namespace mcal { namespace gpt @@ -30,11 +22,6 @@ struct secure final { static auto get_time_elapsed() -> value_type; - - friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point; - - template - friend class util::timer; }; } } diff --git a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_wdg.h b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_wdg.h index 12f70f0ab..02e59978b 100644 --- a/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_wdg.h +++ b/ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_wdg.h @@ -8,10 +8,6 @@ #ifndef MCAL_WDG_2025_02_22_H #define MCAL_WDG_2025_02_22_H - extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline)); - - namespace sys { namespace idle { void task_func(); } } - namespace mcal { namespace wdg @@ -20,12 +16,9 @@ void init(const config_type*); - class secure final + struct secure final { static void trigger(); - - friend void ::sys::idle::task_func(); - friend void ::__my_startup(); }; } } diff --git a/ref_app/src/util/utility/util_time.h b/ref_app/src/util/utility/util_time.h index 1030a2aca..1f445b6e1 100644 --- a/ref_app/src/util/utility/util_time.h +++ b/ref_app/src/util/utility/util_time.h @@ -17,6 +17,25 @@ namespace util { template + struct default_timer_backend; + + template> + class timer; + + template + struct default_timer_backend + { + using tick_type = unsigned_tick_type; + + constexpr static auto get_now() -> tick_type + { + return static_cast(mcal::gpt::secure::get_time_elapsed()); + } + }; + + template class timer { private: @@ -26,8 +45,10 @@ (UINTMAX_C(1) << static_cast(std::numeric_limits::digits - 1)) - UINTMAX_C(1) ); + using backend_type = BackendType; + public: - using tick_type = unsigned_tick_type; + using tick_type = typename backend_type::tick_type; template static constexpr auto microseconds(other_tick_type value_microseconds) noexcept -> tick_type { return static_cast(value_microseconds); } template static constexpr auto milliseconds(other_tick_type value_milliseconds) noexcept -> tick_type { return static_cast(UINT16_C(1000)) * microseconds(value_milliseconds); } @@ -47,16 +68,16 @@ ~timer() = default; - auto operator=(const timer& other) -> timer& = default; + constexpr auto operator=(const timer& other) -> timer& = default; - auto operator=(timer&& other) noexcept -> timer& = default; + constexpr auto operator=(timer&& other) noexcept -> timer& = default; - auto start_interval(const tick_type& tick_value) -> void + constexpr auto start_interval(const tick_type& tick_value) -> void { my_tick += tick_value; } - auto start_relative(const tick_type& tick_value) -> void + constexpr auto start_relative(const tick_type& tick_value) -> void { my_tick = my_now() + tick_value; } @@ -71,7 +92,7 @@ return (static_cast(timepoint - my_tick) <= timer_mask); } - auto set_mark() -> void + constexpr auto set_mark() -> void { return (my_tick = my_now()); } @@ -99,9 +120,9 @@ private: tick_type my_tick { my_now() }; - constexpr static auto my_now() -> tick_type + static constexpr auto my_now() -> tick_type { - return static_cast(mcal::gpt::secure::get_time_elapsed()); + return static_cast(backend_type::get_now()); } static_assert((!std::numeric_limits::is_signed), diff --git a/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp b/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp index 66ba12efb..8906ec133 100644 --- a/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp +++ b/ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp @@ -17,7 +17,7 @@ namespace local { - static auto main_core_worker(mcal::led::led_base& my_led) -> void; + auto main_worker_core_x(mcal::led::led_base& my_led) -> void; } extern "C" auto main_core1(void) -> void; @@ -25,9 +25,9 @@ extern "C" auto main_core2(void) -> void; extern "C" auto main_core3(void) -> void; extern "C" auto main_core0_init(void) -> void; -extern "C" auto main_core1(void) -> void { local::main_core_worker(mcal::led::led1()); } -extern "C" auto main_core2(void) -> void { local::main_core_worker(mcal::led::led2()); } -extern "C" auto main_core3(void) -> void { local::main_core_worker(mcal::led::led3()); } +extern "C" auto main_core1(void) -> void { local::main_worker_core_x(mcal::led::led1()); } +extern "C" auto main_core2(void) -> void { local::main_worker_core_x(mcal::led::led2()); } +extern "C" auto main_core3(void) -> void { local::main_worker_core_x(mcal::led::led3()); } extern "C" auto main_core0_init(void) -> void { @@ -36,15 +36,15 @@ extern "C" auto main_core0_init(void) -> void mcal::osc::init (nullptr); } -static auto local::main_core_worker(mcal::led::led_base& my_led) -> void +auto local::main_worker_core_x(mcal::led::led_base& my_led) -> void { - using local_timer_type = util::timer; - using local_tick_type = typename local_timer_type::tick_type; - my_led.toggle(); for(;;) { + using local_timer_type = util::timer; + using local_tick_type = typename local_timer_type::tick_type; + local_timer_type::blocking_delay(local_timer_type::seconds(local_tick_type { UINT8_C(1) })); my_led.toggle(); diff --git a/ref_app/target/micros/stm32h7a3/make/stm32h7a3_flags.gmk b/ref_app/target/micros/stm32h7a3/make/stm32h7a3_flags.gmk index 887f59674..3e6d75f1f 100644 --- a/ref_app/target/micros/stm32h7a3/make/stm32h7a3_flags.gmk +++ b/ref_app/target/micros/stm32h7a3/make/stm32h7a3_flags.gmk @@ -1,5 +1,5 @@ # -# Copyright Christopher Kormanyos 2007 - 2024. +# Copyright Christopher Kormanyos 2007 - 2025. # Distributed under the Boost Software License, # Version 1.0. (See accompanying file LICENSE_1_0.txt # or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,7 +9,7 @@ # compiler flags for the target architecture # ------------------------------------------------------------------------------ -GCC_VERSION = 13.3.1 +GCC_VERSION = 14.2.1 GCC_TARGET = arm-none-eabi GCC_PREFIX = arm-none-eabi diff --git a/ref_app/target/micros/x86_64-w64-mingw32/make/x86_64-w64-mingw32_flags.gmk b/ref_app/target/micros/x86_64-w64-mingw32/make/x86_64-w64-mingw32_flags.gmk index 5f9b10cf1..f9739d44a 100644 --- a/ref_app/target/micros/x86_64-w64-mingw32/make/x86_64-w64-mingw32_flags.gmk +++ b/ref_app/target/micros/x86_64-w64-mingw32/make/x86_64-w64-mingw32_flags.gmk @@ -1,5 +1,5 @@ # -# Copyright Christopher Kormanyos 2019 - 2024. +# Copyright Christopher Kormanyos 2019 - 2025. # Distributed under the Boost Software License, # Version 1.0. (See accompanying file LICENSE_1_0.txt # or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +13,16 @@ GCC_VERSION = 13.2.0 GCC_TARGET = x86_64-w64-mingw32 GCC_PREFIX = +AR := $(PATH_TOOLS_CC)\ar.exe +AS := $(PATH_TOOLS_CC)\g++.exe +CC := $(PATH_TOOLS_CC)\g++.exe +CPPFILT := $(PATH_TOOLS_CC)\c++filt.exe +NM := $(PATH_TOOLS_CC)\nm.exe +OBJDUMP := $(PATH_TOOLS_CC)\objdump.exe +OBJCOPY := $(PATH_TOOLS_CC)\objcopy.exe +READELF := $(PATH_TOOLS_CC)\readelf.exe +SIZE := $(PATH_TOOLS_CC)\size.exe + TGT_SUFFIX = exe TGT_ALLFLAGS = -O3 \ diff --git a/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S b/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S index bf7b75c0a..cdaa8f2e2 100644 --- a/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S +++ b/ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S @@ -2,9 +2,9 @@ .global coprocessor_bin coprocessor_bin: .byte 0x6F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00 - .byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0x01, 0x4B, 0x6F, 0x00, 0x80, 0x30, 0x41, 0x11, 0x06, 0xC6 + .byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0x41, 0x4B, 0x6F, 0x00, 0x00, 0x27, 0x41, 0x11, 0x06, 0xC6 .byte 0x31, 0x2A, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0xB7, 0x16, 0x00, 0x50, 0x03, 0xA7, 0xC6, 0x09 - .byte 0xB7, 0x17, 0x00, 0x50, 0x93, 0x87, 0x07, 0x0B, 0x3A, 0x95, 0x63, 0x74, 0xF5, 0x00, 0x23, 0xAE + .byte 0xB7, 0x17, 0x00, 0x50, 0x93, 0x87, 0x47, 0x0B, 0x3A, 0x95, 0x63, 0x74, 0xF5, 0x00, 0x23, 0xAE .byte 0xA6, 0x08, 0x3A, 0x85, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00 .byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00 @@ -18,7 +18,7 @@ coprocessor_bin: .byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0x01, 0x11, 0x2E, 0xC2, 0x32, 0xC4, 0x36, 0xC6, 0x3A, 0xC8, 0x3E, 0xCA, 0x42, 0xCC, 0x46, 0xCE .byte 0x01, 0xA0, 0x00, 0x00, 0x41, 0x11, 0x01, 0x45, 0x06, 0xC6, 0x89, 0x28, 0x01, 0x45, 0xA9, 0x20 - .byte 0xB2, 0x40, 0x01, 0x45, 0x41, 0x01, 0x3D, 0xA0, 0x37, 0x15, 0x00, 0x50, 0x13, 0x05, 0x05, 0x0B + .byte 0xB2, 0x40, 0x01, 0x45, 0x41, 0x01, 0x3D, 0xA0, 0x37, 0x15, 0x00, 0x50, 0x13, 0x05, 0x45, 0x0B .byte 0x82, 0x80, 0x00, 0x00, 0x41, 0x11, 0x06, 0xC6, 0xC5, 0x3F, 0x83, 0x47, 0x05, 0x00, 0x81, 0xE7 .byte 0x85, 0x47, 0x23, 0x00, 0xF5, 0x00, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0x01, 0x45, 0x81, 0x45 .byte 0x82, 0x80, 0x00, 0x00, 0x37, 0x07, 0x0C, 0x60, 0x9D, 0x46, 0xBA, 0x87, 0x14, 0xC7, 0x13, 0x07 @@ -29,30 +29,30 @@ coprocessor_bin: .byte 0x07, 0x06, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x05, 0x45, 0x82, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x23, 0x14, 0xB5, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00 .byte 0xB1, 0x45, 0x69, 0xBD, 0x41, 0x11, 0x01, 0x45, 0x06, 0xC6, 0xAD, 0x37, 0x37, 0x17, 0x00, 0x50 - .byte 0x13, 0x07, 0x47, 0x0B, 0x83, 0x57, 0x67, 0x00, 0x83, 0x55, 0x47, 0x00, 0xB7, 0x1E, 0x00, 0x50 + .byte 0x13, 0x07, 0x87, 0x0B, 0x83, 0x57, 0x67, 0x00, 0x83, 0x55, 0x47, 0x00, 0xB7, 0x1E, 0x00, 0x50 .byte 0xA9, 0x66, 0x37, 0x08, 0x00, 0xF8, 0x93, 0x8E, 0x8E, 0x01, 0x93, 0x86, 0x06, 0x40, 0x7D, 0x18 .byte 0x05, 0x43, 0x01, 0x4E, 0xB7, 0x08, 0x00, 0x08, 0x13, 0x05, 0x00, 0x10, 0x11, 0x67, 0x6D, 0x07 .byte 0x85, 0x07, 0xC2, 0x07, 0x90, 0x42, 0xC1, 0x83, 0x63, 0xE5, 0xF5, 0x02, 0x33, 0x66, 0x16, 0x01 .byte 0x90, 0xC2, 0x7D, 0x17, 0x63, 0x8B, 0xA7, 0x00, 0x65, 0xF7, 0x05, 0x0E, 0x13, 0x77, 0xFE, 0x03 .byte 0x06, 0x07, 0x76, 0x97, 0x03, 0x53, 0x07, 0x00, 0xD1, 0xBF, 0x9A, 0x85, 0x81, 0x47, 0x69, 0xFB .byte 0xED, 0xB7, 0x33, 0x76, 0x06, 0x01, 0x90, 0xC2, 0xE9, 0xBF, 0x00, 0x00, 0x37, 0x17, 0x00, 0x50 - .byte 0xB7, 0x16, 0x00, 0x50, 0xA9, 0x67, 0x13, 0x07, 0x47, 0x0B, 0x93, 0x86, 0x86, 0x00, 0x14, 0xC3 + .byte 0xB7, 0x16, 0x00, 0x50, 0xA9, 0x67, 0x13, 0x07, 0x87, 0x0B, 0x93, 0x86, 0x86, 0x00, 0x14, 0xC3 .byte 0x83, 0xA6, 0x07, 0x40, 0x37, 0x06, 0x00, 0xF8, 0x7D, 0x16, 0xF1, 0x8E, 0x23, 0xA0, 0xD7, 0x40 .byte 0x03, 0xA5, 0x87, 0x4C, 0x37, 0x08, 0x08, 0x00, 0xBE, 0x86, 0x33, 0x65, 0x05, 0x01, 0x23, 0xA4 .byte 0xA7, 0x4C, 0x83, 0xA5, 0x07, 0x40, 0x37, 0x05, 0x00, 0x08, 0x6D, 0x8E, 0x23, 0xA0, 0xC7, 0x40 .byte 0x83, 0xA7, 0xC7, 0x40, 0x23, 0x22, 0x07, 0x00, 0x23, 0x14, 0x07, 0x00, 0xC9, 0x8F, 0x23, 0xA6 - .byte 0xF6, 0x40, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0xB7, 0x16, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50 - .byte 0x93, 0x86, 0x06, 0x0A, 0x93, 0x05, 0xC7, 0x09, 0xB7, 0x17, 0x00, 0x50, 0x33, 0x85, 0xB6, 0x40 - .byte 0x13, 0x86, 0xC7, 0x09, 0x2A, 0x96, 0x63, 0x8D, 0xB6, 0x00, 0x13, 0x07, 0xC7, 0x09, 0x93, 0x87 - .byte 0xC7, 0x09, 0x94, 0x43, 0x91, 0x07, 0x11, 0x07, 0x23, 0x2E, 0xD7, 0xFE, 0xE3, 0x1B, 0xF6, 0xFE - .byte 0xB7, 0x17, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0x07, 0x0A, 0x13, 0x07, 0x07, 0x0C - .byte 0x63, 0x89, 0xE6, 0x00, 0x93, 0x87, 0x07, 0x0A, 0x23, 0xA0, 0x07, 0x00, 0x91, 0x07, 0xE3, 0x9D - .byte 0xE7, 0xFE, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x22, 0xC4, 0x26, 0xC2, 0x37, 0x14 - .byte 0x00, 0x50, 0xB7, 0x14, 0x00, 0x50, 0x06, 0xC6, 0x93, 0x07, 0xC4, 0x09, 0x93, 0x84, 0x84, 0x09 - .byte 0x63, 0x8A, 0x97, 0x00, 0x13, 0x04, 0xC4, 0x09, 0x83, 0x27, 0xC4, 0xFF, 0x71, 0x14, 0x82, 0x97 - .byte 0xE3, 0x1C, 0x94, 0xFE, 0xB2, 0x40, 0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x00, 0x00 - .byte 0x41, 0x11, 0x06, 0xC6, 0xC5, 0x33, 0x8D, 0x37, 0xC1, 0x37, 0x6F, 0xF0, 0xBF, 0xE8, 0xAD, 0x35 - .byte 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0xF6, 0x40, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x06, 0xC6, 0xA5, 0x3D, 0x39, 0x20 + .byte 0xB5, 0x20, 0x6F, 0xF0, 0x3F, 0xF2, 0x09, 0x37, 0xFD, 0xBF, 0x00, 0x00, 0xB7, 0x16, 0x00, 0x50 + .byte 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0x06, 0x0A, 0x93, 0x05, 0xC7, 0x09, 0xB7, 0x17, 0x00, 0x50 + .byte 0x33, 0x85, 0xB6, 0x40, 0x13, 0x86, 0xC7, 0x09, 0x2A, 0x96, 0x63, 0x8D, 0xB6, 0x00, 0x13, 0x07 + .byte 0xC7, 0x09, 0x93, 0x87, 0xC7, 0x09, 0x94, 0x43, 0x91, 0x07, 0x11, 0x07, 0x23, 0x2E, 0xD7, 0xFE + .byte 0xE3, 0x1B, 0xF6, 0xFE, 0xB7, 0x17, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0x07, 0x0A + .byte 0x13, 0x07, 0x47, 0x0C, 0x63, 0x89, 0xE6, 0x00, 0x93, 0x87, 0x07, 0x0A, 0x23, 0xA0, 0x07, 0x00 + .byte 0x91, 0x07, 0xE3, 0x9D, 0xE7, 0xFE, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x11, 0x22, 0xC4 + .byte 0x26, 0xC2, 0x37, 0x14, 0x00, 0x50, 0xB7, 0x14, 0x00, 0x50, 0x06, 0xC6, 0x93, 0x07, 0xC4, 0x09 + .byte 0x93, 0x84, 0x84, 0x09, 0x63, 0x8A, 0x97, 0x00, 0x13, 0x04, 0xC4, 0x09, 0x83, 0x27, 0xC4, 0xFF + .byte 0x71, 0x14, 0x82, 0x97, 0xE3, 0x1C, 0x94, 0xFE, 0xB2, 0x40, 0x22, 0x44, 0x92, 0x44, 0x41, 0x01 + .byte 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -266,4 +266,4 @@ coprocessor_bin: .byte 0x28, 0x00, 0x2A, 0x00, 0x2C, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36, 0x00 .byte 0x38, 0x00, 0x3A, 0x00, 0x3C, 0x00, 0x3E, 0x00, 0x40, 0x00, 0x44, 0x00, 0x48, 0x00, 0x4C, 0x00 .byte 0x50, 0x00, 0x54, 0x00, 0x58, 0x00, 0x60, 0x00, 0x70, 0x00, 0x80, 0x00, 0x90, 0x00, 0xA0, 0x00 - .byte 0xB0, 0x00, 0xC0, 0x00, 0xE0, 0x00, 0x00, 0x01, 0x2C, 0x02, 0x00, 0x50, 0xA8, 0x10, 0x00, 0x50 + .byte 0xB0, 0x00, 0xC0, 0x00, 0xE0, 0x00, 0x00, 0x01, 0x2C, 0x02, 0x00, 0x50, 0xAC, 0x10, 0x00, 0x50 diff --git a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop_flags.gmk b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop_flags.gmk index 566a33b5c..1571a9098 100644 --- a/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop_flags.gmk +++ b/ref_app/target/micros/xtensa_esp32_s3_riscv_cop/make/xtensa_esp32_s3_riscv_cop_flags.gmk @@ -96,11 +96,13 @@ RULE_SPECIAL_MAKE_IMAGE_FILE_PART01 := $(OBJCOPY) $(APP).$(TGT_SUFFIX) -O binary RULE_SPECIAL_MAKE_IMAGE_FILE_PART02 := $(ECHO) +++ creating assembly image as byte-array source file $(PATH_BIN)/coprocessor_binary.S RULE_SPECIAL_MAKE_IMAGE_FILE_PART03 := $(PYTHON) $(PATH_TGT)/startup/Scripts/bin2asm.py -i $(APP).bin -o $(PATH_BIN)/coprocessor_binary.S $(BIN2ASM_FLAGS) RULE_SPECIAL_MAKE_IMAGE_FILE_PART04 := $(ECHO) +++ creating assembly image as byte-array source file target/micros/startup/coprocessor_binary.S -RULE_SPECIAL_MAKE_IMAGE_FILE_PART05 := $(PYTHON) $(PATH_TGT)/startup/Scripts/bin2asm.py -i $(APP).bin -o $(PATH_TGT)/../xtensa_esp32_s3/startup/coprocessor_binary.S $(BIN2ASM_FLAGS) +RULE_SPECIAL_MAKE_IMAGE_FILE_PART05 := $(ECHO) +++ ... and output coprocessor_binary.S to $(PATH_TGT)/../xtensa_esp32_s3/startup +RULE_SPECIAL_MAKE_IMAGE_FILE_PART06 := $(PYTHON) $(PATH_TGT)/startup/Scripts/bin2asm.py -i $(APP).bin -o $(PATH_TGT)/../xtensa_esp32_s3/startup/coprocessor_binary.S $(BIN2ASM_FLAGS) RULE_SPECIAL_MAKE_IMAGE_FILE := $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART00) \ && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART01) \ && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART02) \ && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART03) \ && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART04) \ - && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART05) + && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART05) \ + && $(RULE_SPECIAL_MAKE_IMAGE_FILE_PART06)