Compiling for Arduino Nano does not work in examples or from a fresh project
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 22/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- arduino, zig
- Domaine
- build-system, embedded-iot
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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!
- Langage dominant
- Zig
- Étoiles
- 2.3k
- Forks
- 198
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 37
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ZigEmbeddedGroup/microzig
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
ZigEmbeddedGroup/microzig#1086 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 69/100
ZigEmbeddedGroup/microzig#1085 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
ZigEmbeddedGroup/microzig#1061 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
ZigEmbeddedGroup/microzig#1059 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
ZigEmbeddedGroup/microzig#1072 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ZigEmbeddedGroup/microzig
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
catppuccin/nix#1052 ·
-
bug misleading tooling trivial
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Docs example projects pinned to a literal library version instead of 3.*Peut-être pris @DaveSkender l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
facioquo/stock-indicators-dotnet#2372 ·
Les mainteneurs répondent en général sous 1 jour
-
Type/Task
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ballerina-platform/ballerina-library#9301 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
oxidecomputer/humility#737 ·