"Post-build steps" after "Cross ARM GNU Flash Image"

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

"Post-build steps" after "Cross ARM GNU Flash Image"

ソリューションへジャンプ
4,472件の閲覧回数
ocmonte
Contributor III

Hello Group!

 

Is there a way to invoke a "Post-build steps" after the IDE calls the "Cross ARM GNU Flash Image"? I have a script that needs to run against the SREC file that gets generated. However, my "post-build step" script is run before the  "Cross ARM GNU Flash Image" and thus, the SREC file has not been created yet.

 

This once worked with the CW tools. Any hints would be appreciated!

 

TIA

 

Cheers,

 

Monte---

ラベル(1)
0 件の賞賛
返信
1 解決策
3,404件の閲覧回数
davidsherman
Senior Contributor I

If it's any help, I had to "massage" the s-record to split it into two sections, so I invoke objcopy to convert the .elf file and generate two s-record files.  I add this on the build steps page, and use the & to add another step:

${cross_prefix}objcopy -O srec project.elf project.srec&<add another step here>

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
3,405件の閲覧回数
davidsherman
Senior Contributor I

If it's any help, I had to "massage" the s-record to split it into two sections, so I invoke objcopy to convert the .elf file and generate two s-record files.  I add this on the build steps page, and use the & to add another step:

${cross_prefix}objcopy -O srec project.elf project.srec&<add another step here>

0 件の賞賛
返信
3,404件の閲覧回数
ocmonte
Contributor III

I tried it - but no luck. I tired my commend followed by an "echo done". Good suggestion but lo luck.

My post build command with the extra echo:

python ${WorkspaceDirPath}/../Scripts/buildInstallImage.py --file ${BuildLocation}/${BuildArtifactFileBaseName}.srec --output ${BuildLocation}/${BuildArtifactFileBaseName}.bin&echo done

Below is the order how the IDE builds.The post-build is invoked after the link:

'Building target: CloverleafOG.elf'

'Invoking: Cross ARM C++ Linker'

make --no-print-directory post-build

'Invoking: Cross ARM GNU Create Flash Image'

0 件の賞賛
返信
3,404件の閲覧回数
ocmonte
Contributor III

I see the thinking here. Disable the "Create flash image" in the "Toolchains" and invoke the flash image creation and any other items in the post-build.

Dave had the right idea, Erich kick started my brain.

Thanks!

0 件の賞賛
返信
3,404件の閲覧回数
davidsherman
Senior Contributor I

Yes, sorry about that, I should have elaborated that I had to turn off the flash generation and use other means of doing what I intended, for the same reason.

0 件の賞賛
返信
3,404件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Yes, you can run multiple build steps as in the previous reply. However, the syntax depends if you are using windows or Linux, see Executing Multiple Commands as Post-Build Steps in Eclipse | MCU on Eclipse

Erich

0 件の賞賛
返信