Project Generator for MKL16Z256VLH4 with SDK 2.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Project Generator for MKL16Z256VLH4 with SDK 2.0

Jump to solution
1,997 Views
davidfindlay
Contributor III

I am trying to configure a project for the MKL16Z256VLH4 with FreeRTOS. When I build the SDK and try to use the project generator I am forced to create a project for a FRDM-KL46Z board. Is this implying that the project is simply the same?

Labels (1)
Tags (1)
1 Solution
1,610 Views
DavidS
NXP Employee
NXP Employee

Hi David,

Yes and no!

Since we do not have hardware board for each and every Kinetis MCU, the KSDK_v2 that you generate for your specific MCU (KL16Z256 in your case) is a proper subset of the KL46Z256.  And there is hardware support for it.

The KSDK_v2 boards folder simple has examples that run on the frdmkl46z Freedom platform.

But if you look at the following path:  ~SDK_2.0_MKL16Z256xxx4_KDS\devices

It contains both the MKL16Z4 and MKL46Z4 folders.

When you use Project Generator it wants to create a project that is supported on real hardware.

Once you have that project you can port it to support your KL16 by changing the Properties of the project to have paths to the KL16.

From:

${PROJECT_KSDK_PATH}/devices/MKL46Z4

${PROJECT_KSDK_PATH}/devices/MKL46Z4/drivers

${PROJECT_KSDK_PATH}/devices//MKL46Z4/utilities

To:

${PROJECT_KSDK_PATH}/devices/MKL16Z4

${PROJECT_KSDK_PATH}/devices/MKL16Z4/drivers

${PROJECT_KSDK_PATH}/devices//MKL16Z4/utilities

The Cross ARM C Compiler->Preprocessor define needs to change from "CPU_MKL46Z256VLL4" to "CPU_MKL16Z256VLH4 ".

That change allows the correct device headers to be used from the file fsl_device_registers.h.

So you need to comb through the generated project and replace the files that are contained in C:\NXP\KSDK_v2\SDK_2.0_MKL16Z256xxx4_KDS\devices\MKL16Z4 .

Lastly update the linker file used to one in the following path:

C:\NXP\KSDK_v2\SDK_2.0_MKL16Z256xxx4_KDS\devices\MKL16Z4\gcc

Regards,

David

View solution in original post

2 Replies
1,611 Views
DavidS
NXP Employee
NXP Employee

Hi David,

Yes and no!

Since we do not have hardware board for each and every Kinetis MCU, the KSDK_v2 that you generate for your specific MCU (KL16Z256 in your case) is a proper subset of the KL46Z256.  And there is hardware support for it.

The KSDK_v2 boards folder simple has examples that run on the frdmkl46z Freedom platform.

But if you look at the following path:  ~SDK_2.0_MKL16Z256xxx4_KDS\devices

It contains both the MKL16Z4 and MKL46Z4 folders.

When you use Project Generator it wants to create a project that is supported on real hardware.

Once you have that project you can port it to support your KL16 by changing the Properties of the project to have paths to the KL16.

From:

${PROJECT_KSDK_PATH}/devices/MKL46Z4

${PROJECT_KSDK_PATH}/devices/MKL46Z4/drivers

${PROJECT_KSDK_PATH}/devices//MKL46Z4/utilities

To:

${PROJECT_KSDK_PATH}/devices/MKL16Z4

${PROJECT_KSDK_PATH}/devices/MKL16Z4/drivers

${PROJECT_KSDK_PATH}/devices//MKL16Z4/utilities

The Cross ARM C Compiler->Preprocessor define needs to change from "CPU_MKL46Z256VLL4" to "CPU_MKL16Z256VLH4 ".

That change allows the correct device headers to be used from the file fsl_device_registers.h.

So you need to comb through the generated project and replace the files that are contained in C:\NXP\KSDK_v2\SDK_2.0_MKL16Z256xxx4_KDS\devices\MKL16Z4 .

Lastly update the linker file used to one in the following path:

C:\NXP\KSDK_v2\SDK_2.0_MKL16Z256xxx4_KDS\devices\MKL16Z4\gcc

Regards,

David

1,610 Views
davidfindlay
Contributor III

Looks like I've got it going. The project generator did set this up correctly. It is using the MKL16Z4 paths. Thanks!

0 Kudos