Could you please confirm that by the first question you would like to know the parts of the code that can be optimized to fit in the same two copies in the Flash?
And for the second question do they want an option to boot from external flash?
Any links to application notes or examples utilizing dual copies of firmware in CCGx parts would be helpful.
By the first question, I was asking if enough source code was provided, such that a user could optimize the code. I'm not clear how much of the code written for CCGx devices is fixed and how much is open source.
I do like the suggestion in your response. Knowing the parts of the code that can be optimized to fit in the same two copies of Flash, would accomplish the same end result. An example showing what subset of features could fit side by side, would be useful.
Booting from external flash is an additional feature I hadn't considered. If that is possible are there any examples?
The primary question with external flash I had is if there are examples to store and retrieve a copy of firmware using external flash. I do now see, if an extra copy of firmware was stored in external flash, the CCGx part would either need to be able to execute from external flash or have a fail-safe process to boot if there was a crash during the process of copying external flash to internal.
1 of 1 people found this helpful
Please refer to section 5.4 of the CCGx Host SDK User Guide that explains the Flash Memory Map of the CCG4/CCG5/CCG6 devices and also mentions how the dual copies are implemented in the SDK projects for those devices.
The features of the primary and backup firmware that are mentioned in the release notes are configurable using the compile time macros in config.h file for the two projects. Currently, in the CYPD4126-24LQXI project, the primary firmware takes up around 72KB while the backup firmware takes up around 46KB of Flash. The customer could customize both the projects to have the same features for e.g. enable PD command support over HPI for the backup firmware while disabling UCSI support in the primary firmware. This would optimize the Flash usage with both the firmware images present.
Currently there are no examples in the Host SDK of CCGx devices adding an external flash to boot from, as it would require a custom bootloader implementation as well.