-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update packaging to include root package (#291)
* update packaging to include root package * remove ch32 from package test
- Loading branch information
Showing
8 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.{ | ||
.name = "core", | ||
.version = "0.0.1", | ||
.dependencies = .{}, | ||
.paths = .{ | ||
"LICENSE", | ||
"thoughts.md", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) Zig Embedded Group contributors | ||
|
||
This software is provided 'as-is', without any express or implied warranty. In | ||
no event will the authors be held liable for any damages arising from the use | ||
of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, including | ||
commercial applications, and to alter it and redistribute it freely, subject to | ||
the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not claim | ||
that you wrote the original software. If you use this software in a product, | ||
an acknowledgment in the product documentation would be appreciated but is | ||
not required. | ||
|
||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
|
||
3. This notice may not be removed or altered from any source distribution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
const std = @import("std"); | ||
const microzig = @import("microzig"); | ||
|
||
const ports: []const []const u8 = &.{ | ||
"microzig/port/raspberrypi/rp2xxx", | ||
}; | ||
const MicroBuild = microzig.MicroBuild(.{ | ||
.rp2xxx = true, | ||
.gd32 = true, | ||
.atsam = true, | ||
.avr = true, | ||
.nrf5x = true, | ||
.lpc = true, | ||
.stm32 = true, | ||
}); | ||
|
||
pub fn build(b: *std.Build) void { | ||
const optimize = b.standardOptimizeOption(.{}); | ||
const test_ports_step = b.step("run-port-tests", "Run all platform agnostic tests for Ports"); | ||
|
||
for (ports) |port| { | ||
const dep = b.dependency(port, .{ .optimize = optimize }); | ||
test_ports_step.dependOn(&dep.builder.top_level_steps.get("test").?.step); | ||
const mz_dep = b.dependency("microzig", .{}); | ||
const mb = MicroBuild.init(b, mz_dep); | ||
|
||
const examples: []const Example = &.{ | ||
.{ .target = mb.ports.rp2xxx.boards.raspberrypi.pico, .name = "rp2xxx" }, | ||
.{ .target = mb.ports.gd32.boards.sipeed.longan_nano, .name = "gd32" }, | ||
.{ .target = mb.ports.atsam.chips.atsamd51j19, .name = "atsam" }, | ||
.{ .target = mb.ports.avr.boards.arduino.nano, .name = "avr" }, | ||
.{ .target = mb.ports.nrf5x.boards.nordic.nrf52840_dongle, .name = "nrf5x" }, | ||
.{ .target = mb.ports.lpc.boards.nordic.mbed.lpc1768, .name = "lpc" }, | ||
.{ .target = mb.ports.stm32.boards.stm32f3discovery, .name = "stm32" }, | ||
}; | ||
|
||
for (examples) |example| { | ||
const firmware = mb.add_firmware(.{ | ||
.name = example.name, | ||
.target = example.target, | ||
.optimize = optimize, | ||
.root_source_file = b.path("src/empty.zig"), | ||
}); | ||
|
||
mb.install_firmware(firmware, .{}); | ||
} | ||
} | ||
|
||
const Example = struct { | ||
target: *microzig.Target, | ||
name: []const u8, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub fn main() void {} |