STM8_headers icon indicating copy to clipboard operation
STM8_headers copied to clipboard

Document relationship between svd xml and h

Open spth opened this issue 3 years ago • 3 comments

This repository contains .svd, .sxml and .h files.

Over at SourceForge, there is a ticket for adding the headers to SDCC: https://sourceforge.net/p/sdcc/patches/367/ If SDCC would add the h files, would those be the preferred form for modification?

What is the relation between the svd, xml and h files? Which are generated from which using which tool? Which is the preferred form for making modifications?

spth avatar Apr 11 '21 09:04 spth

After careful consideration I have decided to re-structure the XML and the derived .h and .SVD files.

Currently the creation of the XMLs is quite messy and takes a multitude of (badly documented) input formats. Correcting them in case of errors, like the one described in issue #6, is a pain in the backside, as doing it manually is virtually impossible for the 178 individual files. Therefore I now plan to change this to a more module based and more manual approach.

As a positive side effect I can make the register names more consistent. By the automatic generation I found this is not always guaranteed, but with a manual approach I can make sure of this.

Another positive side effect will be that I plan to improve the documentation of the XML, header and SVD creation and input files (all in Python). And these I plan to publish on Github for review and improvement. The current code is just too messy!

Please bear with me that this will take some time, as I also will need to carefully check the consistency across DS, UM, SPL and IAR. Yippie... ;-(

gicking avatar Apr 17 '21 05:04 gicking

Appreciate the effort , and look forward to seeing the results.

prosper00 avatar Apr 17 '21 15:04 prosper00

I can promise one thing: progress will be slow... ;-)

gicking avatar Apr 23 '21 10:04 gicking