rp2xxx fixes#959
Conversation
mattnite
left a comment
There was a problem hiding this comment.
These then I'll force myself to read about bootmeta before merging.
| const arch = @import("compatibility.zig").arch; | ||
|
|
||
| pub const image_def_block = if (microzig.config.ram_image and arch == .arm) Block(extern struct { | ||
| pub const image_def_block = if (microzig.config.ram_image and arch == .arm) Block(packed struct { |
There was a problem hiding this comment.
Please include the backing integer for the packed struct, that's required upstream
There was a problem hiding this comment.
Do you mean that all packed structs will require the size? I'd rather not put it here, since it's derived from the size of its fields, and I set it there. If we were to change this, we'd have to manually add up the sizes of all of fields.
| }, | ||
| .link = microzig.options.hal.bootmeta.next_block, | ||
| } else Block(extern struct { | ||
| } else Block(packed struct { |
| return packed struct(u128) { | ||
| header: packed struct(u32) { |
There was a problem hiding this comment.
What is the reason for replacing all externs with packed (just wondering)?
There was a problem hiding this comment.
as I understand, packed structs are 'now' the correct way to bit pack. And by using them, we can say how large they are and catch in the compile if the size changes. I accidentally changed the size of a field and it bit me :)
Itemtypes so that we don't accidentally break them.