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

Compile error on Raspberry Pi #150

Open
Ku-Be opened this issue Oct 3, 2023 · 1 comment
Open

Compile error on Raspberry Pi #150

Ku-Be opened this issue Oct 3, 2023 · 1 comment

Comments

@Ku-Be
Copy link

Ku-Be commented Oct 3, 2023

Building a microzig project on a Raspberry Pi 2 fails with this error:

/home/pi/.cache/zig/p/1220af58bdaa721b8189f3a7adfda660517dd354463463388e96d69fe4ceccf80b92/build.zig:161:55: error: expected type 'usize', found 'u64'
                .elf, .bin, .hex, .dfu, .esp => |val| {
                                                      ^
/home/pi/.cache/zig/p/1220af58bdaa721b8189f3a7adfda660517dd354463463388e96d69fe4ceccf80b92/build.zig:161:55: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values

What could be the reason for this? Maybe because the Pi's CPU is 32 bit, and u64 is hardcoded somewhere?

@ikskuh
Copy link
Contributor

ikskuh commented Oct 4, 2023

The reason here is the invalid use of usize instead of u64 for a platform independent size

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

2 participants