Header file confusion

I recently tried KDS for the first time (on a Mac). I tried recreating a simple K20 project that I had in CodeWarrior by creating a new project in KDS, then moving the C source files over. However, I encountered problems, and I am confused:

First, there is no derivative.h — I only got a MK20D5.h include. I changed my source file to include that directly, instead of derivative.h — is that the right thing to do?

Second, lots of defines seem to have vanished — basic things like PORTA_PCR18, or GPIOC_PSOR.

I proceeded to quickly diff the old MK20D5.h that I had in my CodeWarrior project and the new one in KDS and the results are even more confusing: the old version was labeled as "rev. 3.3", and the one in KDS is labeled as "rev 2.3". But they both share the same date. The changelog does not indicate any massive changes, and yet the files are very different.

Sorry for the confusion created so far. There is no error or problem with the header files, you are just looking at two different kind of headers and the fact that the name is the same is just an inconvenience.

Sorry for the confusion created so far. There is no error or problem with the header files, you are just looking at two different kind of headers and the fact that the name is the same is just an inconvenience.

Thank you, Jorge, this explanation makes everything clear. I somehow missed the transition to CMSIS, even though I've spent some time reading the user guide and release notes. This is a good direction, and I will update my code.

However, one question still remains — is the idea of a "derivative.h" file gone? I have library code that is reusable across multiple Kinetis devices, and I'd rather include a "derivative.h" than specify the exact variant in my library code. How does one include "whatever CPU the project targets" in library C code?