RegMapDef

Purpose

RegMapDef is a project to provide an XML schema and associated tools to support a standardized way of describing register maps.

The tools shall incorporate XSL style sheets and scripts to generate documentation, header files, implementation stubs etc.

Status

The Subversion repository contains an XSD file for creating your own register maps. Also in the repository you will find an XSL-FO stylesheet to generate a documentation and Python and Ruby scripts to generate simple header files. Therefore the project can be considered useful. In fact these tools are already used at the company for which I'm currently working (and which gave me the permission to make it a Sourceforge project. Thank you Ubidyne!).

However there are still many things to do. Check the projects Item Tracker to see the currently known wishes.

How to use

For all tasks you first have to check out the current RegMapDef sources:

svn co https://regmapdef.svn.sourceforge.net/svnroot/regmapdef regmapdef

Generating documentation

To generate documentation from a register map definition you will need a Formatting Objects Processor (FOP) such as the Apache FOP and an XSLT processor such as Xalan.

If you download Apache FOP you already have all the tools needed and you don't have to download Xalan additionally. However you might want to copy the xalan.bat file from regmapdef/tools/fop into your fop installation to conveniently start the XSLT processor.

In the following example I assume that you are using Apache FOP and Xalan and that xalan and fop are in your PATH

  1. In your shell change to the examples of the RegMapDef checkout

  2. First convert the XML file into the formatting objects version using the provided stylesheet:

    xalan -IN 8051.xml -OUT 8051.fop -XSL ..\stylesheets\regmapToDoc.xsl

  3. Now convert the FOP description into a PDF:

    fop 8051.fop -pdf 8051.pdf

Generating header file

To generate a header file from a register map definition you will either need Python or Ruby.

In the following example I assume that you are using Python and that python is in your PATH

  1. python ..\tools\python\rmp.py 8051.xml 8051.h

Using Ruby instead is really straight forward and looks very similar:

  1. ruby ..\tools\ruby\rmp.rb 8051.xml 8051.h

Links

Get RegMapDef at SourceForge.net. Fast, secure and Free Open Source software downloads