Using IC manufacturer header files


Carles Cufi
 

Hi there,

We are working on a port to a new ARM SoC family (Nordic nRF5X) and are wondering about a couple of things.
There has been some discussion lately on whether to use the ARM CMSIS header files directly. After a short discussion with Ben, we decided to integrate them in our branch (include/arch/arm/cortex_m/cmsis-core) so as to use a standard API to interface with the Cortex-M cores.
But a new question arose when adding SoC-specific headers to the Zephyr codebase: Nordic provides an MDK with all the relevant header files describing registers, interrupts and memory map of the SoCs. Those are licensed under a 3-clause BSD and we could use them directly so as to follow the trend we started with CMSIS to reuse whatever the manufacturer provides. However there are some coding convention clashes (IRQs listed as an enum instead of #define statements, coding style, etc). So the decision to take now is whether to use the Nordic header files unchanged or to provide our own that more closely match the rest of the architectures in terms of organization and coding style.

Is there a recommended approach for this type of dilemma?

Thanks!

Carles

Join devel@lists.zephyrproject.org to automatically receive all group messages.