How to inactivate an app without deleting it

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

cross mob
User7795
Level 4
Level 4
Hi Infineon,

a new problem and a new idea.

We have a pc board with many interfaces, e.g. ethernet and ethercat, but not all customers order all interfaces. To minimize costs, the pick and place machine only places the components needed on the pc board. When no ethernet or no ethercat is ordered, then no phy is placed.

But then the original code doesn't run any more. When no eth phy is present, the code detects this, runs on ETH_LWIP_ERROR_PHY_DEVICE_ID and stops.

To solve the problem, we have to delete the app, run solver and generate code. But this approach has a big drawback: now we have to maintain as many code versions as hardware versions exist (at the moment 4 versions).
There should be a possibility to inactivate an app, which means: the app is still loaded, the solver processes the app as before and occupies the needed resources, but 'Generate Code' doesn't generate any code and the code works like if the app has not been added.
This problem appears only at interfaces which use external components the XMC checks as present.

At the moment, as workaround, we delete the generated files of ethcat or ethnet and deactivate the init call. This must be done again after each 'Generate Code'. Combined with deactivation of our own code parts accessing the apps by a compiler switch, this runs. But we would prefer an official solution like a checkbox or context menue function 'Inactivate App' and then the app is inactive and at the app tree greyed out or so. Please is there a chance for?


Best Regards
Wolfgang
0 Likes
3 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The DAVE_Init function is defined as weak function that you can override.

Regards,
Jesus
0 Likes
User7795
Level 4
Level 4
Hi Jesus,

thanks for your answer,
but fct DAVE_Init called by fct main() isn't declared weak, I think you are speaking of fct SystemInit().

I also see no chance to solve the problem via SDK. It's only a Dave internal solution possible.

Regards,
Wolfgang
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The DAVE_Init is defined as weak function in DAVE.c:

__WEAK DAVE_STATUS_t DAVE_Init(void)


Check you have the latest Device Pack installed.


Regards,
Jesus
0 Likes