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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
488 Views
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 Kudos
Reply
1 Solution
467 Views
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

View solution in original post

2 Replies
408 Views
CktDesigner
Contributor IV

Thanks!!

 

0 Kudos
Reply
468 Views
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