The Bootloader project will not know the information about the Bootloadable until the Bootloadable project is loaded completely.
So, it could not stop the process in the middle.
For your case, you need to design custom software that adds one more layer to the Bootloader host application and the Bootloader project to check the version of the Bootloadable project. This layer can be implemented using an I2C transfer of few bytes to the Bootloader project and there the project will call the actual Bootloader Start() function to initiate actual Bootloading process.
Ganesh has the best solution of modifying the Bootloader host SW only on the newer HW to accept a "minimum" version of the Bootloadable.
This requires that you either send a preface packet of data that contains the FW build # or in the Bootloadable image, the FW build # is included in a specific location in the image.
Note: This method does not prevent loading the newer Bootloadable into the OLD HW. I hope this is OK.
Here's another modification of the suggestion from Ganesh.
The FW build # can be multi-layered. One of the layers can be encoding the HW revision the FW applies to. For example:
Build = HHH.vvv.RRR.sss
HHH = Hardware version #
vvv = SW version #
RRR = SW revision #
sss = SW release #
With the HHH you can have the Bootloader ONLY allow Bootloadable SW loading if it matches the Bootloader HHH.
Just a thought.
Ganesh & Len,
Thanks for the replies. I discussed this with my local FAE and there is another solution which I am considering:
1. There is a Bootloader Application Version in the Bootloader component.
2. There are also 3 fields in the Bootloadable component (Application version, Application ID, Application custom ID).
3. None of these are very well documented as to what we should or should not use them for.
4. All of these values end up in the Metadata which is in the last 64 bytes of Flash - and they all default to hex 0. They also are in the CYACD file. So here is what I was thinking:
In my new version of the Bootloader I add the optional "Get metadata" command. If I then required the Bootloader Application Version and the Bootloadable Application version to match, I can control whether to update the FW from my Host application. If the Host talks to an old unit where the Get Metadata command is not available it will get an error and I can assume it is version 0x0000 (which was the default that I never changed for the Bootloader Application Version).
I just wish this topic would have been addressed in the documentation. Even the Intro to Bootloaders App Note didn't cover this in it's "Future Proofing" section - seems like it should. Can Cypress address this?
Looks like you might have a solution.