Menu

CMSIS svd missing some important stuff

Help
2013-05-23
2013-05-28
  • Chris Morgan

    Chris Morgan - 2013-05-23

    I'm working with the stm32f10x series processors. Both the CMSIS (svd)
    and the other non-cmsis svd (I have no idea what svd stands for btw),
    are a bit lacking in their register definitions.

    The cmsis svd has nvic (which the cortex-m3/stmicro lack) but all of
    them lack the system control block registers, the ones that let you
    debug faults etc.
    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/Cihdjcfc.html

    I could probably pretty easily add the new register definitions but I
    don't know where to do so. Should I be modifying the cmsis svd ones,
    or one of the two sets of registers in the cortex-m3/stmicro area? and
    why are there two sets of registers for overlapping chips in that
    directory?

    Chris

     
  • Raven Claw

    Raven Claw - 2013-05-23

    Hi Chris,

    the SVD format is an industry standard defined by ARM.
    All the SVD files i put into the data dir are provided by the chip manufactures and were downloaded from this place. All SVD files are unmodified copied into the SVD folder.

    All the other xml files are in an xml format (lets call it embsysregview format) that I created for the view. All in all svd allows to specify pretty much the same information.

    Currently all user created and modified data is in embsysregview format.
    I would prefer that you modify the embsysregview format xml files, cause from time to time I just copy new/changed SVDs from the website listed above, but without checking against local changes. Best way getting changes into SVD files would be getting the chip manufacturer to include it themselves.

    Hope that helps

    -Robert

     
  • Raven Claw

    Raven Claw - 2013-05-23

    The overlapping chip file is the result of two contributors sending in their own files.
    I dont have the time to do more than a simple "will it load" test before checking it in.

    Maybe you can help and point out if a file is outdated or a subset of another ?

    -Robert

     
  • Chris Morgan

    Chris Morgan - 2013-05-23

    Sure. I'll want to have those registers available for my use here and it isn't difficult to improve them.

    A couple of follow up questions:
    - You use svn for source control? It would be easier, imo and certainly for me, for contributors if you were to use git. With svn it isn't easy to make a series of local changes as each change would have to be applied before the next one could be committed. I've switch most of my sf projects to git, all of the active ones at least, because of that. Its a different tool so I wouldn't blame you if you weren't interested in switch because of that.
    - Is there some way to inherit xml files into each other? It may not matter because I'm not positive if this is the case, but I believe most of the stm32f10x chips have very close register definitions. For instance the system control block, the section that is missing from the official cmsis svd files, is the same for all cortex-m3 series chips. It would be handy to put that at the cortex-m3 directory level like system_control_block.xml, and include that in the appropriate other xml files.
    - Is there a way to map to valid values like enums in the xml files? I noticed I could control gpio fields via the two bits of mode but some bits aren't valid, this applies to a lot of other registers.

    I can certainly combine the two xml files into one more accurate one. I'll have to look more carefully at the differences between the two. I'm spoiled by this aspect of IAR Workbench for ARM where all registers are mapped and they have drop downs for the valid options for given register fields etc.

    Chris

     
  • Raven Claw

    Raven Claw - 2013-05-23

    I've only got short contact with git checking things in (a lot more checking things out and compiling it), it was in some ways similar to svn, but i guess this was too short, cause I didn't get the idea behind the distributed stuff... so I have to read something about the fundamentals of git again, before doing this.

    Currently there is no such thing as inheritance, but some similar idea in the todo.txt "Merge shipped xml with xml in home dir"
    This would need a new tag at the beginning, and some logic changes, maybe something to merge two tree datastructures.

    With "map to valid values" ...do you mean something like this ? (taken from here)

    <field name="MODE12" bitoffset="16" bitlength="4">
        <interpretation key="0x00000000" text="DISABLED"/>
        <interpretation key="0x00000001" text="INPUT"/>
        <interpretation key="0x00000002" text="INPUTPULL"/>
        <interpretation key="0x00000003" text="INPUTPULLFILTER"/>
        <interpretation key="0x00000004" text="PUSHPULL"/>
        <interpretation key="0x00000005" text="PUSHPULLDRIVE"/>
        <interpretation key="0x00000006" text="WIREDOR"/>
        <interpretation key="0x00000007" text="WIREDORPULLDOWN"/>
        <interpretation key="0x00000008" text="WIREDAND"/>
        <interpretation key="0x00000009" text="WIREDANDFILTER"/>
        <interpretation key="0x0000000A" text="WIREDANDPULLUP"/>
        <interpretation key="0x0000000B" text="WIREDANDPULLUPFILTER"/>
        <interpretation key="0x0000000C" text="WIREDANDDRIVE"/>
        <interpretation key="0x0000000D" text="WIREDANDDRIVEFILTER"/>
        <interpretation key="0x0000000E" text="WIREDANDDRIVEPULLUP"/>
        <interpretation key="0x0000000F" text="WIREDANDDRIVEPULLUPFILTER"/>
    </field>
    

    This will bring a drop down in the view.

    -Robert

     
  • Chris Morgan

    Chris Morgan - 2013-05-24

    Is this the best way to converse? If email works better, chmorgan@gmail.com is my address.

    Excellent information. I'll start small of course, trying to figure out how to remove some of the duplicate register files from that folder.

    To make it easier for me to send you patches I imported embsysregview into a git repository and pushed to github as https://github.com/chmorgan/embsysregview I was planning to use this so I could commit changes there and generate patches for you that you could apply to svn.

    I can't figure out how to get eclipse to use the plugin. I uninstalled the one installed via the site url and tried to install the local directory but I can't seem to figure it out. Does the directory layout look ok in the github tree view? I tried to give eclipse (juno sr2) the org.eclipse.cdt.embsysregview directory as a local or an archive but it didn't work.

    Chris

     
  • Chris Morgan

    Chris Morgan - 2013-05-26

    Robert?

    Chris

     
  • Raven Claw

    Raven Claw - 2013-05-26

    I answered to you via email...


    You only need to check out "org.eclipse.cdt.embsysregview", and then RUN it -> in the new Eclipse that will start you can show the view / debug it and so on ...

    -Robert

     

    Last edit: Raven Claw 2013-05-26
  • Chris Morgan

    Chris Morgan - 2013-05-26

    Doh. Got caught in gmail's spam filter for some reason. I wanted to see why but I wasn't able to figure it out.

    Chris

     
  • Brutte

    Brutte - 2013-05-28

    but all of them lack the system control block registers, the ones that let you debug faults etc.

    That is the point! ARM didn't publish most of the PPB part in their CMSIS header files! I have no idea why is that so and I have to add the definitions manually.

    Anyway, here you can download an xml for PPB for ARMv7-M and luckily for you: both SCB and DCB parts are complete! I will try to add DWT and FPB soon.

    It would be easier, imo and certainly for me, for contributors if you were to use

    Definitely! I have no idea how to use git or svn but we must share those files somehow..

     

Log in to post a comment.