From f529a3b0f8ee24229997e995021a2ee8cb25f065 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 5 Oct 2024 12:13:49 -0400 Subject: initial commit --- build.zig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 build.zig (limited to 'build.zig') diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..10fe592 --- /dev/null +++ b/build.zig @@ -0,0 +1,23 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.resolveTargetQuery(.{ + .cpu_arch = .thumb, + .os_tag = .freestanding, + .abi = .none + }); + const optimize = .Debug; // .ReleaseSmall + + const exe = b.addExecutable(.{ + .name = "stm32", + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + .linkage = .static, + }); + + exe.addAssemblyFile(b.path("src/bootstrap.s")); + exe.setLinkerScriptPath(b.path("link.ld")); + + b.installArtifact(exe); +} -- cgit v1.2.3