Skip to main content
Visitor II
June 12, 2017
Question

Looking for registermap database to generate headers for SDCC

  • June 12, 2017
  • 5 replies
  • 2688 views
Posted on June 12, 2017 at 10:36

Hello all,

I would like to generate register map definition header files preferably for all STM8 MCUs to for the SDCC project.

Is there any database (XML, MDB, whatever) from what I could generate it without hurting any license?

Thanks in advance!

#sdcc

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.

    5 replies

    Visitor II
    June 14, 2017
    Posted on June 14, 2017 at 14:51

    Bump!

    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 10:04

    Panecki.Szymon.002

    VALCIN.Simon

    Could you please comment on this one?

    The IAR ships a bunch of sfr files where all the necessary information would be available for me but those files are copyrighted.

    I cannot believe that they have 'handtyped' those files from the datasheets, the sources of these files must be derived from some databases coming from the ST.

    Thank you in advance!

    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 11:49

    Hi Miklos,

    There is a project on github, a guy adapted the standard peripheral libraries for SDCC:

    https://github.com/onepixel0/stm8-sdcc-cmake

     
    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 12:00

    Thanks for the link, but there are many cases when it is easier to use the bitfields directly.

    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 12:14

    I agree and I support your original question.

    Visitor II
    July 6, 2017
    Posted on July 06, 2017 at 14:37

    Bump!

    I would be satisfied with a 'no we cannot provide such a material', 'or we need some time to work on it' kind of answers too.

    Graduate II
    July 6, 2017
    Posted on July 06, 2017 at 16:50

    It is primarily a user forum, so perhaps you're just in the wrong venue to pose such questions. An engineering or sales contact within ST would be the way to go.

    Synthesize what you need from what is available. At some point people from IAR, ST, or where ever type stuff in, be resourceful. Typical sources would be assembler .INC files and .H files. The XML type files often come from a post-processing of user generated tables.

    Visitor II
    July 7, 2017
    Posted on July 07, 2017 at 08:25

    Yeah I know this is an user forum, but sometimes ST employees used to comment here. Unfortunately I do not have engineering/sales contact with ST.

    I can synthesize what I need from the IAR SFR files, but doing that would violate the IAR license terms. I have already found renamed registers in those files, so saying that I have typed the generated headers by hand from the datasheets is not an option.

    Visitor II
    June 11, 2018
    Posted on June 11, 2018 at 11:35

    Hi ST Folks,

    I have started to discuss this matter with one of your colleague, but I cannot reach out him recently.

    According to our last mail change he started an internal discussion about this.

    I would deeply appreciate if someone from ST could ask around the output of this internal discussion and let me know the results.

    Thanks in advance!

    Visitor II
    June 11, 2018
    Posted on June 11, 2018 at 12:13

    the ST person may have ceased communications for a reason.

    I think you may want to think about the possibility of repurposing the stock header files for your compiler, by either making it compilable under SDCC, or to generate your own header files from them. all the information is there anyway.

    Visitor II
    June 11, 2018
    Posted on June 11, 2018 at 12:59

    Please compare the attached files (iostm8sh shipped with the Cosmic, STM8S103F.h shipped with STVD, and iostm8s003k3 generated

    https://github.com/martonmiklos/iarSTM8sfr2cosmic

    from the IAR registermaps). If you see the difference you will understand the reason why I want to get registermaps definition.

    As I have mentioned above generating the headers from the files shipped with IAR and using with non IAR tools explicitly forbidden by the IAR license agreement.

    Believe me I am not whinning here for nothing. Having good header files is essential for embedded development:

    https://jaycarlson.net/microcontrollers/#headers

    And at the another hand the STVD debug view got more readable this way:

    0690X0000060BcoQAE.png

    ________________

    Attachments :

    iostm8s103.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxWp&d=%2Fa%2F0X0000000azM%2FICB9Y8.iCDJ3Em5TcTKxU4MPUCVnK0WLHY4JiRLVMFw&asPdf=false

    iostm8s003k3.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxWk&d=%2Fa%2F0X0000000azN%2Fvt5QhcFiElgmj7.wdnfVQ0UFIDMlnAeF_GRxFgsAL9c&asPdf=false

    STM8S103F.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxWf&d=%2Fa%2F0X0000000azO%2FnakUlj7U6AQZ7.AxwHhG5z78qAykYeHV3wYvhGPLVeI&asPdf=false