Update microzig (#3)

* update microzig

* update to new api

---------

Co-authored-by: mattnite <mattnite@users.noreply.github.com>
wch-ch32v003
Matt Knight 2 years ago committed by GitHub
parent f625be1dff
commit 92d7d14d12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@ const std = @import("std");
const microzig = @import("zpm.zig").sdks.microzig; const microzig = @import("zpm.zig").sdks.microzig;
pub fn build(b: *std.build.Builder) void { pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions(); const optimize = b.standardOptimizeOption(.{});
const esp32_c3_cpu = microzig.Cpu{ const esp32_c3_cpu = microzig.Cpu{
.name = "Espressif RISC-V", .name = "Espressif RISC-V",
@ -21,7 +21,13 @@ pub fn build(b: *std.build.Builder) void {
const esp32_c3 = microzig.Chip{ const esp32_c3 = microzig.Chip{
.name = "ESP32 C3", .name = "ESP32 C3",
.path = "src/package/esp32-c3.zig", .source = .{
.path = "src/package/esp32-c3.zig",
},
.hal = .{
.source = "src/hal/root.zig",
},
.cpu = esp32_c3_cpu, .cpu = esp32_c3_cpu,
.memory_regions = &.{ .memory_regions = &.{
.{ .kind = .flash, .offset = 0x4200_0000, .length = 0x0080_0000 }, // external memory, ibus .{ .kind = .flash, .offset = 0x4200_0000, .length = 0x0080_0000 }, // external memory, ibus
@ -29,13 +35,14 @@ pub fn build(b: *std.build.Builder) void {
}, },
}; };
var exe = microzig.addEmbeddedExecutable( var exe = microzig.addEmbeddedExecutable(b, .{
b, .name = "esp-bringup",
"esp-bringup", .source_file = .{
"src/example/blinky.zig", .path = "src/example/blinky.zig",
.{ .chip = esp32_c3 }, },
.{ .hal_package_path = .{ .path = "src/hal/root.zig" } }, .backing = .{ .chip = esp32_c3 },
); .optimize = optimize,
});
exe.setBuildMode(mode); exe.setBuildMode(mode);
exe.install(); exe.install();

2
deps/microzig vendored

@ -1 +1 @@
Subproject commit 831cfff35c259d68ee023ba7bb94dae8b7b94bec Subproject commit b6fc3abbf7a91cb0cdafc7843ac7e6c26042ff84
Loading…
Cancel
Save