You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/10/07 18:57:36 UTC

[mynewt-core] 03/03: mcu/stm32f7: Move __vector_tbl_reloc__ to DTCM

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 50e5c174b980a97102cea55006c67f05e975e0e2
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Thu Oct 6 19:27:07 2022 +0200

    mcu/stm32f7: Move __vector_tbl_reloc__ to DTCM
    
    Relocate interrupt vector table was put SRAM1 which is accessed
    over AXI bus that can be cached.
    It seems that writing to this RAM when DCache in enabled in
    write back mode may result in NVIC using old values that are
    still in RAM and not new values that are in cache written by
    NVIC_SetVector.
    
    Moving vector_table to DTCM allows to have DCache enabled
    from the beginning.
---
 hw/mcu/stm/stm32f7xx/stm32f746.ld | 2 +-
 hw/mcu/stm/stm32f7xx/stm32f767.ld | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/mcu/stm/stm32f7xx/stm32f746.ld b/hw/mcu/stm/stm32f7xx/stm32f746.ld
index f1e78ba65..e1a49b701 100644
--- a/hw/mcu/stm/stm32f7xx/stm32f746.ld
+++ b/hw/mcu/stm/stm32f7xx/stm32f746.ld
@@ -133,7 +133,7 @@ SECTIONS
         __vector_tbl_reloc__ = .;
         . = . + (__isr_vector_end - __isr_vector_start);
         . = ALIGN(4);
-    } > RAM
+    } > DTCM
 
     .coredata :
     {
diff --git a/hw/mcu/stm/stm32f7xx/stm32f767.ld b/hw/mcu/stm/stm32f7xx/stm32f767.ld
index f1e78ba65..e1a49b701 100644
--- a/hw/mcu/stm/stm32f7xx/stm32f767.ld
+++ b/hw/mcu/stm/stm32f7xx/stm32f767.ld
@@ -133,7 +133,7 @@ SECTIONS
         __vector_tbl_reloc__ = .;
         . = . + (__isr_vector_end - __isr_vector_start);
         . = ALIGN(4);
-    } > RAM
+    } > DTCM
 
     .coredata :
     {