FTDI Community
General Category => Discussion - Software => Topic started by: xenon68 on November 30, 2022, 01:11:00 am
-
Using the project FirmwareUpdateApp as an example in my code below. Using either the function FirmwareUpdateFATFileFeedback or FirmwareUpdateFATFile the both don't accept the ROM files. I have used ROMs from my own projects and even the ROMs from install of Vinculum II IDE install 2.
First I have flashed the reflasher using:
VinPrg.exe ReflashFATFile.rom -o 0x1f000 -d "VII Debugger Module"
Then I run my application, select a ROM file that the linker has created and immediately returns from the FirmwareUpdateFATFileFeedback call. The status is the ROM is invalid.
The return from the updating function is always FIRMWARE_UPDATE_INVALID_FILE.
Any suggestions what could be going wrong?
file = fopen("FWUPDATE.ROM", "r");
if (file == NULL)
{
puts1USART("@File not found@");
}
else
{
puts1USART("@Calling firmware update@");
//#define REFLASHER_OFFSET 0x1f000
//#define FEEDBACK FIRMWARE_UPDATE_FEEDBACK_UART | FIRMWARE_UPDATE_FEEDBACK_GPIO_A2
//status = FirmwareUpdateFATFileFeedback(file, REFLASHER_OFFSET, FEEDBACK);
status = FirmwareUpdateFATFile(file, REFLASHER_OFFSET);
if(status == FIRMWARE_UPDATE_INVALID_FILE) {
puts1USART("@INVALID FILE@");
}
puts1USART("@Returned@");
fclose(file);
}
-
Hello,
This is the correct example to use:
C:\Users\Username\Documents\FTDI\Firmware\Samples\V2.0.2-SP2\General\FirmwareUpdate
Also refer to AN_159 Vinculum-II Firmware Flash Programming (https://ftdichip.com/wp-content/uploads/2020/08/AN_159-Vinculum-II-Firmware-Flash-Programming.pdf) for more information.
Please note the restriction in the example readme:
Fragmented ROM files not supported. Do "CHKDSK <filename>" from command line to check.
This has been tested by FTDI and is working.
There may be other FTDI Community users who can help you further.
Best Regards,
FTDI Community