STM32MP1 support available in SW4STM32

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4; you can download a short video showcasing this on the ac6-tools website (registration required).

System Workbench for STM32

STM32F103 - CubeMX DFU


I couldn’t find online a working bootloader implementation of STM32f103C8 based on generated files from CubeMX, i’ve started porting the F4 DFU to F1, there are two applications:

0x08000000 - DFU Bootloader

0x08008000 - Application

Jump between the address works perfectly, CRC works well, at the init of DFU bootloader i check the CRC at certain address if it matches the application that starts from 0x08008000.

Correctly the main issue is with the implementation of “MEM_If_Write_FS”, this is the code:

uint16_t MEM_If_Write_FS(uint8_t *src, uint8_t *dest, uint32_t Len)



uint32_t i = 0;

for(i = 0; i < Len; i+=4)


/* Device voltage range supposed to be 2.7V to 3.6V, the operation will

be done by byte */

if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, (uint32_t)(dest+i), *(uint32_t*)(src+i)) == HAL_OK)


/* Check the written value */

if(*(uint32_t *)(src + i) != *(uint32_t*)(dest+i))


/* Flash content doesn’t match SRAM content */

return 2;





/* Error occurred while writing data in Flash memory */

return 1;



return (USBD_OK);



When i try to load the app through dfu-util on linux the app freezes on:

Download from image offset 00000000 to memory 08008000-080083ff, size 1024

Poll timeout 50 ms

Poll timeout 0 ms

And on the debugger i get “Flash content doesn’t match SRAM content” on the “MEM_If_Write_FS”.

Is there any way to solve this issue?