Better support for creating user board targets
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- build-system, embedded-iot
Línea de trabajo
The payload centres on the custom board setup in build.zig, which calls mb.ports.rp2xxx.chips.rp2040.derive with pico_board.imports, and on boards/xiao_rp2040.zig, which imports shared/rp2040_bootrom.zig. Start by reading how the pico board's bootrom import is exposed through MicroBuild, then decide how a user board could reuse the generated bootrom without copying the file. Done means a design decision on the API, which the thread has not yet reached.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When attempting to create a custom, project-specific board target for the XIAO RP2040 I found that it was very difficult to reuse parts from predefined boards that use the RP2040 chip. More specifically, it required a very roundabout way to setup the bootloader.
build.zig:
const std = @import("std");
const microzig = @import("microzig");
const MicroBuild = microzig.MicroBuild(.{
.rp2xxx = true,
});
pub fn build(b: *std.Build) void {
const mz_dep = b.dependency("microzig", .{});
const mb = MicroBuild.init(b, mz_dep) orelse return;
const pico_board = mb.ports.rp2xxx.boards.raspberrypi.pico.board orelse return;
const target = mb.ports.rp2xxx.chips.rp2040.derive(.{
.board = .{
.name = "XIAO RP2040",
.root_source_file = b.path("boards/xiao_rp2040.zig"),
.imports = pico_board.imports,
},
});
const firmware = mb.add_firmware(.{
.name = "main",
.target = target,
.optimize = .ReleaseSmall,
.root_source_file = b.path("src/main.zig"),
});
mb.install_firmware(firmware, .{});
}
boards/xiao_rp2040.zig:
const microzig = @import("microzig");
const hal = microzig.hal;
pub const xosc_freq = 12_000_000;
pub const bootrom = @import("shared/rp2040_bootrom.zig");
comptime {
_ = bootrom;
}
pub const pin_config = hal.pins.GlobalConfiguration{
.GPIO12 = .{ .name = "rgb_led", .direction = .out },
.GPIO17 = .{ .name = "user_led_r", .direction = .out },
.GPIO16 = .{ .name = "user_led_g", .direction = .out },
.GPIO25 = .{ .name = "user_led_b", .direction = .out },
};
I find I'm having to reference the generated bootloader for rp2040 boards though other boards (here the rp pico) and copy over the rp2040_bootrom.zig to my project for it to compile, which feels convoluted. Is it possible to streamline this process by, for example, exposing the bootloader generation to the user?
- Lenguaje dominante
- Zig
- Estrellas
- 2.3k
- Forks
- 198
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 37
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ZigEmbeddedGroup/microzig
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
ZigEmbeddedGroup/microzig#1086 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 69/100
ZigEmbeddedGroup/microzig#1085 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ZigEmbeddedGroup/microzig#1061 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ZigEmbeddedGroup/microzig#1059 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
ZigEmbeddedGroup/microzig#1072 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ZigEmbeddedGroup/microzig
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
agent:blocked agent:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
turbot/guardrails-fn#46 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudnative-pg/charts#1057 ·
Los mantenedores suelen responder en 1 día
-
[Bazel CI] ERROR: Bazel Examples (Android Firebase Cloud Messaging) fails on macOS: no such target '@@androidsdk//:aapt2_binary'Posiblemente ocupada @deepalak56 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bazelbuild/examples#715 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100