Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RP2040] Regression—blinky doesn't blink with latest microzig #389

Closed
MatthiasPortzel opened this issue Feb 17, 2025 · 4 comments
Closed

Comments

@MatthiasPortzel
Copy link
Contributor

Issue

I am no longer able to run programs on my Pico or RP2040 based board with current versions of Microzig. I've reproduced with the blinky example program included in this repo. A bisect points to #373 (5385b0e) as the first "bad" commit. I don't have more time to investigate this issue at present and so will continue using the last working version of microzig (520f370).

Reproduction

git clone https://github.com/ZigEmbeddedGroup/microzig.git
cd microzig
git switch --detach 5385b0e
cd examples/raspberrypi/rp2xxx
zig build

Drag zig-out/firmware/pico_blinky.uf2 onto a Pi Pico

Expected result: On-board LED flashes
Actual result: On-board LED does not turn on

Zig version: 0.13.0

Let me know if anyone is unable to reproduce with a Pico 1 and this example.

@MatthiasPortzel
Copy link
Contributor Author

CC @marnix

@Grazfather
Copy link
Contributor

I can reproduce, but not if I do zig build --release=fast. Does this also get around the issue?

@marnix
Copy link
Contributor

marnix commented Feb 22, 2025

@Grazfather To me it looks like your #394 is the correct fix for this.

Somehow Zig (0.13.0 and current 0.14-pre) requires an explicit .ARM.extab section in a .ld linker script, at least for thumb and/or ARM. But if one doesn't, the problem is only hit if code is actually generated for that section.

And my #373 (5385b0e) did trigger all MicroZig code to start using that section, at least in debug builds, and sometimes also even in --release=fast builds.

@MatthiasPortzel
Copy link
Contributor Author

MatthiasPortzel commented Feb 23, 2025

#394 does indeed fix this.

I also wanted to mention, with that PR merged into the zig-master branch, I’m able to run my program in current Zig 0.14-pre. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants