xml include
displays special function Registers (SFRs) while debugging
Status: Beta
Brought to you by:
ravenclaw78
The following patch change the XML DTD to allow include tags. By using includes, shared definitions can be placed in a single for easier maintenance and reduced amount of data.
The code adds definitions for the SCB and SYSTICK on STM32F1XX. The definitions can be included in other processors as well.
I'm considering if it would be a good idea to add templates as well. A template could represent a peripheral, which is then instantiated at an offset.
Example:
It would make maintenance a lot easier. E.g. you could add interpretations of registers in one place for all instances of peripherals on all variants in a processor family. You can archive this by placing all the templates in an XML shared by all members of a processor family.
Interested?
Last edit: Morten Kristiansen 2017-10-27
Progress shared here: https://bitbucket.org/millibit/embsysregview.contrib
Got inspired and seriously modified the code. Introduced the concept of controllers. I'll describe it in details before I'm done, but here are the headlines:
A controller is typically an interrupt controller or a clock controller. Peripherals are connected to controllers using connections. At the moment I have implemented the NVIC of Cortex-M.
To include an NVIC, all you need to include in the XML is this:
To define peripherals, you would typically do this:
All peripherals are now defined in terms of templates defined in common file. I've attached an example.
In the UI I now have a register group named "Interrupt" for peripherals that displays interrupt enable, pending and priority. I can also change these just like normal field.
When I've tested and debugged the NVIC I'll start on the RCC for some of the STM processors. This will add another register group named something like "Clock" that displays whether the clock is enabled and what clock frequency the peripheral is fed.
When something becomes sufficiently ready to test, I'll put up a binary build on my webserver. If anybody is interested in testing and giving suggestions, please chip in.