2026-02-05 3:25 AM - last edited on 2026-02-05 4:24 AM by Andrew Neil
I have four quite mature projects which I have developed with STM32CubeIDE 1.19.0 so far. Now I tested these projects with STM32Cube for VS Code using both toolchains.
My environment:
I only used the release configuration and flashed the devices either with ST-Link or USB using the bundled programmer.
I set up the project as follows:
I got the following results from "smoke tests":
Project # 1 2 3 4
MCU STM32G031F6 STM32G031F6 STM32G0B1CB STM32G474CE STM32H750VB
GCC o.k. o.k. o.k. o.k. 1)
CLANG-Hybrid o.k. o.k. o.k. o.k. 1)
CLANG-Newlib - - - o.k. -
CLANG-Picolibc o.k. o.k. o.k. 2) 3)Diagnostics:
USB speed : Full Speed (12MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in FS Mode
SN : 206D36A14632
DFU protocol: 1.1
Board : --
Device ID : 0x469
Device name : STM32G47x/G48x/G414
Flash size : 512 KBytes
Device type : MCU
Revision ID : --
Device CPU : Cortex-M4
Opening and parsing file: stm32g474ce.elf
Memory Programming ...
File : stm32g474ce.elf
Size : 40.74 KB
Address : 0x08000000
File segment @0x200001D4 is not 8-bytes aligned. It will be aligned to @0x200001D0
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 20]
Erasing memory corresponding to segment 1:
Not flash Memory : No erase done
Download in Progress:
[==================================================] 100%
Error: failed to download Sector[0]
Error: failed to download the FileUSB speed : Full Speed (12MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in FS Mode
SN : 200364500000
DFU protocol: 1.1
Board : --
Device ID : 0x450
Device name : STM32H7xx
Flash size : 2 MBytes (default)
Device type : MCU
Revision ID : --
Device CPU : Cortex-M7
Opening and parsing file: stm32h750vb.elf
Memory Programming ...
File : stm32h750vb.elf
Size : 53.16 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Erasing memory corresponding to segment 1:
Not flash Memory : No erase done
Download in Progress:
[==================================================] 100%
Error: failed to download Sector[0]
Error: failed to download the File
Linking with STM32H750VBTX_FLASH.ld fails:
[build] ld.lld: error: /home/xxx/yyyy/zzz/stm32h750vb/STM32H750VBTX_FLASH.ld:38: memory region not defined: RAM_D1
[build] >>> _estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM */
[build] >>>
2026-02-05 6:45 AM
> Program does not work correctly. A DMA transfer from memory to peripheral fails. I do a SCB_InvalidateDCache_by_Addr before starting the DMA transfer.
Wrong one. You should be using SCB_CleanDCache_by_Addr before a memory -> peripheral transfer starts.