I have this zig 0.9.0 build file which does not work with 0.11.0. How can I migrate it to the 0.11.0?
const Builder = @import("std").build.Builder;
const builtin = @import("builtin");
const std = @import("std");
pub fn build(b: *Builder) void {
// NOTE: STM32F407VG
// NOTE: ZIG has definitions for .thumb, .freestanding, .eabihf...
const target = .{
.cpu_arch = .thumb,
.cpu_model = .{ .explicit = &std.Target.arm.cpu.cortex_m4 },
.os_tag = .freestanding,
.abi = .eabihf,
};
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const elf = b.addExecutable("zig-stm32-blink.elf", "src/startup.zig");
elf.setTarget(target);
elf.setBuildMode(mode);
const vector_obj = b.addObject("vector", "src/vector.zig");
vector_obj.setTarget(target);
vector_obj.setBuildMode(mode);
elf.addObject(vector_obj);
elf.setLinkerScriptPath(.{ .path = "src/linker.ld" });
const bin = b.addInstallRaw(elf, "zig-stm32-blink.bin", .{});
const bin_step = b.step("bin", "Generate binary file to be flashed");
bin_step.dependOn(&bin.step);
const flash_cmd = b.addSystemCommand(&[_][]const u8{
"st-flash",
"write",
b.getInstallPath(bin.dest_dir, bin.dest_filename),
"0x8000000",
});
flash_cmd.step.dependOn(&bin.step);
const flash_step = b.step("flash", "Flash and run the app on your STM32F4Discovery");
flash_step.dependOn(&flash_cmd.step);
b.default_step.dependOn(&elf.step);
b.installArtifact(elf);
}