Small patch simplify running code from XIP

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Post Reply
emulator
Posts: 25
Joined: Tue Dec 09, 2025 12:14 pm
Has thanked: 6 times
Been thanked: 7 times

Small patch simplify running code from XIP

Post 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
Post Reply