Added 9 hours, 11 minutes ago.
Hello Dalilul,
I’m Dizar—nice to e-meet you, and thanks for your question.
It looks like there’s some confusion around .hex files: they’re the compiled firmware output of your STM32 project, not schematic or library assets. You use them to flash the STM32F401CCU6.
Below is a quick guide to programming your MCU with STM32CubeProgrammer:
1. Download & Install STM32CubeProgrammer
Get it here: https://www.st.com/en/development-tools/stm32cubeprog.html
2. Connect Your Board
Use an ST-LINK/V2 (or newer) via USB, or put the board into DFU mode for USB-DFU flashing.
Ensure BOOT0 = 0 so the chip runs from flash after programming.
3. Launch STM32CubeProgrammer
Select your interface (e.g., ST-Link (SWD) or USB-DFU).
Click Connect—you should see your STM32F401 device listed.
4. Load & Flash the .hex
Switch to the Erasing & Programming (or File) tab.
Click the folder icon, choose your .hex file, and leave the start address at 0x08000000.
(Optional) Check <Verify programming> to confirm after flashing.
Click Start Programming and wait for the “Operation successful” message.
Keep in mind that those are general instructions and might change based on the type of your hex data.
Additional Video Tutorials
1. STM32 Programming via USB (DFU) – Phil’s Lab: https://www.youtube.com/watch?v=VlCYI2U-qyM
2. How to Program a HEX File to STM32F4 Discovery: https://www.youtube.com/watch?v=HVHtskxXwwI
3. Flashing STM32 with ST-LINK, JLINK, UART: https://www.youtube.com/watch?v=1cleO3mHjWw
If your goal is different—say, simulating, reverse-engineering, or analyzing a .hex—just let me know and I’ll point you in the right direction.
Best regards,
Dizar
Answered 6 hours, 35 minutes ago.