2025-05-10 1:57 AM
Hello,
I have the very excellent book "STM32 Arm Programming for Embedded Systems" by Mazidi, Chen, Ghaemi. It is from 2017. The book uses Keil, which I am very happy to use, and it has very nicely written code which I fully understand (so nicely written!).
I am having trouble getting a project going in Keil because in the book when you make selections in 'Manage Run-Time Environment' during the project set up is says to tick 'System Startup for STMicroelectronics STM32F4 Series', but in my version of Kiel, it says something like 'use Cube IDE/MX' and no option to use 'System Startup for STMicroelectronics STM32F4 Series'.
Could someone help with this? I do NOT want to use Cube IDE etc. all that software its horrible.
Thank you in advance!
Solved! Go to Solution.
2025-05-11 3:09 PM
The correct solution for this issue is to rollback the version of Keil/MDK to the version which does not integrate Cube MX automatically and instead uses the "start up" option.
This way you can avoid Cube MX and just use a simple #include stmxxxx.h and use clean, simple, bare metal code (albeit with CMSIS).
2025-05-10 2:15 AM
Why do you not ask Keil? I suppose you paid for that ...
2025-05-10 3:15 AM
No, I'm just studying.
2025-05-10 4:47 AM
Probably you have to study a little more or better before asserting some code is horrible ...
There are many people that confuse something horrible with something beyond their intellectual capability ..
2025-05-10 6:08 AM
Why is it horrible?
2025-05-10 8:40 AM
Visit: https://github.com/STMicroelectronics/cmsis_device_f4
Clone or download the ZIP.
Find:
startup_stm32f4xx.s in /Source/Templates/gcc or /Source/Templates/arm
system_stm32f4xx.c in /Source/Templates
2025-05-10 1:01 PM
I presume you have looked at STM32 Arm Programming for Embedded Systems" by Mazidi, Chen, Ghaemi, but you like HAL and LL and your editor peppered with pre-written stuff you don't want, and that is why you're saying what you're saying. You also like cOde GenERatIOn. That's why you're all salty
2025-05-11 3:09 PM
The correct solution for this issue is to rollback the version of Keil/MDK to the version which does not integrate Cube MX automatically and instead uses the "start up" option.
This way you can avoid Cube MX and just use a simple #include stmxxxx.h and use clean, simple, bare metal code (albeit with CMSIS).