nxp-mcuxpresso / vscode-for-mcux

Support for NXP Visual Studio Code for MCUXpresso Extension project.
17 stars 1 forks source link

Manage components not working in SDK v2.15.000 #31

Open OyvindNNL opened 8 months ago

OyvindNNL commented 8 months ago

When I open "Manage Components", select a component and click OK, nothing happens. The dialog does not close and no CONFIG_USE_x statements are added to config.make in the armgcc folder.

I get the following in Output->Extension Host each time I click the OK button:

2024-01-25 14:59:40.793 [error] TypeError: Cannot read properties of undefined (reading 'type')
    at Lp.logicConstraintToTerm (c:\Users\oyvinha\.vscode\extensions\nxpsemiconductors.mcuxpresso-1.4.63\dist\extension.js:2:880188)
    at Lp.getProblem (c:\Users\oyvinha\.vscode\extensions\nxpsemiconductors.mcuxpresso-1.4.63\dist\extension.js:2:880082)
    at Lp.getDependencies (c:\Users\oyvinha\.vscode\extensions\nxpsemiconductors.mcuxpresso-1.4.63\dist\extension.js:2:879240)
    at f.value (c:\Users\oyvinha\.vscode\extensions\nxpsemiconductors.mcuxpresso-1.4.63\dist\extension.js:2:1044267)

If I use SDK 2.14.0 instead, everything works as expected if I have an armgcc folder with CMakeList.txt and config.make.



I tried (for SDK 2.14.0) to move CMakeList.txt, config.make, flags.make, and linker script to the top-level, and delete the armgcc folder. After altering the paths in CMakeList.txt and settings.json, everything compiles. However, when I try to add a component, I get the following in Output->Extension Host:

2024-01-25 15:18:40.376 [error] Error: ENOENT: no such file or directory, open 'c:\nxp\ah_proto\armgcc\CMakeLists.txt'

If I add an empty armgcc folder, CMakeList.txt is added inside the folder with a component include statement (instead of CONFIG_USE_x). If I also add the config.make file to the armgcc folder, the CONFIG_USE_X statement is added in the config.make file instead as expected.

It seems the extension is looking for CMakeList.tx/config.make in the armgcc folder, regardless of the cmake.sourceDirectory setting in settings.json.

DragosMiloiuNXP commented 8 months ago

Hi @OyvindNNL,

This will be addressed in the next version which will be released shortly.

Regards, Dragos.

DragosMiloiuNXP commented 8 months ago

This issue is fixed in the latest version (v1.5.85) that was published today.

OyvindNNL commented 8 months ago

Thank you. Managing components in SDK 2.15 now works as expected.

The second part, moving the CMakeList.txt out of the armgcc folder, does not work with SDK 2.15 either and shows the same issues as for SDK 2.14. There seems to be a hardcoding of the armgcc folder instead of using the "cmake.sourceDirectory" setting when managing components.