ZigEmbeddedGroup / microzig

Unified abstraction layer and HAL for several microcontrollers
zlib License
1.22k stars 99 forks source link

Compile error on Raspberry Pi #150

Open Ku-Be opened 1 year ago

Ku-Be commented 1 year ago

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 commented 1 year ago

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