You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The structure of the register clusters are static, and it looks like the value for those registers is likely to be static per actual implementation.
Is there a way to define these type of registers in SVD?
Something like leaving the addressOffset empty, and requiring the generated code to supply the offset as a parameter?
Another alternative I guess would be to run code on the board to query the values of the relevant registers, and use the result in the SVD per-implementation.
It may just be that higher-level abstractions (like actual drivers or HALs) are a better place to handle register definitions like those above.
The text was updated successfully, but these errors were encountered:
In some peripherals, a register offset is defined by reading the value of another register at runtime.
For example, the USB XHCI
op
andrun
registers:op
: https://elixir.bootlin.com/linux/latest/source/drivers/usb/host/xhci.c#L5221run
: https://elixir.bootlin.com/linux/latest/source/drivers/usb/host/xhci.c#L5223The structure of the register clusters are static, and it looks like the value for those registers is likely to be static per actual implementation.
Is there a way to define these type of registers in SVD?
Something like leaving the
addressOffset
empty, and requiring the generated code to supply the offset as a parameter?Another alternative I guess would be to run code on the board to query the values of the relevant registers, and use the result in the SVD per-implementation.
It may just be that higher-level abstractions (like actual drivers or HALs) are a better place to handle register definitions like those above.
The text was updated successfully, but these errors were encountered: