fix build pkg (#14)

wch-ch32v003
Matt Knight 1 year ago committed by Matt Knight
parent 5876517127
commit 9ef67246e0

@ -8,6 +8,21 @@ See https://github.com/microsoft/uf2#file-containers for how we're going to embe
For use in a build.zig:
```zig
const uf2 = @import("uf2");
pub fn build(b: *Build) void {
// ...
const uf2_dep = b.dependency("uf2", .{});
const uf2_file = uf2.from_elf(uf2_dep, exe, .{ .family_id = .RP2040 });
_ = b.addInstallFile(uf2_file, "bin/test.uf2");
}
```
# Manually Executing elf2uf2
```zig
pub fn build(b: *Build) void {
// ...

@ -5,7 +5,7 @@ const FileSource = std.Build.FileSource;
const uf2 = @import("src/uf2.zig");
pub fn from_elf(dep: Dependency, exe: CompileStep, opts: uf2.Options) FileSource {
pub fn from_elf(dep: *Dependency, exe: *CompileStep, opts: uf2.Options) FileSource {
std.debug.assert(!opts.bundle_source); // TODO: bundle source in UF2 File
const b = dep.builder;
const elf2uf2 = dep.artifact("elf2uf2");

Loading…
Cancel
Save