Where to add the source file(*.c and *.h) path in VS Code?

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

Where to add the source file(*.c and *.h) path in VS Code?

1,942件の閲覧回数
Lurkersoo
Contributor III

Hello, I try to use VS Code to develop MCU project. If I create some folder to store the source file(*.c and *.h), how to add the path setting in VS Code?

And how to modify the "Optimization" level?

 

Thanks!

Lurker

0 件の賞賛
返信
3 返答(返信)

1,910件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Lurkersoo 

Thanks for your valuable question.

For better help you, please tell us below informations.

1) Part number of your MCU.

2) Based on SDK driver do development?

Thanks.

 

BR

Alice

0 件の賞賛
返信

1,907件の閲覧回数
Lurkersoo
Contributor III

Hi Alice,

Please find below reply:

1) Part number of your MCU.---LPC55S69

2) Based on SDK driver do development? ---Yes, SDK 2.14.0(

"SdkRootDirPath": "c:/nxp/NXDSDK/SDK_2_14_0_LPCXpresso55S69")
 
BR,
Lurkersoo
0 件の賞賛
返信

1,824件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Lurkersoo 

Please refer to blow steps from my colleague:

"

To add a file to the project, the user will need to create the file in VSCode, then add the file path to the CMakeLists.txt manually:

Open the armgcc/CMakeLists.txt then navigate to "add_executable" command:

Alice_Yang_0-1706495488598.png

 

Then add your files shown above.

 

To add include directories to the project, add the path to the "target_include_directories" command:

Alice_Yang_1-1706495488039.png

 

 

To change the optimization level, open the armgcc/flags.cmake and edit all compiler flags accordingly:

Alice_Yang_2-1706495489077.png

 

The default optimization level for Debug build is -O0, and -Os for release build.

"

 

BR

Alice

0 件の賞賛
返信