aboutsummaryrefslogtreecommitdiff
path: root/src/host/imxrt-link.x
diff options
context:
space:
mode:
authorsummivox <summivox@gmail.com>2023-08-20 23:13:59 -0700
committerIan McIntyre <ianpmcintyre@gmail.com>2023-09-08 19:18:34 -0400
commitc6d3bcfb11800c58339037be58fa9935f816f1bb (patch)
tree4e8b0d6cdae543e0443f4a8d4cf969f4def7a1f3 /src/host/imxrt-link.x
parente1fddd5b3b678c43ee59835d7b57bbc063a22d28 (diff)
Add optional DCD section in linker script
Users can define their device configuration data (DCD), and place the data in the .dcd section. If the .dcd section has content, the entry in the IVT points at the user's DCD. This plays well with imxrt-dcd.
Diffstat (limited to 'src/host/imxrt-link.x')
-rw-r--r--src/host/imxrt-link.x3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/imxrt-link.x b/src/host/imxrt-link.x
index d02a170..71b697e 100644
--- a/src/host/imxrt-link.x
+++ b/src/host/imxrt-link.x
@@ -191,6 +191,9 @@ ERROR(imxrt-rt): .got section detected in the input object files
Dynamic relocations are not supported. If you are linking to C code compiled using
the 'cc' crate then modify your build script to compile the C code _without_
the -fPIC flag. See the documentation of the `cc::Build.pic` method for details.");
+
+ASSERT((__dcd_end - __dcd_start) % 4 == 0, "
+ERROR(imxrt-rt): .dcd (Device Configuration Data) size must be a multiple of 4 bytes.");
/* Do not exceed this mark in the error messages above | */
/* ===--- End imxrt-link.x ---=== */