Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Post-build Step not working

Altera_Forum
Honored Contributor II
876 Views

In NIOS EDS 9.0SP2 I have defined a Post-build Step command to perform a final conversion of the generated .elf file. 

 

However, nothing seems to happen. No message in the console, no visible action either. As simple test I have used "mkdir hello" and can't see any such dir after completion of the compilation. 

 

Is there anything else to be done to get the post-build command to be executed ? 

 

note: The same is also happening for the Pre-build Step. 

 

Thanks for your help. 

P9
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
108 Views

I know it works in 9.1. However, the variables are called "BUILD_PRE_PROCESS" and "BUILD_POST_PROCESS". Can you post your makefile so we can take a look at it? 

 

Jake
Altera_Forum
Honored Contributor II
108 Views

Here is it along with the .cdbuild

Altera_Forum
Honored Contributor II
108 Views

Truth be told I haven't used the regular NIOS IDE since 7.1. I was not aware of any place where you could enter post-build commands.  

 

Here is what I do remember doing. You have to add an external tool run configuration: 

1 - Run->External Tools...->External Tool Configurations. 

2 - Create a new program run configuration that performs whatever it is you're trying to do. You can use workspace and project variables. Under the "Build Options" tab make sure you correctly set the program up to run when you want it to (During manual builds, auto builds, cleans, etc.). 

3 - Now for the software project you want to run the program for. Right click on the project and click "Properties". Once the Properties dialog opens click on the "Builders" section on the left-hand side. Now click the "Import" button. Then select the run configuration for the program that you created in step 2. Make sure it's the last in the list of builders. 

 

Now when your build completes, that program should run automatically. 

 

Or you could upgrade to 9.1 and start using the new tool flow which in my opinion is much better. 

 

Jake
Altera_Forum
Honored Contributor II
108 Views

The external tool method seems to work well. I will explore further this solution. 

 

Next monday I will also install v9.1 and try it out. 

 

Thanks for your help! 

P9
Altera_Forum
Honored Contributor II
108 Views

Hi Jake, 

 

after monthes of hard work I finally found some time to upgrade to Q_9.1_SP2. 

 

I found out that the "BUILD_PRE_PROCESS" and "BUILD_POST_PROCESS" can easily be set for the BSP through the variable hal.make.build_pre_process and hal.make.build_post_process. However I can't find how to do the same for the main application. 

 

Even though the variables "BUILD_PRE_PROCESS" and "BUILD_POST_PROCESS" are present in the makefile, I can't find the place in the gui where I should set their value. 

Manually setting the value of eg. BUILD_POST_PROCESS in the makefile triggers the action at the end of the build, resulting in the needed convertion of the .elf file. Thus, I'm just missing one small step to the goal. 

 

Hopefully you have a hint for me... 

 

Regards, 

P9
Altera_Forum
Honored Contributor II
108 Views

Found it! 

 

1) close the IDE 

2) edit lines defining BUILD_PRE_PROCESS and BUILD_POST_PROCESS in the Makefile 

3) reopen and use the IDE -> it does not seem to throw away the changes 

4) corollary : do not forget to put the Makefile under version control... 

 

P9
Altera_Forum
Honored Contributor II
108 Views

 

--- Quote Start ---  

Found it!  

1) close the IDE 

2) edit lines defining BUILD_PRE_PROCESS and BUILD_POST_PROCESS in the Makefile 

3) reopen and use the IDE -> it does not seem to throw away the changes 

4) corollary : do not forget to put the Makefile under version control... 

P9 

--- Quote End ---  

 

 

example: 

BUILD_POST_PROCESS := sh script_file0.sh  

BUILD_POST_PROCESS += sh script_file1.sh
Reply