Some additional delay enchance diagnostic.
Sorry, prev post was wrong:
void main()
{
ft_read_bootflag read_bootflag;
ft_write_bootflag write_bootflag;
int buf1[FLAG_BUF_SIZE];
int buf2[FLAG_BUF_SIZE];
int *boot_flag = (int*)BOOT_FLAG;
Delay(1 << 16);
LEDBLUE = LEDON;
Delay(1 << 16);
Copy();
LEDBLUE = LEDOFF;
LEDRED = LEDON;
Delay(1 << 16);
read_bootflag = (ft_read_bootflag)0x001059b0;
LEDRED = LEDOFF;
LEDBLUE= LEDON;
Delay(1 << 16);
write_bootflag = (ft_write_bootflag)0x0010586c;
LEDBLUE = LEDOFF;
LEDRED = LEDON;
Delay(1 << 16);
Zero(buf1, FLAG_BUF_SIZE);
LEDRED = LEDOFF;
LEDBLUE= LEDON;
Delay(1 << 16);
Zero(buf2, FLAG_BUF_SIZE);
LEDBLUE = LEDOFF;
LEDRED =LEDON;
Delay(1 << 16);
read_bootflag(buf1, buf2);
LEDRED = LEDOFF;
//if (buf1[0] == 0 && buf1[1] == 0 && buf1[2] == -1)
if (buf1[0] != boot_flag[0] || buf1[1] != boot_flag[1] || buf1[2] != boot_flag[2]) {
LEDBLUE = LEDOFF;
LEDRED = LEDON;
} else {
LEDBLUE = LEDON;
Delay(1 << 14);
After start upgrade first flash redled - read .firm from card. Ok, start count leds:
blue
red
blue
red
blue
red
.... and silence
Stopped at read_bootflag(buf1, buf2);