Download presentation
Presentation is loading. Please wait.
1
Software Setup & Validation
Prerequisites for “Introduction to STM32” class Atollic TrueSTUDIO STMicroelectronics STM32CubeMX STMicroelectronics ST-LINK Utility Device drivers
2
Required Software Setup
ST-LINK Utility Used to program STM32 devices Available from ST website • ST-Link Utility Microsoft Windows only at this time Atollic TrueSTUDIO Eclipse-based integrated development environment (IDE) for STM32 Available from Atollic website • Atollic TrueSTUDIO Windows and Linux installers available STM32CubeMX Code generator for STM32 devices Supports IAR™, Keil®, SW4STM32, and GCC compilers
3
Optional Software Setup
TeraTerm Virtual terminal software Supports both network communication and local serial ports
4
Begin Software Installation
Note 1: If you are using a DMS lab computer, skip these steps. All the required software has been pre-installed and configured for you. Note 2: If you have already installed this software, skip these steps. Step 1: Begin Atollic TrueSTUDIO installation Be sure to associate project files with TrueSTUDIO (installation option) Step 2: Begin STM32CubeMX installation Step 3: Install ST-LINK Utility Step 4: Install TERATERM serial terminal emulator application
5
Install Atollic TrueSTUDIO
In the STM32/Install folder, double click the installation program: Atollic_TrueSTUDIO_for_STM32_windows_x86_v9.2.0_ exe
6
Install STM32CubeMX In the STM32/Install folder, open the archive file: en.STM32CubeMX_v5-0-0.zip Run the application: SetupSTM32CubeMX exe Open the application Click on the “CHECK FOR UPDATES” button Apply any application updates (5.0.1) Restart application as Administrator to complete upgrade Click on “INSTALL / REMOVE” for embedded software package Install STM32Cube MCU Package for STM32F1 Series, version 1.7.0
7
Configure STM32CubeMX Open application Create new project
Select correct processor: STM32F103C8 Configure debug Configure PC13 as GPIO output Rename PC13 to “LED” Configure LED initial output as “low” Save as “BluePill.ioc”
8
Install ST-LINK Utility Software
Step 1: In STM32/Install folder, run “STM32 ST-LINK Utility v4.3.0 setup.exe” Step 2: Execute setup program Step 3: Follow setup program prompts Most options can use the provided default values Step 4: Open ST-LINK Utility application Step 5: Plug in ST-LINK/V2 device programmer to your computer Step 6: Select “Target/Connect” menu items or click Connect icon Step 7: Verify that the program can see the STM32 chip
9
TrueSTUDIO workspace Open the Atollic TrueSTUDIO application
If prompted, click on “Browse” and choose “Desktop/STM32/workspace” If not, use “File / Switch Workspace” menu item to select “Desktop/STM32/workspace” Wait for TrueSTUDIO to restart Close the “Information” page, if visible
10
Create a new project Select “File / New / C Project” menu item
For “Project name:” enter “test” For “Project type:”, select “Embedded C Project” Click “Next >” button For “Target”, type “stm32f013” Under “MCUs”, select “STM32F103C8” Click “Next >” button again For “Debug Probe”, select “ST-LINK” Click “Finish” button
11
Step through “empty” project
Wait for project to build Click on Debug icon On “Debugger” tab, for “Debug probe”, select “ST-LINK” Click “OK” button Code is downloaded to the STM32F103 chip via the STL-LINK/V2 The debugger stops just inside the main() function: int i = 0; Hover mouse over “i“ Examine variable in real time
12
Watch variables Click “Step Over” icon
Debugger proceeds to next instruction: i++; Right-click, select “Add Watch Expression…” For “Expression to watch:”, enter “i” in dialog box and click “OK” button Note addition of variable in Expressions tab Both declared type (int) and value (0) are shown Click “Resume” icon Click “Suspend” icon Note updated variable value
13
Exit debugging session
Click on “Terminate” icon TrueSTUDIO returns to “C/C++” perspective Exit application
14
Install TERATERM Copy the folder STM32\Install\TERATERM to a convenient location. This program does not need to be installed and is ready to run. Double click application file to open: ttermpro.exe Create a link or pin to your Start menu for easy access.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.