diff options
| author | Rbb666 <[email protected]> | 2026-07-31 15:07:36 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-08-12 12:54:50 +0800 |
| commit | 6b4f34204ed2da80b7c37b912612c65cebc30ce3 (patch) | |
| tree | 9451c2d5b1b08de290ecc4eddb5a3aed3487e273 /libcpu | |
| parent | 9a12b2a7b991df7b72a7f6d0d9cc74a3ba5f7c93 (diff) | |
feat(dm): support OFW on Cortex-M targets
Add the ARM NVIC PIC driver, no-MMU I/O mapping, built-in FDT support, and Cortex-M CPU hooks required by the native RT-Thread device model.
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/cortex-m4/cpuport.c | 5 | ||||
| -rw-r--r-- | libcpu/arm/cortex-m7/cpuport.c | 5 | ||||
| -rw-r--r-- | libcpu/arm/cortex-m85/cpuport.c | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/libcpu/arm/cortex-m4/cpuport.c b/libcpu/arm/cortex-m4/cpuport.c index c78c75bd55..58a9a7c095 100644 --- a/libcpu/arm/cortex-m4/cpuport.c +++ b/libcpu/arm/cortex-m4/cpuport.c @@ -24,6 +24,11 @@ #define DBG_LVL DBG_INFO #include <rtdbg.h> +rt_weak int rt_hw_cpu_id(void) +{ + return 0; +} + #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ /* Clang */ || (defined ( __clang__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ diff --git a/libcpu/arm/cortex-m7/cpuport.c b/libcpu/arm/cortex-m7/cpuport.c index bcae6b1558..87677a012c 100644 --- a/libcpu/arm/cortex-m7/cpuport.c +++ b/libcpu/arm/cortex-m7/cpuport.c @@ -22,6 +22,11 @@ #include <mprotect.h> #endif +rt_weak int rt_hw_cpu_id(void) +{ + return 0; +} + #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ /* Clang */ || (defined ( __clang__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ diff --git a/libcpu/arm/cortex-m85/cpuport.c b/libcpu/arm/cortex-m85/cpuport.c index 0217a0d5db..cc07371710 100644 --- a/libcpu/arm/cortex-m85/cpuport.c +++ b/libcpu/arm/cortex-m85/cpuport.c @@ -19,6 +19,11 @@ #include <rtthread.h> +rt_weak int rt_hw_cpu_id(void) +{ + return 0; +} + #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ @@ -428,7 +433,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info) /** * shutdown CPU */ -void rt_hw_cpu_shutdown(void) +rt_weak void rt_hw_cpu_shutdown(void) { rt_kprintf("shutdown...\n"); |
