summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-07 14:04:58 +0700
committerhathach <[email protected]>2025-11-07 23:50:16 +0700
commit652342b57b129a79e0df152377d18096e4a0fed5 (patch)
tree89b5cde09ecc608176a68acf1dd93e73a3e141c6 /hw
parent86a4990b96eafb5904f946fa061b310f155a7d51 (diff)
fix more alerts found by pvs-studio
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/imxrt/family.cmake3
-rw-r--r--hw/bsp/rp2040/family.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake
index 100deba1f..11cc00983 100644
--- a/hw/bsp/imxrt/family.cmake
+++ b/hw/bsp/imxrt/family.cmake
@@ -56,10 +56,9 @@ function(family_add_board BOARD_TARGET)
endif()
endforeach()
-
target_compile_definitions(${BOARD_TARGET} PUBLIC
__STARTUP_CLEAR_BSS
- CFG_TUSB_MEM_SECTION=__attribute__\(\(section\(\"NonCacheable\"\)\)\)
+ [=[CFG_TUSB_MEM_SECTION=__attribute__((section("NonCacheable")))]=]
)
if (NOT M4 STREQUAL "1")
diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c
index 35e5fc923..a51b3f758 100644
--- a/hw/bsp/rp2040/family.c
+++ b/hw/bsp/rp2040/family.c
@@ -105,7 +105,9 @@ static bool __no_inline_not_in_flash_func(get_bootsel_button)(void) {
IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_BITS);
// Note we can't call into any sleep functions in flash right now
- for (volatile int i = 0; i < 1000; ++i) {}
+ for (volatile int i = 0; i < 1000; ++i) {
+ __nop();
+ }
// The HI GPIO registers in SIO can observe and control the 6 QSPI pins.
// Note the button pulls the pin *low* when pressed.