1
Discussion - Software / FirmwareUpdateFATFile always returns the status ROM is invalid
« 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);
}
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);
}