How to manage SDK components in MCUXpresso for VSCode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to manage SDK components in MCUXpresso for VSCode

656件の閲覧回数
aberger
Contributor V

In MCUXpresso, if I would like to add additional peripheral drivers to a project, I can right-click on the project in the Project Explorer, and choose SDK Management > Manage SDK Components. When I choose to add a driver, the associated ".c" and ".h" files get added to the drivers folder in the Project. Now the defines, typedefs, and function signatures and definitions associated with a peripheral are browsable and usable.

In VS Code, if I choose Configure > Manage Components and check a box for a driver, it gets added to the config.cmake file with a set(CONFIG_USE_driver_<peripheral> true) entry, but the source code is not added to the project directory. This makes browsing (and therefore using) the driver code much more challenging.

Am I missing something here about adding drivers to a project?

タグ(3)
0 件の賞賛
返信
5 返答(返信)

619件の閲覧回数
Pablo_Ramos
NXP Employee
NXP Employee

Hi @aberger,

Could you please share which MCU you are using?

Are you working with an empty project or starting from an example?

How are you importing the SDK into VS Code?

I ran some tests using an LPC device and noticed that when I added a driver, it was indeed added to the config.cmake file, as you mentioned.

However, when checking the driver's .cmake file (<peripheral>.<MCU>.cmake), I saw that the included component is fsl_<peripheral>.

Also, in the project's driver folder, the corresponding fsl_<peripheral> files were added when I build the project.

Could you check whether importing a peripheral the way you're doing causes any changes in the project's driver folder after building?

Best Regards,

Pablo

0 件の賞賛
返信

568件の閲覧回数
aberger
Contributor V

Hi @Pablo_Ramos ,

I am using SDK_25_06_00_EVKB-IMXRT1050 for the MIMXRT1052DVL6B.

Attached is a project that I created with "Import Example from Repository". I started with the hello_world exampled. After the import, I tried to add the flexio and pit drivers with `Configure > Manage Components`. 

They show up in the config.cmake file:

set(CONFIG_USE_driver_flexio true)
set(CONFIG_USE_driver_pit true)

 

But the pit and flexio headers (.h) and source (.c) files are nowhere to be found in my Project folders:

aberger_2-1753223152344.png

Unless I dig into the __repo__ folder (where all of the drivers are included)

aberger_1-1753223128281.png

Furthermore, if I revisit `Configure > Manage Components`, the pit and flexio drivers are now simply not listed, instead of being listed with a checkbox next to them, which is what I would expect. 

aberger_3-1753223247894.png

 

 

0 件の賞賛
返信

424件の閲覧回数
Pablo_Ramos
NXP Employee
NXP Employee

Hi @aberger,

You can find the folder containing the SDK components of your project at the following path:

<Project>\armgcc\debug\CMakeFiles\<Project Name>.elf.dir\C_\Users\<Your User>\Documents\<SDK Folder>\<SDK>\devices\<Device>\drivers

As you can see, when you add an SDK component and build the project, it will be included in the drivers folder.

Best Regards,
Pablo

0 件の賞賛
返信

359件の閲覧回数
aberger
Contributor V

The debug folder does have something like what you say, but these are .obj and .su files. These are not useful, readable headers and source code, but actual build output. 

Separately, they are not located quite at the directory you mentioned, but instead at

<Project>\armgcc\debug\CMakeFiles\<Project Name>.elf.dir\de68a065d0a3c624208ed26914120a9f\devices\MIMXRT1052

I am used to being able to easily see which drivers are included in an MCUXpresso project in the "Manage SDK components" dialog

aberger_1-1754937092783.png

and then having the source code appear in the drivers folder:

aberger_2-1754937154134.png

It's painful if VSCode does not make the source code browsable and viewable like this.

 

0 件の賞賛
返信

321件の閲覧回数
Pablo_Ramos
NXP Employee
NXP Employee

Hi @aberger,

Thanks for the feedback.

The idea behind MCUXpresso with VSCode was to avoid having multiple projects with the same files. That’s why only the .obj and .su files were included.

That said, I’ll share your feedback with the internal team. If you encounter any other concerns, feel free to share them in the community.

Best Regards,
Pablo

0 件の賞賛
返信