From ff59986ea194b8f1db56cef53fa15c37c3d8777d Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:10:18 +0300 Subject: [PATCH] stm32f4: Enable non-halting SRAM access for RTT on STM32F4 series --- src/target/stm32f4.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/target/stm32f4.c b/src/target/stm32f4.c index 4d1985e1021..09132f86580 100644 --- a/src/target/stm32f4.c +++ b/src/target/stm32f4.c @@ -441,6 +441,10 @@ static bool stm32f4_attach(target_s *const target) } } + /* On STM32F4 SoC, Cortex-M4F allows SRAM access without halting */ + if (!is_f7 && target->part_id != ID_STM32F20X) + target->target_options |= TOPT_NON_HALTING_MEM_IO; + /* Now we have a base RAM map, rebuild the Flash map */ uint8_t split = 0; uint32_t bank_length; @@ -498,6 +502,7 @@ static bool stm32f4_attach(target_s *const target) stm32f4_add_flash(target, bank2_base + 0x20000U, remaining_bank_length, 0x20000, 21, split); } } + return true; }