working zig on tiva tm4c

This commit is contained in:
Filipriec
2026-03-09 10:20:42 +01:00
parent d8b4c8e8cf
commit f3e7cbb83a
3 changed files with 23 additions and 0 deletions

View File

@@ -17,11 +17,22 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
const cmsis_path = "/home/priec/programs/CMSIS";
// Generic CMSIS Core (for core_cm4.h)
tiva_module.addIncludePath(.{ .cwd_relative = cmsis_path ++ "/CMSIS/Include" });
// TM4C Device Specific (for TM4C123GH6PM.h)
tiva_module.addIncludePath(.{ .cwd_relative = cmsis_path ++ "/Device/TI/TM4C/Include" });
const elf = b.addExecutable(.{
.name = "tiva-app",
.root_module = tiva_module,
});
elf.root_module.strip = true;
elf.root_module.omit_frame_pointer = true;
elf.root_module.unwind_tables = .none;
// Disable red zone for bare metal
elf.root_module.red_zone = false;