You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use microzig, and I'm also very new to zig and the instructions in README.adoc assume that you have a lot of knowledge about zig and how microzig works.
I attempted to use the sample and despite inferring how to make it work, even with modifications, it fails to compile.
run: zig init-exe
undocumented commands (implied via the vague statement: add the hardware support package as a submodule, this is also the "simple way" as zig init-exe doesn't do a git init, so can't do some git submodule command to add it):
mkdir deps
cd deps
git clone --recursive https://github.com/ZigEmbeddedGroup/microchip-atmega
cd ..
replace build.zig (undocumented what file, and need to replace hardware_support_package with microchip-atmega and replace root_source_file with source_file) w/:
const std = @import("std");
const atmega = @import("deps/microchip-atmega/build.zig");
// the hardware support package should have microzig as a dependency
const microzig = @import("deps/microchip-atmega/deps/microzig/build.zig");
pub fn build(b: *std.build.Builder) !void {
const optimize = b.standardOptimizeOption(.{});
var exe = microzig.addEmbeddedExecutable( b, .{
.name = "my-executable",
.source_file = .{
.path = "src/main.zig",
},
.backing = .{
.board = atmega.boards.arduino_nano,
// instead of a board, you can use the raw chip as well
// .chip = atmega.chips.atmega328p,
},
.optimize = optimize,
});
exe.install();
}
replace src/main.zig with the next block (undocumented what file to put it in).
I'm attempting to use microzig, and I'm also very new to zig and the instructions in
README.adoc
assume that you have a lot of knowledge about zig and how microzig works.I attempted to use the sample and despite inferring how to make it work, even with modifications, it fails to compile.
run:
zig init-exe
undocumented commands (implied via the vague statement:
add the hardware support package as a submodule
, this is also the "simple way" aszig init-exe
doesn't do agit init
, so can't do somegit submodule
command to add it):replace
build.zig
(undocumented what file, and need to replacehardware_support_package
withmicrochip-atmega
and replaceroot_source_file
withsource_file
) w/:replace
src/main.zig
with the next block (undocumented what file to put it in).run
zig build
and see the following failure:environment: MacOS Ventura 13.2
zig version:
0.11.0-dev.2249+dcdb87836
I'm unsure what to do now to make the necessary executable.
The text was updated successfully, but these errors were encountered: