Compiling for Arduino Nano does not work in examples or from a fresh project
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- arduino, zig
- Bereich
- build-system, embedded-iot
Rechercherichtung
Start with the build.zig in the report, which calls MicroBuild(.{ .avr = true }) and targets mb.ports.avr.boards.arduino.nano, then reproduce the failure with the microchip/avr example. The user's src/main.zig imports the rp2xxx HAL, which looks like a mismatch with the AVR target, so check the AVR board definitions and HAL first. Done means the Nano firmware builds from both the example and a fresh project, and the ELF and UF2 outputs are produced.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
First I tried to compile the example in the microchip/avr directory, but I got these errors:
So then I looked at the "getting started" page on the microzig website to try to adapt that to the nano:
src/main.zig
const std = @import("std");
const microzig = @import("microzig");
const rp2xxx = microzig.hal;
const time = rp2xxx.time;
// Compile-time pin configuration
const pin_config = rp2xxx.pins.GlobalConfiguration{
.GPIO25 = .{
.name = "led",
.direction = .out,
},
};
const pins = pin_config.pins();
pub fn main() !void {
pin_config.apply();
while (true) {
pins.led.toggle();
time.sleep_ms(250);
}
}
build.zig
const std = @import("std");
const microzig = @import("microzig");
const MicroBuild = microzig.MicroBuild(.{
.avr = true,
});
pub fn build(b: *std.Build) void {
const mz_dep = b.dependency("microzig", .{});
const mb = MicroBuild.init(b, mz_dep) orelse return;
const firmware = mb.add_firmware(.{
.name = "blinky",
.target = mb.ports.avr.boards.arduino.nano,
.optimize = .ReleaseSmall,
.root_source_file = b.path("src/main.zig"),
});
// We call this twice to demonstrate that the default binary output for
// RP2040 is UF2, but we can also output other formats easily
mb.install_firmware(firmware, .{});
mb.install_firmware(firmware, .{ .format = .elf });
}
and i get this set of errors:
Am i missing something? The getting started example compiles for the Pico, but i cant test it cause I don't have a pico. It's when I try to do anything related to the Nano that it doesn't compile. Thanks in advance!
- Vorherrschende Sprache
- Zig
- Sterne
- 2.3k
- Forks
- 198
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 37
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ZigEmbeddedGroup/microzig
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
ZigEmbeddedGroup/microzig#1086 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 69/100
ZigEmbeddedGroup/microzig#1085 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ZigEmbeddedGroup/microzig#1061 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ZigEmbeddedGroup/microzig#1059 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
ZigEmbeddedGroup/microzig#1072 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ZigEmbeddedGroup/microzig
Ähnliche Issues
-
netbox status: backlog topic: testing type: housekeeping
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
netbox-community/netbox#23395 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
catppuccin/nix#1052 ·
-
bug misleading tooling trivial
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Docs example projects pinned to a literal library version instead of 3.*Evtl. vergeben @DaveSkender hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
facioquo/stock-indicators-dotnet#2372 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Type/Task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ballerina-platform/ballerina-library#9301 ·
Maintainer antworten meist innerhalb von 1 Tag