This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 2c51ec655c3bdf94385df1279c06c1b11bf9e249 Author: Jukka Laitinen <[email protected]> AuthorDate: Thu Sep 3 17:13:06 2026 +0300 arch/arm/imxrt: ELE, TRDC and TCM fixes in __start for iMXRT118x platform - Initialize the internal secure element, if configured - Initialize the TRDC, if configured - Disable the TCM enabling code when compiling for other than Cortex-M7 chip. This needs to be skipped for M33 core on imx118x Signed-off-by: Jukka Laitinen <[email protected]> --- arch/arm/src/imxrt/imxrt_start.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/src/imxrt/imxrt_start.c b/arch/arm/src/imxrt/imxrt_start.c index 4d78cdfad14..5fcf30cb8ff 100644 --- a/arch/arm/src/imxrt/imxrt_start.c +++ b/arch/arm/src/imxrt/imxrt_start.c @@ -47,6 +47,14 @@ #include "imxrt_start.h" #include "imxrt_gpio.h" +#ifdef CONFIG_IMXRT_ELE +# include "imxrt118x_ele.h" +#endif + +#ifdef CONFIG_IMXRT_TRDC +# include "imxrt118x_trdc.h" +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -100,6 +108,7 @@ extern const void * const _vectors[]; static inline void imxrt_tcmenable(void) { +#ifdef CONFIG_ARCH_CORTEXM7 uint32_t regval; UP_MB(); @@ -131,6 +140,7 @@ static inline void imxrt_tcmenable(void) #warning Missing logic #endif +#endif /* CONFIG_ARCH_CORTEXM7 */ } /**************************************************************************** @@ -225,6 +235,12 @@ void __start(void) arm_stack_check_init(); #endif +#ifdef CONFIG_IMXRT_ELE + /* Bring the EdgeLock Enclave up */ + + imxrt118x_ele_init(); +#endif + /* Configure the UART so that we can get debug output as soon as possible */ imxrt_clockconfig(); @@ -240,6 +256,13 @@ void __start(void) imxrt_boardinitialize(); +#ifdef CONFIG_IMXRT_TRDC + /* Take ownership of the TRDCs from ELE and program them. */ + + imxrt118x_trdc_init(); + imxrt118x_trdc_config(); +#endif + #ifdef CONFIG_ARM_MPU #ifdef CONFIG_BUILD_PROTECTED /* For the case of the separate user-/kernel-space build, perform whatever
