class

Quartz::Build::Linker

Inherits Reference < Object

Links a set of object files into a partial (relocatable) ELF using arm-none-eabi-gcc as the linker driver. Uses -r --emit-relocs so the firmware loader can place the image anywhere in RAM.

Linker flags come from sdk.opts verbatim; we only append -o and the object list. Entrypoint symbol and map-file path are substituted via SdkOpts#linker_args_for.

Constructors

new(toolchain : Toolchain, opts : SdkOpts, sdk_root : String | Path, runner : Runner | Nil = nil)
Source

Instance methods

command_for(objects : Array(String), output : String, app_entry_point : String, extra_objects : Array(String) = [] of String) : Tuple(String, Array(String))

Build the (program, args) pair without running it — handy for specs.

Source
link(objects : Array(String), output : String, app_entry_point : String, extra_objects : Array(String) = [] of String) : String

Link objects into output ELF, declaring app_entry_point as the symbol the firmware loader will call. Writes a .map next to output.

extra_objects are appended after the app objects — pass the path to libflipperapi.a (from StubGenerator) here to satisfy firmware-API references without embedding real firmware code.

Source
opts
Source
sdk_root
Source
toolchain
Source

Nested types