Hi, I'm following the Baremetal Setup guide Documentation, and found some things missing (which is OK). The board I got is exactly like the one in the document: STM32F746G-DISCO.
- The main problem though is that
st-flash
fails like this:
st-flash --connect-under-reset --format ihex write .build/release/STM32BlinkLED.hex
st-flash 1.8.0
2025-07-05T16:21:49 INFO common.c: STM32F74x_F75x: 320 KiB SRAM, 1024 KiB flash in at least 2 KiB pages.
2025-07-05T16:21:49 INFO common_flash.c: Attempting to write 402686004 (0x18008034) bytes to stm32 address: 134217728 (0x8000000)
2025-07-05T16:21:49 ERROR common_flash.c: The size exceeds the size of the flash (0x00100000 bytes available)
stlink_fwrite_flash() == -1
Can you help me with the solution? I'm kinda totally new to this baremetal thingy, and just want some working project to tinker with. Maybe I need to somehow remove the firmware that is already there? I tried st-flash erase
, it did not change anything
-
Question. We build
release
version there. Why not usedebug
? -
As far as I can tell, the project compilation uses only slower CPU cores when building. How to make it use all CPU cores?
Thanks! Sorry for the dumb questions.
PS. Here are some things I found in the document itself. Where is the right place to tell about them?
- Step 3: Wrong repository name: https://github.com/swiftlang/swift-mmio/ (it does not exist at the moment) → GitHub - apple/swift-mmio: Define and operate on type safe MMIO
- Step 8 contains some
TODOs
:–) - Step 8, for running elf2hex, you need
uv
installed (I just didbrew install uv
)