The problem seems to come from the loader, as it systematically write the flag of the active application in the stack metadata, at every system power on (on upgradeable stack or dual application).
If a power off occurs during this flash write (bouncing battery contact for example), it erases the all stack metadata or corrupts it. This leaves your product dead. Need to reload with SWD the program.
We solved this big problem (as our product is in a glued casing) by duplicating the launcher.c and call the renamed functions with a modification to prevent writing the same information over in flash.
This works fine but isn't there a way to correct a bug in an autogenerated file without duplicating everything and call the new function ?
We apologize for the inconvenience caused. We will create an internal ticket based on your inputs, to explore if better solutions are possible. Thanks for letting us know about the issue and the way you worked around it.
Seems the patch above has not been integrated in the last PSOC update.
Do I need to create a case to make sure this is implemented in the next release ?
Thanks for letting me know.