had some experience (not very successful) with Zig on AVR8
Aha! I’ve managed to setup interrupt vectors table manually, like this:
// NOTE: this must be the first function in the source!
export fn _vectors() void {
asm volatile ("jmp main");
asm volatile ("jmp 0");
asm volatile ("jmp 0");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm volatile ("jmp stub");
asm …
I was going to post what I’ll be writing here on avr freaks forum,
but, unfortunately, I was not able to register there:
Access Denied You don't have permission to access "http://login.microchip.com/ssologin/connect/authorize?" on this server. Reference #18.21f01502.1701763696.382a727f
Ok, I will post some of my observations here.
Let me start from very simple example.
export fn main () noreturn {
const ddrb: *u8 = @ptrFromInt(0x24);
const portb: *u8 = @ptrFromInt(0x25);
const l…
But, as to a “is this language the right choice” question I would answer - yes, it is.
After all, it’s intended to be a “systems programming” language.