2024-08-12 05:24 PM - edited 2024-08-13 03:44 AM
Has anyone encountered the issue that external loader works fine only when flashing QSPI EFlash_Section independently (e.g. slice the firmware.elf into MCU.bin and EFlash.bin and flash separately).
BUT if flash from 0x08000000(Complete Firmware) the using firmware.elf either stm32cubeide or stm32cubeprogrammer will halt with error message.
Below are -v from stm32cubeide
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [16 138]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 397]
Download in Progress:
�������������������������������������������������� 0%
���� 9%����� 18%���� 27%
And pop message:
=============================================
Blah Blah Blah.............
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation
Solved! Go to Solution.
2024-08-13 03:35 AM
The issue solved by previous post from another ST Employee's post.
This might reflected STMicroelectronics / stm32-external-loader required a update in Readme.md.
the issue solved by redefine weak symbol in the main file of external loader project:
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
return HAL_OK;
}
uint32_t HAL_GetTick(void)
{
return 1;
}
/** @defgroup STM32H7B3I_Discovery_OSPI_Private_Functions Private Functions
* @{
*/
void HAL_Delay(uint32_t Delay)
{
int i=0;
for (i=0; i<0x1000; i++);
}
2024-08-13 01:00 AM
Hello @jowyc ,
Have you checked your jumper, BOOT0 pin?
Try to read option bytes with STM32CubeProgrammer.
Try erase flash memory from CubeProgrammer, update the ST-Link firmware on the board and flash again.
2024-08-13 03:35 AM
The issue solved by previous post from another ST Employee's post.
This might reflected STMicroelectronics / stm32-external-loader required a update in Readme.md.
the issue solved by redefine weak symbol in the main file of external loader project:
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
return HAL_OK;
}
uint32_t HAL_GetTick(void)
{
return 1;
}
/** @defgroup STM32H7B3I_Discovery_OSPI_Private_Functions Private Functions
* @{
*/
void HAL_Delay(uint32_t Delay)
{
int i=0;
for (i=0; i<0x1000; i++);
}
2024-08-13 03:44 AM
Hi Imen,
Apologize I did not mention it was a custom board with custom external loader.
BOOT0 does not really matter when connected to st link.