Page 1 of 1

Small patch simplify running code from XIP

Posted: Tue Dec 09, 2025 7:32 pm
by emulator
Would you consider the following small patch in main? This allows the vector table alignment to be overridden for platforms like RP-Pico when running via XIP?

Code: Select all

--- a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld
+++ b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld
@@ -16,9 +16,11 @@
 
 ENTRY(Reset_Handler)
 
+__vectors_align__ = DEFINED(__vectors_align__) ? __vectors_align__ : 1024;
+
 SECTIONS
 {
-    .vectors : ALIGN(1024)
+    .vectors : ALIGN(__vectors_align__)
     {
         __textvectors_base__ = LOADADDR(.vectors);
         __vectors_base__ = .;
--
2.43.0