Skip to content
Snippets Groups Projects
Commit a7ef0e84 authored by schneider's avatar schneider
Browse files

fix(bootloader): Add support for the whole 1 MB flash

parent 64a81fef
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,8 @@
#define GPIO_PORT_IN PORT_1
#define GPIO_PIN_IN PIN_6
#define PARTITION_START (0x10000000 + 64 * 1024)
#define PARTITION_END (0x10000000 + 512 * 1024 - 1) /* TODO: check if 1 MB also works. Might have to enable the second bank */
//#define PARTITION_END (0x10000000 + 1024 * 1024 - 1)
#define PARTITION_END (0x10000000 + 1024 * 1024 - 1)
extern void run_usbmsc(void);
......@@ -188,13 +186,14 @@ int main(void)
while(1);
}
//MXC_FLC0->clkdiv = 96;
//MXC_FLC0->clkdiv = 96;
if(mount()) {
if(check_integrity()) {
printf("Found valid application image\n");
if(is_update_needed()) {
printf("Trying to update application from external flash\n");
MXC_FLC0->clkdiv = 54;
erase_partition();
flash_partition();
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment