Re: Using IC manufacturer header files

Maciek Borzecki <maciek.borzecki@...>

On Tue, Apr 19, 2016 at 10:50 PM, Cufi, Carles
<Carles.Cufi(a)> wrote:
Hi Maciek,

-----Original Message-----
From: Maciek Borzecki [mailto:maciek.borzecki(a)]
Sent: Tuesday, April 19, 2016 17:27
To: Nashif, Anas <anas.nashif(a)>
Cc: Cufi, Carles <Carles.Cufi(a)>;
Subject: Re: [devel] Re: Using IC manufacturer header files

On Tue, Apr 19, 2016 at 5:04 PM, Nashif, Anas <anas.nashif(a)>
Any files or headers included from an external project that need to be
kept in sync with upstream can keep their style and formatting to allow
updates in the future. This was the approach taken when we imported the
IP stack from contiki AFAIK.

How about keeping the library/headers external and passing their
location in Kconfig? Similar to what buildroot does with external
kernel/toolchains. Is that acceptable too?

Not sure if you mean pulling the source code from another repository at build time, since I don't know what buildroot does with kernel/toolchains.
However the MDK is not currently available in a repository, instead it is released as a .zip file by Nordic every time it gets updated. We could of course mirror it in a repo, but that would anyway require us to update it manually every time a new version is available.
What I meant is that you keep the {S,M}DK externally and just
configure a path to it inside Kconfig. You can add a config entry like
CONFIG_STM32F1_STDLIB_PATH. Then in project/driver makefiles
-I$(CONFIG_STM32F1_STDLIB_PATH) and optionally add some files to the
build as needed. This has one major advantage, that the 3rd party code
is kept outside of Zephyr repository, so you basically don't care
about the naming/conventions/licenses 3rd party libraries would use.

As for mirroring 3rd party SDK in a repo. No matter the vendor's
distribution method I always pull the source code into a git
repository for two main reasons:
- I don't trust vendors to have a reasonable release management (more
often than not they prove to have none)
- you cannot rely on developers putting/extracting SDK's at proper
locations and setting their dev environment

The multi repository projects can be easily remedied by using `repo`
tool or git submodules.

Maciek Borzecki

Join to automatically receive all group messages.