Download firmware/src/main.zig from Snapkitty/Intent-V: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/Snapkitty/Intent-V/resolve/main/firmware/src/main.zig
- Command line
-
hf download hf://Snapkitty/Intent-V/firmware/src/main.zig
-
curl -L -o main.zig https://huggingface.co/Snapkitty/Intent-V/resolve/main/firmware/src/main.zig
623 Bytes
| // SPDX-License-Identifier: LicenseRef-Sovereign-Leviathan-SL-AGPL3-001 | |
| // Licensing: see LICENSE in the repository root. | |
| const ccu = @import("ccu.zig"); | |
| export fn _start() linksection(".text.init") callconv(.Naked) noreturn { | |
| asm volatile ( | |
| \\la sp, _stack_top | |
| \\call kmain | |
| \\1: j 1b | |
| ); | |
| } | |
| export fn kmain() noreturn { | |
| const unit = ccu.Ccu.init(ccu.BASE_ADDR); | |
| _ = unit.compute(6, 7) catch halt(); | |
| halt(); | |
| } | |
| fn halt() noreturn { | |
| while (true) asm volatile ("wfi"); | |
| } | |
| pub fn panic(_: []const u8, _: ?*@import("std").builtin.StackTrace, _: ?usize) noreturn { | |
| halt(); | |
| } | |