Skip to content

arm-education/Embedded-Systems-Essentials-With-Arm-Pt2

Repository files navigation

Getting Started with Keil Studio in VS Code

This guide will walk you through the steps to set up a new solution in Keil Studio within Visual Studio Code (VS Code), select your target board, include necessary software components, and compile and run your code.

Prerequisites

  • Visual Studio Code (VS Code): Download and install from here.
  • Keil Studio Extension: Install the Keil Studio extension from the VS Code Marketplace.
  • Connected Target Board: Ensure your ARM target board is connected to your computer.

Steps

1. Open a New Solution and Select Your Target Board

  • Open VS Code.
  • Navigate to the Keil Studio extension.
  • Create a new solution.
  • The extension should automatically detect your connected target board. Verify that the correct board is selected.
  • Set the appropriate target type for your project.

Selecting Target Board

2. Include All the Software Components

  • Within your new solution, navigate to the software components section.
  • Select and include all necessary software components required for your project.

Including Software Components - Part 1

Including Software Components - Part 2

3. Include RTOS Libraries and Edit the Configuration File

From Lab Module 3 onwards, we will be using an RTOS (Real-Time Operating System). Therefore, it is essential to include the following RTOS libraries and edit the configuration file accordingly.

Include RTOS Libraries

  • Navigate to the software components section within your solution.
  • Add the following RTOS libraries to your project:
    • CMSIS-RTOS2 (API v2.1.0)
    • RTX (RTOS Kernel v5)

Including RTOS Libraries

Edit the Configuration File

  • After including the RTOS libraries, open the configuration file located in your project directory.
  • Modify the configuration settings as shown below:

Editing Configuration File

Adding the tunes.h File to Your Source Files

To add the tunes.h file to your source files, follow these steps:

  1. Open your project in your development environment.
  2. Locate the section where you manage your source files.
  3. Add the following file to your source files:
    • tunes.h

Add New File

4. Compile and Run the Code

  • Once all components are included, save your solution.
  • Click on the build/compile button to compile your code.
  • After a successful build, run the code on your target board.

Additional Resources

Releases

No releases published

Packages

 
 
 

Contributors

Languages