Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314349 - configuro can cause unnecessary runs of configuration scripts
Summary: configuro can cause unnecessary runs of configuration scripts
Status: CLOSED WORKSFORME
Alias: None
Product: RTSC
Classification: Technology
Component: Tools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard: targets: 3.25.00
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-05-25 15:53 EDT by Dave Russo CLA
Modified: 2013-04-04 17:07 EDT (History)
2 users (show)

See Also:


Attachments
CCS 4.2 project illustrating multiple config runs (9.55 KB, application/zip)
2010-05-25 16:24 EDT, Dave Russo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Russo CLA 2010-05-25 15:53:30 EDT
It looks like the following sequence will trigger unnecessary runs of the configuration step:
1.	clean rebuild of an application project containing app.cfg
2.	touch app.cfg
3.	build project (configuration runs as expected)
4.	without any change to app.cfg, build project again and notice that configuration is re-run.

There is (arguably) a bug in the configuro/xdc integration that causes the configuration step to re-run:  changing the following line of xdc/tools/configuro/template/custom.make.exe.xdt from
    .configuro: `this.linkerCommandFile`  \
to 
    .configuro: .libraries,`suff` `this.linkerCommandFile`  \
"fixes" the problem.

Why?  Because the generated package.mak declares that big.c depends on .libraries,`suff` (to ensure any libraries are built _before_ the config step).
Comment 1 Dave Russo CLA 2010-05-25 16:05:48 EDT
more explaination: 

1. the generated package.mak declares that big.c depends on .libraries,`suff` (as a "hack" to ensure any libraries are built _before_ the config step)

2. the .configuro goal in custom.mak (generated by xdctools_3_20_00_36) only triggers the generation of big.c.

3. any re-run of configro will see that big.c depends on .libraries,* and will necessarily re-run the configuration step.

Finally, configuro is re-run even though app.cfg has not changed because the managed make makefile declare that configPkg/compile.opts depends on app.cfg but the compile.opts files is _not_ updated unless its contents change.

So, there are several possible "fixes":
    1. fix xdc to not generate the .libraries,* dependency when there are 
       no libraries
    2. "fix" configuro to add the appropriate dependency
    3. fix CCS managed make to use configPkg/linker.cmd in lieu of compile.opts since the linker command file is always updated.
Comment 2 Dave Russo CLA 2010-05-25 16:24:54 EDT
Created attachment 169896 [details]
CCS 4.2 project illustrating multiple config runs
Comment 3 Dave Russo CLA 2012-06-04 16:35:24 EDT
In CCS 5.2 with xdctools 3.23.03, the configuration step is not re-run.