cancel
Showing results for 
Search instead for 
Did you mean: 

Can Someone Give me Guidance on STM32 Development with Keil MDK?

elija6266
Associate

Hello there,

I am working on a project using the STM32 series microcontroller and the Keil MDK development environment. I'm relatively new to both the STM32 platform and Keil MDK, and I am facing some challenges in getting started.

Specifically; I am looking for guidance on the following;

I need help with setting up my development environment for STM32 with Keil MDK. Are there any specific configurations or settings I should be aware of?

I am looking for some basic example projects or tutorials that can help me understand the fundamentals of programming STM32 microcontrollers using Keil MDK.

I would appreciate any resources or tips on programming STM32 peripherals, such as GPIOs, UART, and SPI, using Keil MDK.

Also, I have gone through this; https://community.st.com/t5/stm32cubeide-mcus/import-from-keil-mdk-into-stmcubeide/power/200298/page/2  which definitely helped me out a lot.

What are some effective debugging techniques and practices for STM32 development in Keil MDK? Are there any specific features or tools I should be leveraging?

Lastly; I am interested in learning about any best practices or tips that experienced developers recommend for STM32 development with Keil MDK.

I would greatly appreciate any advice, resources, or insights that can help me improve my STM32 development skills with Keil MDK.

Thank you in advance for your help and assistance.

6 REPLIES 6

Perhaps there are training classes, or courses in embedded?

Perhaps you have colleagues, supervisors, or professors who can sit with you, or you can shadow, to get familiar with the processes and lay-of-the-land?

There are surely videos on YouTube a search away?

All the Cube example trees have MDK-ARM project files. CubeMX should be able to auto-gen projects.

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Examples/BSP/MDK-ARM

There are also TEMPLATEs, and with Keil it's relatively easy to clone an existing project by just copying the content to a new directly. It's a lot easier to clip and cull an existing project into what you want rather than use the Wizard.

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Templates/MDK-ARM

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@elija6266 wrote:

I'm relatively new to both the STM32 platform and Keil MDK, and I am facing some challenges in getting started.


So do you have experience with any other microcontroller(s)? And any other development tools?

For help with Keil, see:

AndrewNeil_0-1713891592608.png

https://www.keil.com/

 


@elija6266 wrote:

What are some effective debugging techniques and practices for STM32 development in Keil MDK? 


Nothing really specific to STM32 - techniques are pretty general, and Keil is a general tool

 

 

For configuring the STM32 clocks, peripherals, etc you can use STM32CubeMX - it can create Keil projects, and has a load of examples:

https://www.st.com/en/development-tools/stm32cubemx.html

 

>>>>What are some effective debugging techniques and practices for STM32 development in Keil MDK?

>>Nothing really specific to STM32 - techniques are pretty general, and Keil is a general tool

Indeed debugging is debugging.

It really helps to understand what your code is doing as you write it. Static Analysis and Code Walking are orders of magnitude better techniques to employ. For dynamic interaction or flow, instrumentation and telemetry is really good for real-time behavior and interaction. Trace can be helpful if the path to failure is not well understood. Some people find it really productive.

I generally view the use of single-step to be a failure in my understanding the problem and code adequately. It also distorts reality to a point where my reaction time is billions of times slower than the MCU

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MM..1
Chief III

If you plan MDK code size over free limit  , then start with buy Keil license...

There's a free Keil version - with commercial use permitted - for ST M0/M0+ products:

https://developer.arm.com/documentation/kan344/latest/Abstract

 

There's a free Keil Community version - with commercial use prohibited:

https://www.keil.arm.com/mdk-community/

 

See: https://community.st.com/t5/stm32cubemx-mcus/code-size-exceeds-the-limit-license-size-on-keil-how-to-handle/m-p/665920/highlight/true#M27992 - from @Pavel A.