Re: Structure for external libraries, HAL

Nashif, Anas

On 20 May 2016, at 13:11, Cufi, Carles <Carles.Cufi(a)> wrote:

Hi Anas,

-----Original Message-----
From: Nashif, Anas [mailto:anas.nashif(a)]
Sent: Thursday, May 19, 2016 18:48
To: devel(a)
Subject: [devel] Structure for external libraries, HAL

As you are probably already aware, we have a few changes in review that
add external components to Zephyr, especially the CMSIS headers needed
for porting more Cortex-M MCUs and board.
Zephyr already has some external components. Some will need to move to
the new proposed location outlined below.


create a top level directory for all external components and headers
with the following structure (slightly modified):


we should be able to add more 2nd level categories under ext/, we might
consider having drivers for example for drivers from vendor SDKs that
are well tested and verified.

The advantages of having all the code in one place:
- easy to update and maintain
- files of the same license and from the same source all in one location
- can be excluded from zephyr style checks easily (to make CI happy)
- no contamination with original zephyr code

- the code will be in a location different from where it is being used
and referenced
- need to create cross references across the tree
- …
Would that replace the current lib/ folder, or would it live side-by-side? In any case +1 for the ext/ suggestion, we already do the same in some internal projects and it's proven to be practical.
it will not replace lib/. Lib currently has both the minimal c library implementation and tiny crypt. We might need to move tiny-crypt to ext/lib though.

Also worth mentioning that although CMSIS-CORE is made up of headers only, there are some components such as CMSIS-DSP [1] which are full-blown libraries and might or might not be considered strictly "hal”.
Well, those can go under ext/lib for example :-)




Join to automatically receive all group messages.