They are not all Apache 2.0. The NXP ones are a mixed bag, some call
out BSD, some just liability disclaimer, looks like the example I gave
was not the best one.

For STM this file is restricted in a way that is not compatible.
Personally I think that is a mistake on the part of STM, but here we
are...
https://raw.githubusercontent.com/posborne/cmsis-svd/master/data/STMicro/License.html

TI is another example with further restrictions.
https://github.com/posborne/cmsis-svd/blob/master/data/TexasInstruments/TM4C123GH6ZRB.svd

--Brennan

On Fri, Jul 3, 2020 at 3:19 PM Adam Feuer <a...@starcat.io> wrote:
>
> Brennan,
>
> All the files in this repo are Apache 2.0 licensed:
>
> https://github.com/posborne/cmsis-svd/blob/master/LICENSE-APACHE
>
> Doesn't that cover the license issue? The header is only a liability
> disclaimer.
>
> -adam
>
>
>
> On Fri, Jul 3, 2020 at 2:25 PM Brennan Ashton <bash...@brennanashton.com>
> wrote:
>
> > Just a warning on generating code from these files. Many of the have
> > explicit restrictions on using them which may not be compatible with BSD or
> > Apache.  For example NXP
> > https://github.com/posborne/cmsis-svd/blob/master/data/NXP/LPC1102_4_v4.svd
> >
> > I'm not sure on the legal side about this but it is why I have avoiding
> > using them to generate headers. Maybe Apache Legal could give us guidance.
> >
> > --Brennan
> >
> > On Fri, Jul 3, 2020, 1:45 PM Matias N. <mat...@imap.cc> wrote:
> >
> > > Hi,
> > > I thought about doing this for a long time and I just did it, wasn't
> > > really hard.
> > > If you're not aware, CMSIS-SVD file format is an XML based definitions of
> > > peripherals and registers available in a given MCU. This is typically
> > used
> > > for debugging but it is quite useful for generating header definitions. I
> > > wrote a quick python script that is able to generate register definitions
> > > and base addresses of peripherals. It is based on
> > > https://github.com/posborne/cmsis-svd which includes both the SVD python
> > > parser and a really complete database of SVD files.
> > > The tool is available here: https://gitlab.com/nuttx_projects/svdgen (be
> > > sure to check the README on how to use)
> > >
> > > Example output (the console output properly tabulates data, format may
> > > look broken in the email):
> > >
> > > Generate memory map:
> > > $ ./gen.py -v Nordic -d nrf51 -p map -x NRF51
> > >
> > > #define NRF51_POWER_BASE 0x40000000 /* Power Control.*/
> > > #define NRF51_CLOCK_BASE 0x40000000 /* Clock control.*/
> > > #define NRF51_MPU_BASE 0x40000000 /* Memory Protection Unit.*/
> > > #define NRF51_AMLI_BASE 0x40000000 /* AHB Multi-Layer Interface.*/
> > > ... etc
> > >
> > > Register definitions:
> > > $ ./gen.py -v Nordic -d nrf51 -p RADIO -x NRF51
> > >
> > > /* Register offsets
> > > *********************************************************/
> > >
> > > #define NRF51_RADIO_TASKS_TXEN_OFFSET 0x000000 /* Enable radio in TX
> > > mode.*/
> > > #define NRF51_RADIO_TASKS_RXEN_OFFSET 0x000004 /* Enable radio in RX
> > > mode.*/
> > > #define NRF51_RADIO_TASKS_START_OFFSET 0x000008 /* Start radio.*/
> > > #define NRF51_RADIO_TASKS_STOP_OFFSET 0x00000c /* Stop radio.*/
> > > #define NRF51_RADIO_TASKS_DISABLE_OFFSET 0x000010 /* Disable radio.*/
> > > ... etc
> > >
> > > /* Register definitions
> > > *****************************************************/
> > >
> > > #define NRF51_RADIO_TASKS_TXEN (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_TXEN_OFFSET)
> > > #define NRF51_RADIO_TASKS_RXEN (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_RXEN_OFFSET)
> > > #define NRF51_RADIO_TASKS_START (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_START_OFFSET)
> > > #define NRF51_RADIO_TASKS_STOP (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_STOP_OFFSET)
> > > #define NRF51_RADIO_TASKS_DISABLE (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_DISABLE_OFFSET)
> > > #define NRF51_RADIO_TASKS_RSSISTART (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_RSSISTART_OFFSET)
> > > #define NRF51_RADIO_TASKS_RSSISTOP (NRF51_RADIO_BASE +
> > > NRF51_RADIO_TASKS_RSSISTOP_OFFSET)
> > > ... etc
> > >
> > > Best,
> > > Matias
> >
>
>
> --
> Adam Feuer <a...@starcat.io>

Reply via email to