First build again. No verification of 'works'

wch-ch32v003
Felix "xq" Queißner 1 year ago
parent e14f0a1e53
commit 8a124a68db

1
.gitignore vendored

@ -1,3 +1,4 @@
zig-cache/
dev-scripts/
zig-out
.envrc

@ -1,8 +1,10 @@
const std = @import("std");
const microzig = @import("microzig");
const rp2040 = @import("rp2040");
const microzig_build = @import("microzig");
pub fn build(b: *std.Build) void {
const microzig = microzig_build.init(b, "microzig");
const optimize = b.standardOptimizeOption(.{});
// `addFirmware` basically works like addExecutable, but takes a
@ -12,7 +14,7 @@ pub fn build(b: *std.Build) void {
// cpu and potentially the board as well.
const firmware = microzig.addFirmware(b, .{
.name = "blinky",
.target = rp2040.boards.raspberrypi.pico,
.target = rp2040.boards.raspberry_pi.pico,
.optimize = optimize,
.source_file = .{ .path = "src/blinky.zig" },
});
@ -22,13 +24,11 @@ pub fn build(b: *std.Build) void {
// Extension of `getEmittedElf()` that will also convert the file to the given
// binary format.
_ = firmware.getEmittedBin(.uf2);
_ = firmware.getEmittedBin(null); // `null` is preferred format, in this case uf2
// `installFirmware()` is the MicroZig pendant to `Build.installArtifact()`
// and allows installing the firmware as a typical firmware file.
//
// This will also install into `$prefix/firmware` instead of `$prefix/bin`.
microzig.installFirmware(firmware, .{
.format = .uf2, // .dfu, .bin, .hex, .elf,
});
microzig.installFirmware(b, firmware, .{});
}

@ -3,12 +3,12 @@
.version = "0.1.0",
.dependencies = .{
.microzig = .{
.url = "https://github.com/ZigEmbeddedGroup/microzig/archive/f0a6aa9ce1829df91f2d7f160bbc6f5bc41a3c80.tar.gz",
.hash = "12203f8cb7803a82dff1310ab0917055c0055bc7385f1321bbaf0de998b26a00b44d",
.url = "https://github.com/ZigEmbeddedGroup/microzig/archive/44ab82cac86ab7fbd4e6718021d51a2bb8c4a42c.tar.gz",
.hash = "122039437ab5c8946e3f1f77dec17092f0c6cae9fcd830bce89f03725e75a02d101b",
},
.rp2040 = .{
.url = "https://github.com/ZigEmbeddedGroup/raspberrypi-rp2040/archive/2a0c0ff2814a716a163822211c2686d84801a97a.tar.gz",
.hash = "12208735720ddf172a28943f1b17375f7b16370140be9c458f1482076025e465c3b0",
.url = "https://github.com/ZigEmbeddedGroup/raspberrypi-rp2040/archive/b9c361be68215d48657ec3684c8a30ebbc74efd5.tar.gz",
.hash = "1220aa6da071763468a358e82af753db23513e12120cf749bdb8bb4f8ea2a8b6da7b",
},
},
}

Loading…
Cancel
Save