xiaoxiang781216 commented on code in PR #20430:
URL: https://github.com/apache/nuttx/pull/20430#discussion_r4157356726
##########
arch/arm/src/armv7-m/arm_vectors.c:
##########
@@ -58,12 +58,62 @@
extern void __start(void);
+#if defined(CONFIG_ARMV7M_ITCM_ECC) || defined(CONFIG_ARMV7M_DTCM_ECC)
+static void start(void) __attribute__((naked, no_instrument_function));
+#endif
+
static void start(void)
{
/* Zero lr to mark the end of backtrace */
+#if defined(CONFIG_ARMV7M_ITCM_ECC) || defined(CONFIG_ARMV7M_DTCM_ECC)
+ /* Run without a stack until TCM ECC is initialized. */
+
+ __asm__ __volatile__(
+ "cpsid i\n\t"
+ "mov lr, #0\n\t"
+ "movs r0, #7\n\t" /* EN | RMW | RETEN */
+#ifdef CONFIG_ARMV7M_ITCM_ECC
+ "ldr r3, =0xe000ef90\n\t" /* ITCMCR */
+ "str r0, [r3]\n\t"
Review Comment:
but why not postpone ECC enable after the normal bss/data finish the
initialization
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]