- 0xB2 based dummy boot-loader is generally meant to use the ROM boot-loader with custom VID/PID. Once this is used, the device enumerates with the custom VID/PID and the ROM boot-loader firmware runs in the FX3 device. Then, the device cannot support loading another firmware image from the EEPROM/flash rather the firmware has to be loaded over USB.
- In case you need to use both a custom VID/PID and your firmware image in the same flash/EEPROM, you can use the 2-nd stage boot-loader firmware along with your main application firmware. The firmware setup will be as follows.
1. In the second stage boot-loader, implement the overwriting of the main firmware using a vendor command. Build the second stage boot-loader code using the boot library. You can refer to the Fx3BootAppGcc firmware that comes with the FX3 SDK as an example. Define the macro such that it suits the SPI/I2C boot depending on your application.
2. In the main firmware, add a vendor command to jump to the start of the 2-nd stage boot-loader. The API used for this is CyU3PUsbJumpBackToBooter(). Build your main firmware and generate the IMG file.
3. Merge the two IMG files and note the start point address of the main firmware.
4. In the second stage boot-loader, point to the address of the start point of the main firmware in the I2C read or SPI read accordingly.
When the FX3 boots-up, the ROM boot-loader loads the firmware image from the EEPROM/flash. This will be the second stage boot-loader code with your custom VID/PID. When the second stage boot-loader begins execution, it loads the main firmware image from the specified location. Now, the main firmware is up and running. When there needs to be a firmware update, issue the vendor command to jump back to second stage boot-loader and implement the over writing of the main firmware.
Please let me know if you need further information.