[riot-devel] kinetis common - differences between families

Hauke Petersen hauke.petersen at fu-berlin.de
Fri Mar 13 19:59:56 CET 2015

Hi Jozef,

I have to say I was more or less expecting these slight differences...

The RIOT way to go would be option 3. This is already done for the 

Of course this leads to some duplication of code, but in the end it 
leaves the overall folder structure very clean and it is always clear, 
where the code you are currently building is coming from. In my opinion 
a finer grained dependency-tree like kinetis-common -> kinetis-k-common 
-> k60 on so on would lead to a structure that is as hard to maintain as 
some duplicated code...

@gebart and @jfischer: would that solution work for you?


On 13.03.2015 19:47, Jozef Maslik wrote:
> Hi,
> How we want deal with the difference between variants of peripherals in Freescale Kinetis families (I mean, what is RIOT OS prefered way)? Here is difference between families - for example between K family vs L family. And if I remember correctly ;), there can be difference between specific chips in same family, too.
> For example SPI, kinetis_common contain driver spi.c but module on K60 is different compare to KL02 or KL10, etc.
> Here can be few options (minimal three ;)):
> 1. rename spi.c to real module name, at this situation it can be “DSPI” for K family and “SPI” for L family.
> - exact name for K60 SPI module is “DSPI", then rename spi.c to dspi.c solve this major issue
> - module name for SPI on L family is simply “SPI”
> - I prefer this solution…
> 2. conditional compilation for different MCUs (one spi.c file)
> - this will be mess in code, because modules are too much different
> - I do not like this solution
> 3. another “common” directory - for each family
> - this can produce code duplication
> Regards,
> Jozef
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/devel

More information about the devel mailing list