class

Quartz::Build::StubGenerator

Inherits Reference < Object

Generates an ARM Thumb weak-symbol stub library from the Function/Variable entries in api_symbols.csv.

Each exported firmware symbol gets a weak stub implementation so the linker can resolve undefined references without embedding firmware code. At FAP load time the firmware loader patches stub addresses with real ones via the ELF relocation table.

Output is cached as <out_dir>/libflipperapi.a; regenerated only when the symbol set changes (16-byte SHA256 hash comparison via .stub_ver marker).

Constants

STUB_ASM = "flipperapi_stubs.s"
STUB_LIB = "libflipperapi.a"
STUB_OBJ = "flipperapi_stubs.o"
STUB_VER = ".stub_ver"

Constructors

new(toolchain : Toolchain)
Source

Instance methods

asm_for(api : ApiSymbols) : String

Exposed for tests — returns the assembly text that would be generated.

Source
generate(api : ApiSymbols, out_dir : String) : String

Returns path to <out_dir>/libflipperapi.a, creating or updating it when the symbol set differs from the cached version.

Source
toolchain
Source