Skip to content

Commit 4180534

Browse files
authored
Use root build for chips, hals, and boards (#162)
The reason behind this change is that I'm unable to specify a chip, hal, or board definition in a local project and that's a pattern that we explicitly want to handle. This means packages must provide an absolute path to their files, which is already done throughout our small ecosystem. In the future I'd like to change the API so package creators or those vendoring everything locally give a relative path.
1 parent 57e4379 commit 4180534

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎build.zig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,15 @@ pub fn addFirmware(
495495
};
496496
errdefer fw.output_files.deinit();
497497

498-
fw.modules.chip = micro_build.createModule(.{
498+
fw.modules.chip = mz.b.createModule(.{
499499
.source_file = chip_source,
500500
.dependencies = &.{
501501
.{ .name = "microzig", .module = fw.modules.microzig },
502502
},
503503
});
504504
fw.modules.microzig.dependencies.put("chip", fw.modules.chip) catch @panic("out of memory");
505505

506-
fw.modules.cpu = micro_build.createModule(.{
506+
fw.modules.cpu = mz.b.createModule(.{
507507
.source_file = cpu.source_file,
508508
.dependencies = &.{
509509
.{ .name = "microzig", .module = fw.modules.microzig },
@@ -512,7 +512,7 @@ pub fn addFirmware(
512512
fw.modules.microzig.dependencies.put("cpu", fw.modules.cpu) catch @panic("out of memory");
513513

514514
if (maybe_hal) |hal| {
515-
fw.modules.hal = micro_build.createModule(.{
515+
fw.modules.hal = mz.b.createModule(.{
516516
.source_file = hal.source_file,
517517
.dependencies = &.{
518518
.{ .name = "microzig", .module = fw.modules.microzig },
@@ -522,7 +522,7 @@ pub fn addFirmware(
522522
}
523523

524524
if (maybe_board) |brd| {
525-
fw.modules.board = micro_build.createModule(.{
525+
fw.modules.board = mz.b.createModule(.{
526526
.source_file = brd.source_file,
527527
.dependencies = &.{
528528
.{ .name = "microzig", .module = fw.modules.microzig },

0 commit comments

Comments
 (0)