Using comptime function that require option will end in declaration loop
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- embedded-iot
調査の方向性
The payload names no file paths. Start from the DMA function in the snippet and from where microzig_options redefines std_option, since the declaration loop comes from that shadowing. Reproduce by putting a DMA_Handler that calls std.fmt.comptimePrint inside microzig_options. Done means that build compiles without the declaration loop error, or the issue records why the shadowed std_option cannot be avoided.
索引モデルが issue の本文から書いたものです。
説明
Microzig redefine the std_option with specific entry for embedded device. Like interrupt or chip/hal config.
By doing so it allow users to fine tune the MCU. This have some limitation on how microzig_options can be initialized.
std_option is being shadow and whenever attribute inside the microzig_options need std_option it will trigger a declaration loop error.
This happen for example when you want to format string:
pub fn DMA(index: u32, channel: u32) type {
// /!\ This line will trigger the declaration loop if you include the DMA_Handler
// inside the microzig_option since this comptimePrint needs std_option.
const interrupt_name = std.fmt.comptimePrint("DMA{}_Channel{}", .{ index, ch});
const interrupt_index = blk: for (microzig.chip.interrupts) |*interrupt| {
if (std.mem.eql(u8, interrupt_name, interrupt.name)) {
break :blk interrupt.index;
}
} else @panic("Interrupt index not found");
return struct {
var channel: ?Channel = null;
pub fn DMA_Handler() callconv(.c) void {
const event = read_events();
clear_events(event);
if (channel) |*init_chan| {
init_chan.deliver_event(event);
}
}
...
}
...
}
- 主要言語
- Zig
- スター
- 2.3k
- フォーク
- 198
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 37
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ZigEmbeddedGroup/microzig のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ZigEmbeddedGroup/microzig#1086 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 69/100
ZigEmbeddedGroup/microzig#1085 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ZigEmbeddedGroup/microzig#1061 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ZigEmbeddedGroup/microzig#1059 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
regz: AVR peripherals generated at address 0 when the register-group name matches the module (ATDF)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ZigEmbeddedGroup/microzig#1072 ·
メンテナーはふだん 1 日以内に返信
ZigEmbeddedGroup/microzig の issue をすべて見る
似ている issue
-
[BUG] OTA Requestor accepts reserved provider endpoint 0xFFFF対応中かも @Chapoly1305 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
project-chip/connectedhomeip#74742 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
Xinyuan-LilyGO/T-Display-S3#352 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
lsongdev/node-bluetooth#62 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
`espup update` fails with `File exists (os error 17)` when `~/.espup/esp-clang` is a dangling symlink対応中かも @SergioGasquez が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100