gicking / STM8_headers

Device headers and examples for STM8 microcontrollers
MIT License
41 stars 10 forks source link

Document relationship between svd xml and h #8

Open spth opened 3 years ago

spth commented 3 years ago

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?

gicking commented 3 years ago

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... ;-(

prosper00 commented 3 years ago

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

gicking commented 3 years ago

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