NXP SDK builder for Keil. How to import SDK as a pack?

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

NXP SDK builder for Keil. How to import SDK as a pack?

24,424 Views
bgraham
Contributor IV

I used the NXP SDK builder for Keil.

Build Date: 2018-12-05, Device: MKL16Z256xxx4

OS: Windows, Toolchain: Keil MDK

Components: FatFS, USB stack

SDK Version: KSDK 2.2.0 (2017-03-21)

I attempted to import the zip file into Keil's "Pack Installer".

I get the error: 

No pdsc files found in folder: SDK_2.2.0_MKL16Z256xxx4.keil_MDK

Can somebody explain how to import the SDK into Keil?

Thanks,

Bruce

0 Kudos
Reply
16 Replies

23,633 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bruce,

    When you create the new project and add driver for MKL16Z256, don't use the mdk Manage window to add it, yes, that window really lack driver in the Device, this is the MDK IDE problem.

    I highly suggest you add the driver manually, the driver for MKL16Z256 can be downloaded from the nxp official website:

https://mcuxpresso.nxp.com/en/welcome 

  Just like you have said, choose the processor as MKL16Z256ZXXX, then generate the code and download it.

  After you download the official SDK sample code, you can find the MKL16 driver in this folder:

22.jpg

You also can modify the official SDK project, take this project as an example:

SDK_2.2_MKL16Z256xxx4\boards\frdmkl46z\driver_examples\gpio\led_output\mdk

The default example is based on MKL46, so when you open it, you need to change all the MKL46 code to the MKL16 code and driver in folder:

SDK_2.2_MKL16Z256xxx4\devices\MKL16Z4

pastedImage_3.png

1. startup_MKL16Z4.s in folder SDK_2.2_MKL16Z256xxx4\devices\MKL16Z4\arm

2. system_MKL16Z4.c and system_MKL16Z4.h in folder SDK_2.2_MKL16Z256xxx4\devices\MKL16Z4

3. project driver should be replaced by the drivers in folder: SDK_2.2_MKL16Z256xxx4\devices\MKL16Z4\drivers

4.  modify the options

pastedImage_4.png

pastedImage_5.png

5, copy MKL16Z256xxx4_flash file from folder  SDK_2.2_MKL16Z256xxx4\devices\MKL16Z4\arm to SDK_2.2_MKL16Z256xxx4\boards\frdmkl46z\driver_examples\gpio\led_output\mdk

pastedImage_6.png

Then build the project, you can find there no errors.

This is the MKL16 project, I also attach my modified project for your reference.

Wish it helps you!

About the MDK IDE window lack SDK driver problem, you need to contact with MDK IDE side.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

23,585 Views
w511577
Contributor I

Build started: Project: gpio_led_output
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'gpio_led_output Debug'
compiling fsl_smc.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_smc.c: 0 warnings, 3 errors
compiling fsl_gpio.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_gpio.c: 0 warnings, 3 errors
compiling fsl_flash.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_flash.c: 0 warnings, 3 errors
compiling fsl_lpsci.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_lpsci.c: 0 warnings, 3 errors
compiling fsl_common.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_common.c: 0 warnings, 3 errors
compiling fsl_uart.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_uart.c: 0 warnings, 3 errors
compiling fsl_clock.c...
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #20: identifier "SIM_SOPT2_USBSRC" is undefined
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(268): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcPll0 = SIM_SOPT2_USBSRC(1U) | SIM_SOPT2_PLLFLLSEL(1U), /*!< Use PLL0. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.h(269): error: #59: function call is not allowed in a constant expression
kCLOCK_UsbSrcExt = SIM_SOPT2_USBSRC(0U) /*!< Use USB_CLKIN. */
../../../../../../devices/MKL26Z4/drivers/fsl_clock.c(486): error: #20: identifier "SIM_SOPT2_USBSRC_MASK" is undefined
SIM->SOPT2 &= ~SIM_SOPT2_USBSRC_MASK;
../../../../../../devices/MKL26Z4/drivers/fsl_clock.c(495): error: #20: identifier "SIM_SOPT2_USBSRC_MASK" is undefined
SIM->SOPT2 = ((SIM->SOPT2 & ~(SIM_SOPT2_PLLFLLSEL_MASK | SIM_SOPT2_USBSRC_MASK)) | (uint32_t)src);
../../../../../../devices/MKL26Z4/drivers/fsl_clock.c: 0 warnings, 5 errors
compiling system_MKL16Z4.c...
compiling clock_config.c...
compiling pin_mux.c...
compiling board.c...
compiling fsl_debug_console.c...
"debug\gpio_led_output.out" - 23 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:03

