Why my MCUXpresso for VSCode cannot build MCX N947 hello world project?

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

Why my MCUXpresso for VSCode cannot build MCX N947 hello world project?

610 Views
xin_ma
Contributor I

I try to build a hello world project with it but in vain.

xin_ma_0-1712720231330.png

 

0 Kudos
9 Replies

582 Views
DragosMiloiu
NXP Employee
NXP Employee

Hi @xin_ma,

From what i can see in the screenshot it seems that VS Code is trying to use a GCC for x86.

Could you please right click on the project (in Projects view) and select Configure->Associate Toolchain and select one from the list. After that try rebuild.

Thanks,

Dragos.

0 Kudos

567 Views
xin_ma
Contributor I

I select this, the only one, and still failed.

xin_ma_0-1712728031126.png

 

0 Kudos

583 Views
Alex_Wang
NXP Employee
NXP Employee

Hi, @xin_ma 

You need to make sure that all the dependencies of MCXPresso for vscode are installed through the MCUXpresso Installer, and you need to import ARM GCC/mcxpresso for VS CodeSDK for the MCXN947SDK. Import the corresponding project from the SDK, please refer to the link video for details:Getting Started with MCUXpresso for Visual Studio Code | NXP Semiconductors

Attached are the steps of project import.

Best regards, Alex

0 Kudos

559 Views
xin_ma
Contributor I

I imported a repository successfully, but there was another error.

Error: Could not update "cmake-kits.json" for project "frdmmcxn947_led_blinky"

xin_ma_0-1712730721678.png

 

0 Kudos

553 Views
Alex_Wang
NXP Employee
NXP Employee

Hi, @xin_ma 

You need to install the CMake compiler from mcuxpresso installer, so try these steps:

1.

Alex_Wang_0-1712731804883.jpeg

2.

Alex_Wang_1-1712731957550.jpeg

When the installation is complete, a successful message is displayed.I have detailed installation steps in my last link.

Best regards, Alex

 

0 Kudos

538 Views
xin_ma
Contributor I

I already installed it. I also followed what you showed in the videos but failed.

 

But after I "Import Example from Repository", the error "cmake-kits.json" ocurred, and then I directly "Import Project" from the project folder created, it works. And I can build then. Didn't know what's wrong with it.

 

xin_ma_0-1712739842155.png

 

0 Kudos

556 Views
DragosMiloiu
NXP Employee
NXP Employee

Hi @xin_ma,

From the screenshot it seems that it is trying to use a different compiler.

DragosMiloiu_0-1712731343721.png

So could you please try to:

- Temporarily rename C:/MinGW folder to something else.

- After first step try rebuild. Did it help?

Thanks,

Dragos. 

 

0 Kudos

546 Views
xin_ma
Contributor I

It didn't help.

But after I "Import Example from Repository", the error "cmake-kits.json" ocurred, and then I directly "Import Project" from the project folder created, it works. And I can build then

xin_ma_0-1712739710245.png

 

0 Kudos

534 Views
DragosMiloiu
NXP Employee
NXP Employee

If, after you get the cmake-kits.json error, you go to MCUXpresso for VS code console, do you see any message that indicates why it failed?

DragosMiloiu_0-1712740367034.png

Thanks,

Dragos.

0 Kudos