Skip to content

Commit

Permalink
Add flash loader core id and chipid for STM32F767ZI with nucleo-144
Browse files Browse the repository at this point in the history
  • Loading branch information
xor-gate committed Jun 18, 2016
1 parent dfeb5a4 commit 5a06869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/stlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extern "C" {
/* cortex core ids */
// TODO clean this up...
#define STM32VL_CORE_ID 0x1ba01477
#define STM32F7_CORE_ID 0x5ba02477

// Constant STM32 memory map figures
#define STM32_FLASH_BASE 0x08000000
Expand Down
7 changes: 4 additions & 3 deletions src/flash_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t*
|| sl->chip_id == STLINK_CHIPID_STM32_L0 || sl->chip_id == STLINK_CHIPID_STM32_L0_CAT5 || sl->chip_id == STLINK_CHIPID_STM32_L0_CAT2) { /* stm32l */
loader_code = loader_code_stm32l;
loader_size = sizeof(loader_code_stm32l);
} else if (sl->core_id == STM32VL_CORE_ID
} else if (sl->core_id == STM32VL_CORE_ID
|| sl->chip_id == STLINK_CHIPID_STM32_F3
|| sl->chip_id == STLINK_CHIPID_STM32_F3_SMALL
|| sl->chip_id == STLINK_CHIPID_STM32_F303_HIGH
Expand Down Expand Up @@ -231,7 +231,8 @@ int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t*
loader_code = loader_code_stm32f4_lv;
loader_size = sizeof(loader_code_stm32f4_lv);
}
} else if (sl->chip_id == STLINK_CHIPID_STM32_F7 ||
} else if (sl->core_id == STM32F7_CORE_ID ||
sl->chip_id == STLINK_CHIPID_STM32_F7 ||
sl->chip_id == STLINK_CHIPID_STM32_F7XXXX) {
loader_code = loader_code_stm32f7;
loader_size = sizeof(loader_code_stm32f7);
Expand All @@ -242,7 +243,7 @@ int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t*
loader_code = loader_code_stm32l4;
loader_size = sizeof(loader_code_stm32l4);
} else {
ELOG("unknown coreid, not sure what flash loader to use, aborting!: %x\n", sl->core_id);
ELOG("unknown coreid, not sure what flash loader to use, aborting! coreid: %x, chipid: %x\n", sl->core_id, sl->chip_id);
return -1;
}

Expand Down

0 comments on commit 5a06869

Please sign in to comment.