|Re: Packing [message #2165 is a reply to message #2106]
||Mon, 20 April 2009 20:38
| Dave Russo
Registered: July 2009
> I have 4 separate image for 4 samples (test cases)
> I want them in one single image and how do i proceed with the .bld ,
> .cfg , .xdc files etc,
If I understand your question, you want to take 4 currently separate
executables (test programs) and combine them int a single executable
that performs the 4 tests.
The first thing you'll have to do is create a single .cfg file that
works for all four tests; each executable has just one config file.
Depending on the current .cfg files, you may have to defer some
operations to runtime.
Once you have a single .cfg for each program, you'll have to rename
main() in each test to a unique name and create a new main() that simply
calls the newly named main()'s as necessary. This new main() and the
new .cfg can be used to create a new executable that runs all 4 tests.
For what it's worth: Each module can have a main() method and this main
method can be configured to be the executable's main entry point;
So what? Well, if you follow this pattern it is relatively easy to
create an executable that runs a module's test _or_ create a test that
runs more than one module test. This allows you to maintain and run the
original tests one at a time; sometimes useful when dealing with
resource constrained platforms or when you are trying to debug why a
test fails. At the same time one can easily create a single test that
runs multiple tests without having to modify the original tests (because
as module methods each main function has a unique name that is easily
called from an application.
> i thought of making all the samples as lib file and calling all of them
> for main function in single module,
> Any help would be highly appreciated
Powered by FUDForum
. Page generated in 0.01945 seconds