From e244012738c0d431ff6c791325f2d3f9a3dfdeb0 Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Sat, 14 Jun 2025 10:27:32 -0400 Subject: Catch target-host version mismatch Attach the version information in a symbol that's generated by the host. Then, expect the same symbol exists in the embedded target. If the linker can't resolve this, then the host and target should be incompatible. I'm overloading the __imxrt_family symbol for this. --- src/host.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/host.rs') diff --git a/src/host.rs b/src/host.rs index 2598d50..902208a 100644 --- a/src/host.rs +++ b/src/host.rs @@ -624,7 +624,7 @@ impl RuntimeBuilder { )?; // The target runtime looks at this value to predicate some pre-init instructions. // Could be helpful for binary identification, but it's an undocumented feature. - writeln!(writer, "__imxrt_family = {};", self.family.id(),)?; + writeln!(writer, "__imxrt_rt_v0.2 = {};", self.family.id(),)?; let link_x = include_bytes!("host/imxrt-link.x"); writer.write_all(link_x)?; -- cgit v1.2.3