0 Kudos
Reply

23,633 Views
bgraham
Contributor IV

I am developing professional commercial medical device software. Silly hacks like you have suggested are not good enough.

The ARM uVision folks think the problem with NXP's SDK.

I have not had problems like this with other ARM vendors like Renesas or STM.

NXP and ARM are supposed to be partners, so talk to ARM.

Please contact Cameron P. LaFollette (ARM uVision) at ARM and get this problem resolved.

Thanks,

Bruce

0 Kudos
Reply

23,633 Views
PetrKraus
NXP Employee
NXP Employee

Hello Bruce,

let me clarify the situation.

MKL16 devices are not supported in any SDK version that is available in a form of NXP produced CMSIS packs. The CMSIS packs as an alternative form of SDK delivery are supported from SDK 2.3.0. The latest version supporting MKL16 is SDK 2.2.0. That CMSIS pack from ARM you tried to use is deprecated. It is a pack created by ARM without the SDK.

You can still use the SDK package downloaded from the https://mcuxpresso.nxp.com site. But it is not possible to import it into MDK. Only CMSIS packs can be imported. You can use example projects for MDK from that package and modify them as you need. The project manager in MDK can only help with the project if its is CMSIS pack based.

As an alternative solution you can try to use the MCUXpresso IDE instead of MDK.

Regarding CMSIS packs for MKL16, I'll check with Marketing whether it is something that can be re-considered.

Regards,

Petr

0 Kudos
Reply

23,633 Views
bgraham
Contributor IV

Thank you for providing this info about the NXP processors and the lack of

support for the MKL16 Kinetis with the Keil MDK.

I had been *misinformed *by NXP's claims on its web site that states "NXP®

has partnered with leading providers to offer best-in-class featured

commercial IDEs for ARM® Cortex®-based microcontrollers, *with detailed

support for Kinetis® microcontrollers*.". And ARM KEIL is listed.

See

https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-f...

I had assumed from the NXP SDK web site, that a toolchain for the Keil MDK

is available. See below.

See https://mcuxpresso.nxp.com/en/dashboard

SDK_2.2.0_MKL16Z256xxx4 (5) <https://mcuxpresso.nxp.com/en/dashboard#>

<https://mcuxpresso.nxp.com/en/dashboard#>

Build Date: 2018-12-20, Device: MKL16Z256xxx4

OS: Windows, Toolchain: All Toolchains

Components: FatFS, USB stack

SDK Version: KSDK 2.2.0 (2017-03-21)

I have been using MCUXpresso Config Tools v4.1 with Keil MDK. This is a

very nice tool by the way. It has saved me many hours of tweaking MCU

settings by hand.

I selected ARM's Keil MDK because I am working on medical devices and the

toolchain must be safety certified by TUV for IEC 61508 and ISO 26262.

It is my understanding that MCUXpresso IDE can only use the GNU toolchain,

which is not certified. So I can't use MCUXpresso for my safety critical

applications.

Please add the MKL16 Kinetis support for the KEIL MDK, or remove the all of

the claims from your web pages.

Please let me know what NXP will do and when these changes will be made.

I need to know immediately since your decision will determine if I have to

select another MCU for this project and future projects.

Thanks,

Bruce

0 Kudos
Reply

23,633 Views
PetrKraus
NXP Employee
NXP Employee

Bruce,

it is nice to hear that you have found the MCUXpresso config tools useful. Thank you.

MDK is supported, but the support is limited. You need to manage the project by yourself. It is not possible to use the CMSIS components and all the related comfort. However the MDK as a toolchain is supported. The SDK code is tested with MDK and there are example projects for MDK.

I believe marketing had a good reason why the MKL16 device was removed from a list of devices to be supported by the new SDK versions. I would not recommend this device for new projects.

I am sorry for the inconvenience that limitation has caused to you.

Petr

0 Kudos
Reply

23,633 Views
bgraham
Contributor IV

I will see if we can replace the MKL16Z256VLH4 with a MKL26Z256VLH4.

The MKL26Z256VLH4 appears to be a good replacement.

The MKL26Z256VLH4 has a USB port on pins 5 and 6, instead of UART2, but I

think I can live with that.

Thanks,

Bruce

23,633 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bruce,

   Do you install the MDK pack at first?

   Please check the following picture:

pastedImage_1.png

