4 ms·
Nice. So how many manufacturers create those XML files which describe all the registers? Is that common in the Arduino community, for example?
by Animats 9y ago
Nice. So how many manufacturers create those XML files which describe all the registers? Is that common in the Arduino community, for example?
- dbcurtis 9y agoAFAIK SVD files are an ARM thing.
- timerol 9y agoYeah, they are ARM specific, at least according to https://siliconlabs.github.io/Gecko_SDK_Doc/CMSIS/SVD/html/index.html https://siliconlabs.github.io/Gecko_SDK_Doc/CMSIS/SVD/html/i.... "The CMSIS System View Description format(CMSIS-SVD) formalizes the description of the system contained in ARM Cortex-M processor-based microcontrollers, in particular, the memory mapped registers of peripherals."
- twic 9y agoIs it that it would be impossible to write an SVD file for another architecture, or just that vendors don't do it? If it's possible, and this tooling makes SVDs a really powerful tool for porting, then perhaps it would be easier for the community to write SVDs for non-ARM chips than code.
- jdub 9y agoDeviceTree is the standard / tooling you'll see outside ARM micro-controllers. Started on Power, then found a place in Linux's ARM tree, and is now spreading further.
- kbumsik 9y agoProbably, but companies wouldn’t do it since they have their own tooling. And I don’t think the community would like to write it neither. Look at a SVD file for a single MCU. https://github.com/posborne/cmsis-svd/blob/master/data/STMicro/STM32F100xx.svd https://github.com/posborne/cmsis-svd/blob/master/data/STMic... It’s a more than 10k loc XML file. It is too much effort for the community to do that and verify it. And as an embedded system engineer, I wouldn’t trust the community-driven register definition because even vendors have some bug on it and it is almost impossible for the community to write a better register definitions than the vendors themselves. This is a vendors’ job, not the community's.
- dbrgn 9y agoUnfortunately many manufacturers create buggy and/or incomplete SVD files (e.g. NXP LPC11Uxx) that need to be fixed by hand :(
- yazaddaruvala 9y agoBut now that you can vend them through Cargo, only one person needs to find the bug and fix it! :)
- rnestler 9y agoMy hope is, that if enough people start to rely on the svd files and report errors in them, venders will start to ship them with higher quality!
- ekiwi 9y agoFor the xpcc.io library, that I was involved with when I was in college, we ended up defining our own XML format and write importers for the custom formats that ST uses. For the LPC controllers from NXP we had to transcribe the information manually from the data sheet (our attempts to automatically parse the pdfs and extract the info never worked out). Checkout the latest version (now called modm). A description of our device file format can be found here: https://github.com/modm-io/modm/blob/develop/devices/Readme.md https://github.com/modm-io/modm/blob/develop/devices/Readme.... If you are interested in the data for STMs, checkout: https://github.com/modm-io/modm-devices/tree/develop/devices/stm32 https://github.com/modm-io/modm-devices/tree/develop/devices...
- wyldfire 9y agoRelated note: the author created a rust CMSIS-SVD file parser [1]. [1] https://github.com/japaric/svd https://github.com/japaric/svd