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
588 B
Zig
24 lines
588 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/startup.zig"),
|
|
.target = target,
|
|
//.optimize = .Debug,
|
|
.optimize = .ReleaseSafe,
|
|
.linkage = .static,
|
|
});
|
|
|
|
exe.setLinkerScriptPath(b.path("link.ld"));
|
|
|
|
b.installArtifact(exe);
|
|
}
|