- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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---
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
