diff --git a/ref_app/src/mcal/stm32h7a3/mcal_cpu.cpp b/ref_app/src/mcal/stm32h7a3/mcal_cpu.cpp index 391bc5e9d..10f8d3be6 100644 --- a/ref_app/src/mcal/stm32h7a3/mcal_cpu.cpp +++ b/ref_app/src/mcal/stm32h7a3/mcal_cpu.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2022. +// Copyright Christopher Kormanyos 2022 - 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) @@ -47,7 +47,7 @@ void mcal::cpu::init() void mcal::cpu::post_init() { - // Enable the Cache-I and Cache-D. + // Enable the instruction-cache and the data-cache. detail::enable_i_cache(); detail::enable_d_cache(); } @@ -81,7 +81,9 @@ void mcal::cpu::detail::enable_d_cache() asm volatile("dsb"); // Invalidate the data cache. - auto sets = + std::uint32_t + sets + { static_cast ( static_cast @@ -89,14 +91,15 @@ void mcal::cpu::detail::enable_d_cache() mcal::reg::reg_access_static::reg_get() >> static_cast(UINT8_C(13)) ) - & - static_cast(UINT32_C(0x7FFF)) - ); + & static_cast(UINT32_C(0x7FFF)) + ) + }; + asm volatile("dsb"); do { - auto ways = mcal::reg::reg_access_static::reg_get(); + std::uint32_t ways { mcal::reg::reg_access_static::reg_get() }; asm volatile("dsb"); ways = @@ -119,10 +122,11 @@ void mcal::cpu::detail::enable_d_cache() asm volatile("dsb"); } while(ways-- != static_cast(UINT8_C(0))); - asm volatile("dsb"); + asm volatile("dsb"); } while(sets-- != static_cast(UINT8_C(0))); + asm volatile("dsb"); // Enable the data cache. diff --git a/ref_app/src/sys/start/coverity.c b/ref_app/src/sys/start/coverity.c index 2615afcfb..ba75044d3 100644 --- a/ref_app/src/sys/start/coverity.c +++ b/ref_app/src/sys/start/coverity.c @@ -1,5 +1,8 @@ /* Coverity Scan model */ +/* cd /mnt/c/Users/ckorm/Documents/Ks/uC_Software/Boards/real-time-cpp/ref_app */ +/* target/build/build.sh x86_64-w64-mingw32 rebuild */ + void dummy(void); void dummy(void)