sample code:
const microzig = @import("microzig");
const hal = microzig.hal;
pub fn main() !void {
hal.parse_pin("PG13");
}
sample build (adapted from the getting started guide):
const std = @import("std");
const microzig = @import("microzig");
const MicroBuild = microzig.MicroBuild(.{
.stm32 = true,
});
pub fn build(b: *std.Build) void {
const mz_dep = b.dependency("microzig", .{});
const mb = MicroBuild.init(b, mz_dep) orelse return;
const firmware = mb.add_firmware(.{
.name = "blinky",
.target = mb.ports.stm32.boards.stm32f429idiscovery,
.optimize = .ReleaseSmall,
.root_source_file = b.path("src/main.zig"),
});
// We call this twice to demonstrate that the default binary output for
// RP2040 is UF2, but we can also output other formats easily
mb.install_firmware(firmware, .{ });
mb.install_firmware(firmware, .{ .format = .elf });
}
Expected output: A working program that does nothing.
Output:
src/main.zig:6:8: error: type 'void' has no members
hal.parse_pin("PG13");
~~~^~~~~~~~~~
Looking at https://github.com/ZigEmbeddedGroup/microzig/blob/48582bf8be10d024466a97a4dfa28470d5ebee14/port/stmicro/stm32/src/hals/STM32F429.zig it looks like hal should be filled with something, at least more than void. Am I doing something wrong? Is there a missing step that needs to be done to generate the hal?
sample code:
sample build (adapted from the getting started guide):
Expected output: A working program that does nothing.
Output:
Looking at https://github.com/ZigEmbeddedGroup/microzig/blob/48582bf8be10d024466a97a4dfa28470d5ebee14/port/stmicro/stm32/src/hals/STM32F429.zig it looks like hal should be filled with something, at least more than void. Am I doing something wrong? Is there a missing step that needs to be done to generate the hal?