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

Software Config Control

Altera_Forum
Honored Contributor II
983 Views

Hi all, 

 

I'm wanting to keep track of software builds. What I do on other platforms, is run an executable that increments a number stored in a file called version.h. Thus the executable reads the current number, increments it by 1 and then writes it back. Then in my code, I read the number as a string from that header file.  

 

I need to run the executable everytime I build my project. (I'm sure there must be place to specify any command lines to be executed before/after building the project) 

 

I'm using the NIOS IDE. Does anybody have any suggestions??? 

 

Regards, 

Tyrone
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
282 Views

Search for topic "touch file" 

This shows how to add a make file that will run the commands of your choice on every build. I use it to update the build time and date in my source code.
0 Kudos
Altera_Forum
Honored Contributor II
282 Views

Select project/properties from menu (or by right clicking your your project). In the properties select Builders and add a new builder before "altera generated makefile builder'". You can specify any command you like and your command is executed at every build before altera makefile.

0 Kudos
Altera_Forum
Honored Contributor II
282 Views

 

--- Quote Start ---  

originally posted by keijo@Jun 1 2006, 07:45 AM 

select project/properties from menu (or by right clicking your your project). in the properties select builders and add a new builder before "altera generated makefile builder'". you can specify any command you like and your command is executed at every build before altera makefile. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15740) 

--- quote end ---  

 

--- Quote End ---  

 

 

Thanx keijo, 

 

It seems to work great. Only thing is that when I rebuild it seems like the .EXE is runs twice as my version number increments by 2 everytime. It&#39;s not critical though, as long as I have something for now! 

 

Cheers, 

Tyrone
0 Kudos
Reply