summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-09-15 16:15:48 +0700
committerhathach <[email protected]>2025-09-15 16:15:48 +0700
commit65220679d641b2b3cde1000b196a411d031d2744 (patch)
treea0f7a64bdcab074460ea43a00d60edb89b2f3ad6
parentcc19c02f860f96299ceccdfcaf1befb308c9fab8 (diff)
fix imxrt build
-rw-r--r--hw/bsp/imxrt/boards/metro_m7_1011/board.h3
-rw-r--r--hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1010_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1015_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1020_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1024_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1060_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1064_evk/board.h3
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1170_evkb/board.h8
-rw-r--r--hw/bsp/imxrt/boards/teensy_40/board.h3
-rw-r--r--hw/bsp/imxrt/boards/teensy_41/board.h3
-rw-r--r--hw/bsp/imxrt/family.c5
13 files changed, 35 insertions, 11 deletions
diff --git a/hw/bsp/imxrt/boards/metro_m7_1011/board.h b/hw/bsp/imxrt/boards/metro_m7_1011/board.h
index ccc4d6b9a..908b9b87c 100644
--- a/hw/bsp/imxrt/boards/metro_m7_1011/board.h
+++ b/hw/bsp/imxrt/boards/metro_m7_1011/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h b/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
index 04d5b01b5..8f100284a 100644
--- a/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
+++ b/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
index 6b9ec0ae1..eda185fe4 100644
--- a/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
index e2ec4e627..697b9c30b 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
@@ -53,4 +53,7 @@
#define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_07_LPUART1_RX
#define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_06_LPUART1_TX
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
index 3f9c97e11..5028a6239 100644
--- a/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
index 39e63c472..f6a97815e 100644
--- a/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
@@ -50,4 +50,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
index de7ab0535..47678e9fe 100644
--- a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
index 5bbacadaf..e24b6dcdc 100644
--- a/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
index 6dc01e3e7..8bdb0561b 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1170_evkb/board.h b/hw/bsp/imxrt/boards/mimxrt1170_evkb/board.h
index 05bd2069f..a6332d896 100644
--- a/hw/bsp/imxrt/boards/mimxrt1170_evkb/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1170_evkb/board.h
@@ -49,14 +49,11 @@
#define UART_PORT LPUART1
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_LPUART10_CLK_ROOT
-// Additional board init for MPU configuration
-#define BOARD_INIT_2 1
-
//--------------------------------------------------------------------
// MPU configuration
//--------------------------------------------------------------------
#if __CORTEX_M == 7
-static void BOARD_ConfigMPU(void) {
+static inline void BOARD_ConfigMPU(void) {
#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
extern uint32_t Image$$RW_m_ncache$$Base[];
/* RW_m_ncache_unused is a auxiliary region which is used to get the whole size of noncache section */
@@ -434,8 +431,5 @@ static void BOARD_ConfigMPU(void) {
}
#endif
-static void board_init2() {
- BOARD_ConfigMPU();
-}
#endif
diff --git a/hw/bsp/imxrt/boards/teensy_40/board.h b/hw/bsp/imxrt/boards/teensy_40/board.h
index ae749e894..7b8754a97 100644
--- a/hw/bsp/imxrt/boards/teensy_40/board.h
+++ b/hw/bsp/imxrt/boards/teensy_40/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART6
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif /* BOARD_H_ */
diff --git a/hw/bsp/imxrt/boards/teensy_41/board.h b/hw/bsp/imxrt/boards/teensy_41/board.h
index 1bc022c54..91ae3debd 100644
--- a/hw/bsp/imxrt/boards/teensy_41/board.h
+++ b/hw/bsp/imxrt/boards/teensy_41/board.h
@@ -49,4 +49,7 @@
#define UART_PORT LPUART6
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_UART_CLK_ROOT
+static inline void BOARD_ConfigMPU(void) {
+}
+
#endif /* BOARD_H_ */
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c
index 1bbd3400a..9cd59b7d7 100644
--- a/hw/bsp/imxrt/family.c
+++ b/hw/bsp/imxrt/family.c
@@ -111,10 +111,7 @@ void board_init(void) {
BOARD_BootClockRUN();
SystemCoreClockUpdate();
- // Additional board init
-#if defined(BOARD_INIT_2) && BOARD_INIT_2
- board_init2();
-#endif
+ BOARD_ConfigMPU(); // defined in board.h
#ifdef TRACE_ETM
//CLOCK_EnableClock(kCLOCK_Trace);