Last but not least article from that serie, we will look on the way to customize the build without impacting the BSP files. This will ensure that only your current OSDesign is the one impacting its own runtime image.
We are going to use the batch files and same technics as the one described in the previous articles, except that all the scripts and configuration files will be located inside a OSDesign Subproject. By creating a generic Subproject you will be able to reuse it on various projects OSDesign.
So first we do have to create a Subproject, which require to open an existing OSDesign in Visual Studio. For this you have to proceed as following :
- From VS2008 Project menu, select Add New Subproject
- Select WCE Console Application project template and name it BuildTweaker
- Hit next and select An empty subproject
- It should add a new subproject to the OSDesign
- Edit the sources files of the BuildTweaker project and replace (at line 20) TARGETTYPE=PROGRAM to TARGETTYPE=NOTARGET, to ensure that it won't look for source code to compile.
The batch files to be executed during the make image step have to be located in the Flat Release Directory (%_FLATRELEASEDIR%), then to get those files copied to the appropriate folder on time, we can modify the postbuild.bat file of the project.
- Create the batch files and store them into the BuildTweaker\batch folder.
- Edit the postbuild.bat file
@REM Add post-link commands below.
@echo off
echo copying batch files
copy "%_OSDESIGNROOT%\BuildTweaker\batch\*.*" "%_PROJECTROOT%\cesysgen\oak\target\%_TGTCPU%\%WINCEDEBUG%"
copy "%_OSDESIGNROOT%\BuildTweaker\batch\*.*" "%_FLATRELEASEDIR%"
- Nicolas
- Nicolas
No comments:
Post a Comment