Exclude APP from DAVE_INIT()

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User14346
Level 1
Level 1
Hello,

is it possible to exclude an app from DAVE_INIT() ?
I want to initialize a certain app at a certain point in the program.
Since content of DAVE_INIT() will be overwritten with every code-generation, deleting (cutting) this certain "app-init" does not work.

hopefully someone knows a workaround for this...or can tell me where to efficiently delete the "app-init".

cheers dave

DAVE 4, XMC1100/4500
0 Likes
3 Replies
User13817
Level 3
Level 3
You can remove the line and build only your project.
If you delete the line (or comment), build and run the project the file won't be overwritten because Dave was not asked to perform a new code-generation process.

I tried here and it worked.
Order: Add the Apps -> Code-Generation tool -> Delete or comment app-init -> Build (only build) -> Run
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The DAVE_Init() is called from your main.c. You can write your own DAVE_InitEx() and called instead of the generated one.

Regards,
Jesus
0 Likes
User15250
Level 1
Level 1
Another possible approach is acting upon the order in which apps are initialized in Dave.c. This order depend on the "history" of your apps addition in the project and is recorded into Dave\Model\ModelConfigData.data
Manually changing ModelConfigData.data is fairly unwise, so the only stable solution is removing an app and then immediately reinserting it. This stores the app at the end of the list.
The advantage of this approach is that once the trick is done you can safely regenerate the apps code as you need.
All the best
Riccardo
0 Likes