I am trying to initialize vector_table for AVR. For that purpose the next code is used:
export const vector_table linksection(".vectors") = blk: {
// do some checks
var asm_str: []const u8 = "jmp _start\n";
// do some more stuff
asm_str = asm_str ++ new_insn ++ "\n";
break blk: asm (asm_str);
}
Zig infers the type of break expression to void. Compilation fails with:
src/start.zig:7:1: error: unable to export type 'void'
So how it should be done it the right way?