Adds more architectures

wch-ch32v003
Felix "xq" Queißner 1 year ago
parent 991d757eff
commit ca17420a81

@ -4,6 +4,8 @@ const stm32 = @import("stm32");
const lpc = @import("lpc"); const lpc = @import("lpc");
const gd32 = @import("gd32"); const gd32 = @import("gd32");
const nrf5x = @import("nrf5x"); const nrf5x = @import("nrf5x");
const esp = @import("esp");
const atmega = @import("atmega");
pub fn build(b: *std.Build) void { pub fn build(b: *std.Build) void {
const microzig = @import("microzig").init(b, "microzig"); const microzig = @import("microzig").init(b, "microzig");
@ -33,7 +35,6 @@ pub fn build(b: *std.Build) void {
.{ .name = "stm32f429idiscovery", .target = stm32.boards.stm32f429idiscovery }, .{ .name = "stm32f429idiscovery", .target = stm32.boards.stm32f429idiscovery },
// NXP LPC // NXP LPC
// TODO: Add checksum postprocessing
.{ .name = "lpc176x5x", .target = lpc.chips.lpc176x5x }, .{ .name = "lpc176x5x", .target = lpc.chips.lpc176x5x },
.{ .name = "mbed-lpc1768", .target = lpc.boards.mbed.lpc1768 }, .{ .name = "mbed-lpc1768", .target = lpc.boards.mbed.lpc1768 },
@ -47,12 +48,15 @@ pub fn build(b: *std.Build) void {
.{ .name = "nrf52840", .target = nrf5x.chips.nrf52840 }, .{ .name = "nrf52840", .target = nrf5x.chips.nrf52840 },
.{ .name = "nrf52840-dongle", .target = nrf5x.boards.nordic.nRF52840_Dongle }, // TODO: Add support for DFU files! .{ .name = "nrf52840-dongle", .target = nrf5x.boards.nordic.nRF52840_Dongle }, // TODO: Add support for DFU files!
// Espressif ESP // RISC-V Espressif ESP
// .{ .name = "nrf52832", .target = nrf5x.chips.nrf52832 }, .{ .name = "esp32-c3", .target = esp.chips.esp32_c3 }, // TODO: Add support for Espressif Update Binaries
// TODO: Add support for Espressif Update Binaries
// Microchip ATmega // Microchip ATmega
// TODO: Fix compiler bugs // TODO: Fix compiler bugs
// - https://github.com/ziglang/zig/issues/17219
// .{ .name = "atmega328p", .target = atmega.chips.atmega328p },
// .{ .name = "arduino-nano", .target = atmega.boards.arduino.nano },
// .{ .name = "arduino-uno-rev3", .target = atmega.boards.arduino.uno_rev3 },
}; };
for (available_targets) |dest| { for (available_targets) |dest| {
@ -73,5 +77,8 @@ pub fn build(b: *std.Build) void {
// //
// This will also install into `$prefix/firmware` instead of `$prefix/bin`. // This will also install into `$prefix/firmware` instead of `$prefix/bin`.
microzig.installFirmware(b, firmware, .{}); microzig.installFirmware(b, firmware, .{});
// For debugging, we also always install the firmware as an ELF file
microzig.installFirmware(b, firmware, .{ .format = .elf });
} }
} }

@ -15,8 +15,8 @@
.hash = "12208cab5f60ef97cac4165ad694f3ba0c7b28f279538c1539b74f7c152f34fe306d", .hash = "12208cab5f60ef97cac4165ad694f3ba0c7b28f279538c1539b74f7c152f34fe306d",
}, },
.lpc = .{ .lpc = .{
.url = "https://github.com/ZigEmbeddedGroup/nxp-lpc/archive/be4280a8b55690e8446fd4c3186dcd6673118cd3.tar.gz", .url = "https://github.com/ZigEmbeddedGroup/nxp-lpc/archive/130a1316c0892415e7da958a5e9548ed87bba54d.tar.gz",
.hash = "1220891bc5fa43b30cd024a628f8915f54691e5664d2a34e6653bf92722b222b7c7e", .hash = "1220165879f85a1d51656d35b3963a95f3585dc665fc7414f76aa6aad4e6635536cf",
}, },
.gd32 = .{ .gd32 = .{
.url = "https://github.com/ZigEmbeddedGroup/gigadevice-gd32/archive/9324753cc3b8e7afe83fcda085bcfe76681a3be3.tar.gz", .url = "https://github.com/ZigEmbeddedGroup/gigadevice-gd32/archive/9324753cc3b8e7afe83fcda085bcfe76681a3be3.tar.gz",
@ -27,12 +27,12 @@
.hash = "1220980da06f9634dcff06afefa7aa111bd030018fea49f79e86657dab69621e1d08", .hash = "1220980da06f9634dcff06afefa7aa111bd030018fea49f79e86657dab69621e1d08",
}, },
.esp = .{ .esp = .{
.url = "https://github.com/ZigEmbeddedGroup/espressif-esp/archive/f7e47d07996565036501f55ed781a5f6e786b2f7.tar.gz", .url = "https://github.com/ZigEmbeddedGroup/espressif-esp/archive/59b8ca028915c0d6224ec88dbf4db19afbb559c0.tar.gz",
.hash = "12209b0365f56df4ce83b1300da86bef605bd299e94b87f373571351f71fa2ccd461", .hash = "1220f6e5f22416fdc63442cd8869fcaa35f9abf30d878ea3d80073176677dc6f8a65",
}, },
.atmega = .{ .atmega = .{
.url = "https://github.com/ZigEmbeddedGroup/microchip-atmega/archive/46dfd08ad13e0a9a84351cfd595b1e6e341d4839.tar.gz", .url = "https://github.com/ZigEmbeddedGroup/microchip-atmega/archive/feefcb87a63c0aae31afb783d4e388e90c4d922f.tar.gz",
.hash = "1220b2df269bf997b77bebcebea63a8e39aea354a7075cf99878423e304394bc28eb", .hash = "1220048dc5d22729ee119a496f8b8ca3556838af1f3bd32ce6acd5f76480ec942965",
}, },
}, },
} }

@ -3,6 +3,7 @@ pkgs.mkShell {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.zig_0_11_0 pkgs.zig_0_11_0
pkgs.picotool pkgs.picotool
pkgs.llvmPackages_16.bintools
]; ];
buildInputs = []; buildInputs = [];
} }

Loading…
Cancel
Save