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?

跳至解决方案
1,979 次查看
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,958 次查看
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,899 次查看
CktDesigner
Contributor IV

Thanks!!

 

0 项奖励
回复
1,959 次查看
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