You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
619 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.resolveTargetQuery(.{
.cpu_arch = .thumb,
.cpu_model = .{ .explicit = &std.Target.arm.cpu.cortex_m4 },
.os_tag = .freestanding,
.abi = .none
});
const exe = b.addExecutable(.{
.name = "stm32",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = .Debug, // .ReleaseSmall,
.linkage = .static,
});
exe.addAssemblyFile(b.path("src/bootstrap.s"));
exe.setLinkerScriptPath(b.path("link.ld"));
b.installArtifact(exe);
}