Where do I enter a "post-build" step (script) when using MCUXpresso for VS Code?

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

Where do I enter a "post-build" step (script) when using MCUXpresso for VS Code?

ソリューションへジャンプ
2,011件の閲覧回数
CktDesigner
Contributor IV

I converted a project from the MCUXpresso IDE to MCUXpresso for VS Code.   I have everything working except for the "post-build" steps...

In MCUXpresso, post-build steps can be specified in Properties->C/C++Build-?Settings->BuildSteps

Where is the equivalent in the VS Code version?

Thanks! 

0 件の賞賛
返信
1 解決策
1,990件の閲覧回数
cristiantepus
NXP Employee
NXP Employee

Hi,

We did not implement this to be automatically done yet. We'll add it in a future release. Till then, you can work around the issue by adding a custom command with post build step (in CMakeLists.txt) like in the example below:

ADD_CUSTOM_COMMAND(TARGET ${MCUX_SDK_PROJECT_NAME} POST_BUILD COMMAND echo ${EXECUTABLE_OUTPUT_PATH}/${MCUX_SDK_PROJECT_NAME})
 

cristiantepus_0-1721725192740.png

Some other example, if you import from SDK a multicore project, core1 is generating a bin from an executable file in a similar post build command:

ADD_CUSTOM_COMMAND(TARGET ${MCUX_SDK_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_OBJCOPY}
-Obinary ${EXECUTABLE_OUTPUT_PATH}/${MCUX_SDK_PROJECT_NAME} ${EXECUTABLE_OUTPUT_PATH}/core1_image.bin)

Regards,

Cristian

元の投稿で解決策を見る

2 返答(返信)
1,931件の閲覧回数
CktDesigner
Contributor IV

Thanks!!

 

0 件の賞賛
返信
1,991件の閲覧回数
cristiantepus
NXP Employee
NXP Employee

Hi,

We did not implement this to be automatically done yet. We'll add it in a future release. Till then, you can work around the issue by adding a custom command with post build step (in CMakeLists.txt) like in the example below:

ADD_CUSTOM_COMMAND(TARGET ${MCUX_SDK_PROJECT_NAME} POST_BUILD COMMAND echo ${EXECUTABLE_OUTPUT_PATH}/${MCUX_SDK_PROJECT_NAME})
 

cristiantepus_0-1721725192740.png

Some other example, if you import from SDK a multicore project, core1 is generating a bin from an executable file in a similar post build command:

ADD_CUSTOM_COMMAND(TARGET ${MCUX_SDK_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_OBJCOPY}
-Obinary ${EXECUTABLE_OUTPUT_PATH}/${MCUX_SDK_PROJECT_NAME} ${EXECUTABLE_OUTPUT_PATH}/core1_image.bin)

Regards,

Cristian