Getting started with STM32 RTOS – Project setup with Keil CMSIS

This is the STM32 RTOS (RTX-CMSIS) series. The aim of this series is to provide easy and practical examples that anyone can understand. Now in this tutorial, we are going to see “Getting started with STM32 RTOS – Project setup with Keil CMSIS“.

Please read the other STM32 Tutorials.

You can also read the STM32 Keil project, STM32 GPIO tutorial without RTOS, 8051 Keil project, and LPC2148 Keil project.

Getting started with STM32 RTOS

Requirement

  1. Keil IDE – Download here.

Download Software Packs

The below procedure will take you through the necessary steps to create a CMSIS-RTOS based project.

1. Install the Keil MDK533 which has been downloaded by using the above link.

2. After installing the Keil IDE, please open the Keil IDE.

3. Now we will install the required software packs. Open the Installer. Refer to the below image.

Keil RTX software packs

4. Then install the Keil::STM32F4xx_DFP, ARM::CMSIS, ARM::CMSIS-Driver. Refer to the below image.

STM32 RTOS

Setup Keil

5. After you installed the required software packs, start μVisionand select Project → New μVision Project. Refer to the below image.

STM32 RTOS

6. Select the directory where you want to save the project files and give the project name and click save. Please refer to the below image.

CMSIS=Project Name

7. Then Select Device for Target ‘Target 1’ pop-up will open. There enter the stm32f401ve in search and select the STM32F401VETx. After that click OK. Please refer to the below image.

STM32 RTOS

8. Now ManageRun-Time Environment will open. There select the CMSIS → CORE, RTOS2 → Keil RTX5, Click the dropdown and select the Source, Device → Startup. If you see any conflicts, then please click the Resolve button down. Please refer to the below image.

Manage run environment

9. The below-shown files should be created now.

RTOS files

10. As of now, we have created the project. Now we will create a source file. Right-click on the Source Group and click Add New Item to Group ‘Source Group 1’. Please refer to the below image.

Source file creation

11. Then select User Code Template and RTOS2:Keil RTX5 then click Add. You can create your custom C file by clicking C File(.c). Please refer to the below image.

Add source file

12. The main file with the template should have been created like below.

main file for the project

13. Till now we have created the project with source code. Now we will enable the option to create the hex file when we build. Click the ‘Options for Target’ like below.

options for target

14. In the Options for Target ‘Target 1’, enable the Output → Create HEX File → OK.

add hex fileWe are done with the setup now. You can build the project. The basic things are ready. In our next tutorial, we will see how to use STM32 in this project.

Please read the other STM32 Tutorials.

You can also read the below tutorials.

Linux Device Driver TutorialsC Programming Tutorials
FreeRTOS TutorialsNuttX RTOS Tutorials
RTX RTOS TutorialsInterrupts Basics
I2C Protocol – Part 1 (Basics)I2C Protocol – Part 2 (Advanced Topics)
STM32 TutorialsLPC2148 (ARM7) Tutorials
PIC16F877A Tutorials8051 Tutorials
Unit Testing in C TutorialsESP32-IDF Tutorials
Raspberry Pi TutorialsEmbedded Interview Topics
Reset Sequence in ARM Cortex-M4BLE Basics
VIC and NVIC in ARMSPI – Serial Peripheral Interface Protocol
STM32F7 Bootloader TutorialsRaspberry PI Pico Tutorials
STM32F103 Bootloader TutorialsRT-Thread RTOS Tutorials
Zephyr RTOS Tutorials - STM32Zephyr RTOS Tutorials - ESP32
AUTOSAR TutorialsUDS Protocol Tutorials
Product ReviewsSTM32 MikroC Bootloader Tutorial
VHDL Tutorials
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Table of Contents