MKW31Z512xxx4 SDK issue

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

MKW31Z512xxx4 SDK issue

Jump to solution
1,100 Views
UsamaShafiq
Contributor II

Hey there!  I am working on MKW31z512xxx4 custom development board in MCUXpresso IDE. When I download its SDK's it does not show any pre existing Development board. 
Secondly, When I choose to work without development board (only Microcontroller), in that case it does not show any GPIO's in pin configuration view. 
How can I solve this Issue? Is there any SDK available for this microcontroller?

Need Urgent Help!

Regards!

0 Kudos
1 Solution
931 Views
UsamaShafiq
Contributor II

Hello @Julián_AragónM 

Well, before your replied, I had tried the other way. I had built an existing LED blink example available for MKW41z512VHT4 and did some modifications in pin configuration and declaration of GPIO pin and Port in main function. It worked and LED started blinking...

That was like an achievement..

But now, my actual task is to use MKW41z SDK, do the necessary modifications in configuration file and main code to erase the external flash on my custom board (with MKW31z microcontroller).

 

View solution in original post

0 Kudos
9 Replies
988 Views
UsamaShafiq
Contributor II

Hello @Julián_AragónM

I am using MKW31z512VHT4 micro-controller. I want to build a basic LED blink program in MCUXpresso IDE for this particular controller. As, the is no pre-existing development board for this micro-controller, hence there is no SDK available for it. On my custom development board, LED's are connected at pins :PB0, PB1 and PB2. How can I build a program on MCUXpresso IDE to blink an LED on above mentioned pin of this controller.

Note: I have built a simple Hello world project using MKW31z512VHT4 (but without selecting the board). It gets built successfully without any error but whenever I click on Run button it gives the following error, shown in screenshot.
Can you please provide me with a procedure to build an LED blink project from scratch on this microcontroller (without development board) and how to flash it (not in a debug mode)?

 

0 Kudos
977 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @UsamaShafiq,

For a basic LED blink project, please help me looking into the led_output example under the "gpio" folder in the SDK for the KW41z's development board, then make the necessary changes for your custom board.

The training mentioned previously shows how to change the package and MCU to the preferred option in a MCUXpresso project. You can use Config Tools to modify your project with the KW41z, and then make the necessary changes to the KW31z MCU.

 

As for the error, which programmer are you utilizing to program the custom board?

Here is a community post with Design Considerations for Debug - NXP Community for custom board designs, please help me look into it and see if this is helpful!

Best regards,
Julián

0 Kudos
960 Views
UsamaShafiq
Contributor II

Upon trying the previous training video link you provided, I am unable to build the project for MKW41z512xxx4. Whenever I create a project and go to pins configuration, after routing GPIO's I update the code. But when I go back to main code and try to build the project. It give me the following error:
../board/pin_mux.c:24:10: fatal error: fsl_port.h: No such file or directory
24 | #include "fsl_port.h"
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [board/subdir.mk:29: board/pin_mux.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Finished building: ../source/MKW41Z4_Project.c

make: *** [makefile:40: all] Error 2
"make -r -j8 all" terminated with exit code 2. Build might be incomplete.
Even though fsl_port.h header file is not Initialized in the code.
What should I do now?

 

Is there any way to Use MKW31z512VHT4 without Development board to blink an LED connected at GPIO PB0-PB2?

0 Kudos
945 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @UsamaShafiq,

The error seems to be a missing driver in your project, you could try adding it manually from another project, or looking for it in the SDK (SDKPackages\SDK_2_2_3_FRDM-KW41Z\devices\MKW41Z4\drivers\fsl_port.h)

It seems like you are creating a project from scratch. Our recommendation is to always base projects off of existing examples.

Under the "Quickstart panel", please select "Import SDK example(s)…", followed by selecting "frdmkw41z" from the SDK list, please make sure it is the latest SDK and the board's package. After this, search for the "led_output" project under the gpio folder and select "Finish".

Julin_AragnM_0-1693502219018.png

Julin_AragnM_1-1693502219022.png

Julin_AragnM_2-1693502219027.png

This project is supported by the set, clear, and toggle write-only registers for each port output data register. The example takes turns to shine the LED.

After importing and building the project, changing the port and pin to PB0-2 can be made manually or with Config Tools.

Best regards,
Julián.

0 Kudos
932 Views
UsamaShafiq
Contributor II

Hello @Julián_AragónM 

Well, before your replied, I had tried the other way. I had built an existing LED blink example available for MKW41z512VHT4 and did some modifications in pin configuration and declaration of GPIO pin and Port in main function. It worked and LED started blinking...

That was like an achievement..

But now, my actual task is to use MKW41z SDK, do the necessary modifications in configuration file and main code to erase the external flash on my custom board (with MKW31z microcontroller).

 

0 Kudos
1,075 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @UsamaShafiq,

The KW31z is part of the KW41Z Solutions Family, and currently only the FRDM-KW41Z and USB-KW41Z are available as development boards for this family, thus the KW31Z/21Z do not have one.

As for the pin configuration, MCU Config Tools does not include support for MCU's without development boards. To work around this, you can copy the modifications made with the Config Tools on the KW41Z onto a KW31Z project.

The SDK you are looking for is under "Processors" instead of boards.

I hope you find this helpful!

Best regards,
Julián

0 Kudos
1,037 Views
UsamaShafiq
Contributor II
Hello Julian!
So ,Can you guide me how to build project in MCUXpresso IDE and program my MKW31Z with customized development board? I want to use the external flash that is on my custom board.
0 Kudos
1,024 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @UsamaShafiq,

Please help me looking into these links:

Creating a Custom Board SDK and Migrating Code Between Boards | NXP Semiconductors

Creating a Custom Board SDK for Your Device | NXP Semiconductors

These are official trainings directed towards custom board development. I believe you will find them useful.

If you have any other doubts, do not hesitate to ask!

Best regards,
Julián

0 Kudos
1,009 Views
UsamaShafiq
Contributor II
Sure & Appreciated. I'll get back to you I find any further issue.
0 Kudos