Support for Multiple Peripheral's Address Blocks #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the official CMSIS-SVD XML file format description this is possible to have multiple
AddressBlock
in the peripheral description. This seem logical since a peripheral can have multiple reserved blocks localized at different offsets in the peripheral address range.(https://www.keil.com/pack/doc/CMSIS/SVD/html/elem_peripherals.html#elem_addressBlock)
For example, the Thoshiba/M367.svd description file contains several PL011 peripherals which contains multiple
AddressBlock
.Thoshiba/M367.svd (https://github.com/posborne/cmsis-svd/blob/master/data/Toshiba/M367.svd#L2859) extract for UART4:
Here an extract of the Summary of registers of the PL011 documention (ARM DDI 0183G https://documentation-service.arm.com/static/5e8e36c2fd977155116a90b5) corresponding to the registers of the UARTx peripherals of the Thoshiba/M367.svd.
The patch fix the parser and the model to have a new field
address_blocks
in theSVDPeripheral
structure. The patch remove theaddress_block
field. Exemple with the UART4 (PL011) peripheral of the Thoshiba/M367.svd.The tests and test fixture (MKL25Z4.json) are fixed and all the tests passe with success.