fix build pkg (#14)
This commit is contained in:
parent
ae3e3e39d1
commit
c2edba7349
15
README.md
15
README.md
|
@ -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…
Reference in New Issue
Block a user