This commit is contained in:
Filipriec
2026-03-09 11:03:12 +01:00
parent f3e7cbb83a
commit cfea6e031a
5 changed files with 18 additions and 5 deletions

1
tiva/.dir-locals.el Normal file
View File

@@ -0,0 +1 @@
((zig-mode . ((ff-search-directories . ("/home/priec/programs/CMSIS/CMSIS/Include" "/home/priec/programs/CMSIS/Device/TI/TM4C/Include")))))

View File

@@ -38,6 +38,7 @@ pub fn build(b: *std.Build) void {
// Provide basic built-in functions // Provide basic built-in functions
elf.bundle_compiler_rt = true; elf.bundle_compiler_rt = true;
elf.link_gc_sections = true;
// Use your custom linker script // Use your custom linker script
elf.setLinkerScript(b.path("layout.ld")); elf.setLinkerScript(b.path("layout.ld"));

11
tiva/build.zig.zon Normal file
View File

@@ -0,0 +1,11 @@
.{
.name = .tiva_app,
.version = "0.0.1",
.fingerprint = 0x8f7e4f3ddce5d838,
.paths = .{
"build.zig",
"build.zig.zon",
"src",
},
.dependencies = .{},
}

View File

@@ -2,10 +2,6 @@ const cmsis = @cImport({
@cInclude("TM4C123GH6PM.h"); @cInclude("TM4C123GH6PM.h");
}); });
pub fn main() noreturn { export fn _start() noreturn {
while (true) {}
}
pub fn panic(_: []const u8, _: ?*@import("std").builtin.StackTrace, _: ?usize) noreturn {
while (true) {} while (true) {}
} }

4
tiva/zls.json Normal file
View File

@@ -0,0 +1,4 @@
{
"enable_autofix": true,
"enable_build_on_save": true
}