Skip to main content
Associate
May 10, 2025
Solved

Using Kiel for STM32F446 - trying to avoid CUBE

  • May 10, 2025
  • 4 replies
  • 842 views

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!

Best answer by pdd_1234

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).

4 replies

mbarg.1
Senior III
May 10, 2025

Why do you not ask Keil? I suppose you paid for that ...

pdd_1234Author
Associate
May 10, 2025

No, I'm just studying. 

mbarg.1
Senior III
May 10, 2025

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 ..

TDK
Super User
May 10, 2025

Why is it horrible?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Senior III
May 10, 2025

You can get CMSIS and Startup Files from ST's GitHub

pdd_1234AuthorBest answer
Associate
May 11, 2025

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).