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

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

keil cmsis package installer

Setup Keil

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

CMSIS-Keil-Project-Creation

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.

Select Device

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

0 0 vote
Article Rating
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
0
Would love your thoughts, please comment.x