In the code generated for nrf52840 structs in array have wrong size. For example, USBD.EPIN[n]:
/// Unspecified
/// offset: 0x600
EPIN: [8]extern struct {
/// Description cluster: Data pointer
/// offset: 0x00
PTR: mmio.Mmio(packed struct(u32) {
/// Data pointer
PTR: u32 = 0x0,
}),
/// Description cluster: Maximum number of bytes to transfer
/// offset: 0x04
MAXCNT: mmio.Mmio(packed struct(u32) {
/// Maximum number of bytes to transfer
MAXCNT: u7 = 0x0,
padding: u25 = 0,
}),
/// Description cluster: Number of bytes transferred in the last transaction
/// offset: 0x08
AMOUNT: mmio.Mmio(packed struct(u32) {
/// Number of bytes transferred in the last transaction
AMOUNT: u7 = 0x0,
padding: u25 = 0,
}),
},
Size of the struct is 12 bytes and no padding, when it should have 20 bytes stride:
<cluster>
<dim>8</dim>
<dimIncrement>0x014</dimIncrement>
<name>EPIN[%s]</name>
In the code generated for nrf52840 structs in array have wrong size. For example, USBD.EPIN[n]:
Size of the struct is 12 bytes and no padding, when it should have 20 bytes stride: