Ship a device support pack: .lcf-style linker command files, startup, and register headers for the S12/S12X family #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CodeWarrior ships a per-device support pack for essentially the entire S12/S12X family: linker command files (
.lcf) defining the memory map (REGIONS/PLACEMENT), startup code, and register definition headers. This repo has one generic newlibcrt0.oand a single example linker script derived from an MC9S12C32 (tests/s12/link.ld). Users targeting other parts (e.g. MC9S12XDP512, MC9S08..., S12XS) must hand-write every memory map and startup.Motivation
.lcffiles are a de-facto project interchange format; being able to consume or translate them lowers migration cost.Current state
tests/s12/link.ld: RAM @ 0x0800 (2K), ROM @ 0xC000 (16K), vectors @ 0xFF80 (MC9S12C32-like, hard-coded in the firmware build (pkgs/s12-firmware.nix)).crt0.oandsim-valid.ld($out/m68hc11-elf/lib/), not device-specific.Proposed scope
.lcf-like text format or structured.ldtemplates) and a tool that renders it into GNU ld scripts.s19/s28/s37build output and a memory map report (equivalent to the CodeWarrior MAP file) as part of the normal build.Acceptance criteria
-m68hc12and-m9s12x.gdb-simtests.References
tests/s12/link.ld,tests/s12/start.s,tests/s12/vectors.cpkgs/s12-firmware.nixpkgs/newlib-m68hc11.nix(crt0, sim-valid.ld)