You need to add the pack at first, then your problem will be disappear.

You can install both the KL16 and KL26.

Please try it at first, if you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

23,633 Views
bgraham
Contributor IV

And when I attempt to switch from the NXP.MKL26Z4_DPF.10.0.3 to the

Kinetis_KLxx_DFP, it is missing all of the SDK Drivers.

The Kinetis_KLxx_DFP is worthless. See below.

Please fix this problem.

Thanks,

Bruce Graham

Senior Software Engineer

TechnoSoft Innovations, Inc.

bgraham@technosofteng.com

900 Perimeter Park Drive, Suite C

Morrisville, NC 27560

Phone 919-337-0866 Ext 104

0 Kudos
Reply

23,633 Views
kerryzhou
NXP TechSupport
NXP TechSupport

After you install the pack, then you can close the IDE, open the official MDK SDK project again.

If you still have problems, please tell me what the MDK version you are using?

It works OK on my side.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

23,633 Views
bgraham
Contributor IV

Keil uVision 5.26.2.0

When I create a new project using the Keil::Kinetis_KLxx_DFP pack 1.15.0,

I get a project with no devices.

When I create a new project using the NXP::MKL26Z4_DFP pack 10.0.3, I get a

project with all of the MCU's devices.

See below.

What is going on, and how do I correct it?

Thanks,

Bruce

===================================

Keil::Kinetis_KLxx_DFP

===================================

===================================

NXP::MKL26Z4_DFP

===================================

0 Kudos
Reply

23,627 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bruce,

  Please check your this picture:

pastedImage_1.png

When you open the project, can find the device, then just select the chip manually, then press OK, then your project will have the part number.

At that time, you can build it again.

When the above window pop when you open the project, just select the chip which you are using.

If you still have problem, just let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

23,627 Views
bgraham
Contributor IV

Did you bother to read my previous email?

My previous email has screen captures.

Please read my previous email before responding. Can you do that for me?

Thanks,

Bruce Graham

Senior Software Engineer

TechnoSoft Innovations, Inc.

bgraham@technosofteng.com

900 Perimeter Park Drive, Suite C

Morrisville, NC 27560

Phone 919-337-0866 Ext 104

0 Kudos
Reply

23,627 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bruce,

   I have already checked your last email, and checked your screen pictures.

   From the MDK's website:

MDK5 Device List 

Kinetis_KLxx_DFP pack is 1.15.0,

MKL26Z4_DFP pack has 10.0.3.

  You said, when you use 10.0.3 for MKL26, you get a project with all of the MCU's devices. Can you select the according MKL16 in MDK project device? Please try it, if you still have problems, please send me your project which have the problem.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

23,627 Views
bgraham
Contributor IV

This website is not placing my images within the body of the text.

I downloaded the Keil::Kinetis_KLxx_DFP packs 1.1.0 through 1.15.0.

I looked in directory C:\Keil_v5\ARM\PACK\Keil\Kinetis_KLxx_DFP.

None of the sub-directories contain a pack drivers directory.

Clearly, there are no pack drivers, so there is no support for the MCU.

I looked in the directory C:\Keil_v5\ARM\PACK\NXP\MKL26Z4_DFP\10.0.3\drivers.

The drivers directory contains c files (drivers) for the MCU's clock, dac, adc, dma, etc.

Is the pack is broken?

Or is NXP not providing support?

Thanks,

Bruce

0 Kudos
Reply

23,627 Views
bgraham
Contributor IV

I downloaded Keil.Kinetis_KLxx_DFP.1.15.0.pack from the website.

I imported Keil.Kinetis_KLxx_DFP.1.15.0.pack into Keil's Pack Installer.

I built a new project using the MKL16Z256xxx4

MKL16Z256 vs. MKL26Z256

MKL16Z256 SDK is missing the SDK Drivers, SDK Project Template, SDK

Utilities!

MKL26Z256 SDK has them.

I can't add support for the MCU's SPI, I2C, USART, etc.

Why is MKL16Z256 SDK is missing the SDK Drivers, SDK Project Template, SDK

Utilities?

Do you understand what I am asking?

Thanks,

Bruce

--

*Disclaimer:* *The information is intended

to be conveyed only to the

designated recipient(s) of the message. If you have

received this

communication in error, you are requested to notify the same

immediately by

replying to the message and deleting it from your computer. If

you are not

the intended recipient, you are hereby notified that any

dissemination,

use, distribution or copying of this communication is strictly

prohibited

and may be unlawful.*

0 Kudos
Reply