Manual Pre-Post External Commands ... a start

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        Like many people I have been looking for a way to automatically execute some commands or batch files before or after a build. I'm still looking at automagically but I've found a technique that works manually. By adding .pl to the external file extensions, adding a "Perl Scripts" folder to the project, and adding a perl script to the folder "makefsdata.pl" I am able to with one click regenerate the fsdata.inc file needed to contain my webpages for a PSoC5lp, ENC424, lwIP, HTTPD webserver project. I will also be adding other perl scripts to descend down the long project tree to the .cyacd file and copy/move it to a central place for my bootloader for easier navigation. Take a look at the attached screen shot. The black box is the execution window for the perl script. I add a wait for input at the end of the script to make it pause and wait for a carriage return so I can see the process. More details, examples, instructions, how-tos coming soon. Right now you have to custom code paths etc into the perl script. If I can find ways to access the default path for the project and GCC output then we can make it more automagic and versatile. -Ed   
0 Likes
4 Replies
Anonymous
Not applicable

Nice

0 Likes
kep_284046
Level 2
Level 2
First like given

Hi,

   

Can you share sample project ?

0 Likes
Anonymous
Not applicable

i tried to post a link to the "Trials & Tribulations" post i did a few weeks ago ... block by spam filter!!

   

look farther down for it ...

0 Likes
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Thanks for the write-up!

   

i just discovered clang-format tool and the pre and post external commands came to my mind, i successfully used it on a test main.c file, will try to see if it can format the auto-generated code (i doubt so).

0 Likes