fprintf(stdout, "Erase Final CR:0x%x\n", read_flash_cr(sl));
#endif
}
- else if (sl->core_id == STM32L_CORE_ID)
+ else if (sl->chip_id == STM32_CHIPID_L1_MEDIUM)
{
uint32_t val;
const uint8_t* loader_code;
size_t loader_size;
- if (sl->core_id == STM32L_CORE_ID) /* stm32l */
+ if (sl->chip_id == STM32_CHIPID_L1_MEDIUM) /* stm32l */
{
loader_code = loader_code_stm32l;
loader_size = sizeof(loader_code_stm32l);
} //STM32F4END
- else if (sl->core_id == STM32L_CORE_ID) {
+ else if (sl->chip_id == STM32_CHIPID_L1_MEDIUM) {
/* use fast word write. todo: half page. */
uint32_t val;
return -1;
}
- if (sl->core_id == STM32L_CORE_ID) {
+ if (sl->chip_id == STM32_CHIPID_L1_MEDIUM) {
size_t count = size / sizeof(uint32_t);
if (size % sizeof(uint32_t)) ++count;
}
/* check written byte count */
- if (sl->core_id == STM32L_CORE_ID) {
+ if (sl->chip_id == STM32_CHIPID_L1_MEDIUM) {
size_t count = size / sizeof(uint32_t);
if (size % sizeof(uint32_t)) ++count;