Line 200... |
Line 200... |
|
|
/**********************************************************************//**
|
/**********************************************************************//**
|
* This global variable keeps the size of the available executable in bytes.
|
* This global variable keeps the size of the available executable in bytes.
|
* If =0 no executable is available (yet).
|
* If =0 no executable is available (yet).
|
**************************************************************************/
|
**************************************************************************/
|
volatile uint32_t exe_available = 0;
|
volatile uint32_t exe_available;
|
|
|
|
|
/**********************************************************************//**
|
/**********************************************************************//**
|
* Only set during executable fetch (required for capturing STORE BUS-TIMOUT exception).
|
* Only set during executable fetch (required for capturing STORE BUS-TIMOUT exception).
|
**************************************************************************/
|
**************************************************************************/
|
volatile uint32_t getting_exe = 0;
|
volatile uint32_t getting_exe;
|
|
|
|
|
// Function prototypes
|
// Function prototypes
|
void __attribute__((__interrupt__)) bootloader_trap_handler(void);
|
void __attribute__((__interrupt__)) bootloader_trap_handler(void);
|
void print_help(void);
|
void print_help(void);
|
Line 685... |
Line 685... |
if (src == EXE_STREAM_UART) {
|
if (src == EXE_STREAM_UART) {
|
data.uint8[i] = (uint8_t)PRINT_GETC();
|
data.uint8[i] = (uint8_t)PRINT_GETC();
|
}
|
}
|
#if (SPI_EN != 0)
|
#if (SPI_EN != 0)
|
else {
|
else {
|
data.uint8[i] = spi_flash_read_byte(addr + i);
|
data.uint8[i] = spi_flash_read_byte(addr + (3-i));
|
}
|
}
|
#endif
|
#endif
|
}
|
}
|
|
|
return data.uint32;
|
return data.uint32;
|
Line 807... |
Line 807... |
|
|
data.uint32 = wdata;
|
data.uint32 = wdata;
|
|
|
int i;
|
int i;
|
for (i=0; i<4; i++) {
|
for (i=0; i<4; i++) {
|
spi_flash_write_byte(addr + i, data.uint8[i]);
|
spi_flash_write_byte(addr + (3-i), data.uint8[i]);
|
}
|
}
|
#endif
|
#endif
|
}
|
}
|
|
|
|
|