Hello:

While adding support for a new NXP processor (the MKW41Z) I have run into a bit 
of an issue and not sure the best way to resolve it.

The NXP mcu support currently has one device in it: the MK64F12. If you go into 
the hw/mcu/nxp directory there is a SDK package in that dir. The basic 
structure of the SDK is this:

src/ext/sdk-2.0-frdm-k64f_b160321/devices/<DEVICE>

Currently, there is one device in there (the MK64F12). When I went to add a new 
device (the mkw41z) I ran into the following issue. There is a file called 
fsl_device_registers.h. This header file exists in both device directories. 
When I went to build the mkw41z it was including fsl_device_registers.h from 
MK64F12; not mkw41z.

This was in the old pkg.yml file:

pkg.src_dirs:
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/drivers"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/gcc"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/utilities"

I was hoping that this would work (it did not):

pkg.src_dirs.BSP_MK64F12:
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/drivers"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/gcc"
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/utilities”

pkg.src_dirs.BSP_MKW41Z:
    - "src/ext/sdk-2.0-frdm-k64f_b160321/devices/mkw41z"

I do not understand how the newt tool determines include paths from an sdk 
pkg.yml file so maybe there is way I can do this. Of course, I could create 
separate sdk packages but I do not think that is the right way to go. I could 
also move the needed code into hw/mcu/nxp/<DEVICE>/ but I do not think that is 
the best way to solve this, either.

Any thoughts/suggestions on how to deal with this?

Thanks!














Reply via email to