cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Custom External Loader Failed to flash whole image

jowyc
Associate II

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

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jowyc
Associate II

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++);
}

 

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

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.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
jowyc
Associate II

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++);
}

 

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.