Stmicroelectronics Sensortile Tutorial: Introduction To Stmicroelectronics Development Environment and Datalog Project Example For Windows Platforms
Stmicroelectronics Sensortile Tutorial: Introduction To Stmicroelectronics Development Environment and Datalog Project Example For Windows Platforms
Introduction to STMicroelectronics
Development Environment and DataLog
Project Example
for
Windows Platforms
Figure 1. The STMicroelectonics SensorTile Platform with a pencil reference indicating its
compact geometry.
http://www.openstm32.org/tiki-register.php
2. Update your Windows operating system (OS) to the latest version (Windows 10 or
newer). Open the following link on a web-browser on your Windows for more details.
https://support.microsoft.com/en-us/help/12373/windows-update-faq
https://drive.google.com/open?id=1SXOPiF9RF3OSRB8lELfcFkH3tLJbgo5E
3. Install System WorkBench by double-clicking the installer. Then, you should see the
installation information like Figure 2.
4. Wait for a few seconds, you will see a GUI installation interface popup as Figure 3.
5. Click on Next to continue. Accept all the license agreement and click next to continue as
Figure 4.
6. Use its default installation directory and click next to continue. See Figure 5.
8. Make sure that all installation options have been checked and click next to continue. See
Figure 7.
11. Make sure your computer is connected to the Internet and double-click
SystemWorkbench shortcut on your desktop. Use the default workspace directory and
wait for the final step of installation as Figure 10.
12. After step 11, you System Workbench (IDE) is ready to go. System Workbench is an
Eclipse with proper configuration and compiler tools.
3. Download the STM32 ST-LINK utilities from the following weblink. Follow a similar
process to section “5.1 Download”, but look for the file labelled STSW-LINK004 instead
of STSW-STLKT01.
http://www.st.com/en/embedded-software/stsw-link004.html
Figure 12: The file used to start the install process for the ST-LINK utilities.
6. Download the STM ST-LINK USB Driver from the following weblink. Follow a similar
process to section “5.1 Download”, but look for the file labelled STSW-LINK009 instead
of STSW-STLKT01.
Copy and paste this link into your browser if it does not function as intended.
http://www.st.com/content/st_com/en/products/embedded-software/development-
tool-software/stsw-link009.html
8. If you are using a 64-bit operating system, double click the file labelled
“dpinst_amd64.exe” to begin installation. Otherwise, double click the file labelled
“dpinst_x86.exe”. See Figure .
9. Download the STM32 Virtual COM Port Driver from the following weblink. Follow a
similar process to section “5.1 Download”, but look for the file labelled STSW-STM32102
instead of STSW-STLKT01.
http://www.st.com/en/development-tools/stsw-stm32102.html
From the extracted files, select the one whose filename contains “W8” if your system is
Windows 8 or newer. Otherwise, select the one whose filename contains “W7”.
If you are using a 64-bit operating system, select the file ended with “64bits”.
Otherwise, select the one ended with “32bits”.
Use the default install location for consistency with the rest of this tutorial.
PuTTy is the program that will enable us to see the data transmitted by the SensorTile board
over serial USB connection to your personal computer.
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
2. Download the correct executable binary file for your operating system as highlighted in
Figure .
3. Double click the file to launch it. Note: This file is an EXECUTABLE BINARY FILE, this file
is NOT an installer. As such, make sure you do not delete this file after you execute it
once. You may also want to create a shortcut to this application on your desktop for
ease of access.
First, please note that this Tutorial supported Version 1.2.0 of the SensorTile Firmware, STSW-
STLKT01
-------------------------------------------------------------------------------------------------------------------------------
http://www.st.com/content/st_com/en/premium-content/sensortile-curriculum-stsw-stlkt01_zip.html
2. Scroll to the bottom of the page, and click “Get Software” for the entry STSW-STLKT01.
Figure 16: This figure depicts what to click to acquire the example project files.
Figure 17: License agreement that appears once you click "Get Software".
4. Either register an account, or enter your name and email address when prompted by
the popup depicted in Figure .
Figure 18: Dialog box that collects developer information prior to enabling acquisition of
example project files.
5. The popup box should resemble Figure if all steps have proceeded successfully.
Note: this link will not function if your web-browser is in “Incognito” or “Private” mode.
Figure 20: Email from STMicroelectronics containing weblink to enable access to download
example project.
7. Extract the contents of the archive. The default output folder name should be v1.2.0.
For consistency with this tutorial, please extract the archive into the Downloads
directory.
“C:\Users\<USERNAME>\Downloads\en.stsw-stlkt01\v1.2.0”.
Note: if the path to the folder labelled v1.2.0 has a space in it, move it to a location
where the path does not contain any spaces.
The IDE will not be able to compile projects that have spaces in their paths.
2. Use the default workspace directory, and click “Ok”. See Figure .
Note: Ensure that the workspace you select does not contain any spaces. If the path to the
workspace contains spaces, the IDE will not be able to compile the projects.
Figure 22: Selecting your workspace directory. It is recommended that you use the default
location. It will resemble the form “C:\Users\<USERNAME>\workspace”.
3. If you see a welcome screen, close it by clicking the “x” in the top left corner. See Figure .
4. Once you are on the main screen of System WorkBench, click “File > Import …” to begin
importing the project. See Figure .
5. When the new window popup appears, click double click the entry “General”. See Figure .
6. Double click the “Existing Projects into Workspace” option that appears under “General”.
See Figure .
There are three projects in the v1.2.0 folder. If you import more than one project at a time,
compilation will fail. This is because the three projects are dependent on other files in the
folder.
On the new popup window, enter the path to the folder v1.2.0 in the text field “Select root
directory”. DO NOT CLICK FINISH.
Figure 26: Selecting the folder where the existing project was extracted.
Figure 27: Only selecting one project from the existing files to import into the workspace.
If you have selected more than one project and clicked “Finish”, you will need to open your
workspace directory on the Finder application on your Windows and manually delete all of
the files.
Figure 29: Contents of "Project Explorer" after successfully importing the example project files.
1. Select STM32L4xx-SensorTile -> DataLog in Project Explorer. Then, click Project -> Build
Project (see Figure ).
Figure 30: Compiling the source code for the example project.
2. If step 1 completed successfully, a folder named “Release” should appear and contain a .bin
file. See Figure . Skip to section 5.4 SensorTile Hardware Platform if this file appears.
Figure 31: Project directory contents after successful compilation of project source code.
STMicroelectronics SensorTile Tutorial: Introduction to STMicroelectronics Development
Environment and DataLog Project Example for Windows Platforms
Page 22 of 39
3. If this file did not appear, ensure that none of the paths have a space in their names. If any
path has a space, it will cause the make command to fail.
If any path has a space in it, repeat all installation steps ensuring that the path no longer has
a space in it. Then, repeat step 1. If the binary file appears, skip to section 5.4 SensorTile
Hardware Platform.
4. Attempt to build the project using Eclipse’s internal builder. First, right-click the project,
then click “Properties”. Navigate to the subheading “C/C++ Build”, and change the value of
the field “Builder type” to be “Internal builder”. See Figure for more details.
3. Place the SensorTile on the larger evaluation board. Ensure the orientation of the SensorTile
matches Figure 6.
4. Connect the boards by attaching an SWD connector from the Nucleo board to the
SensorTile board. Be very careful in this step. Please examine the figures Figure 7 - Figure 8.
Do not proceed with this tutorial until you have verified with an instructor that the
hardware is correctly configured.
1. Attach a mini-USB cable from the Nucleo to your PC. Attach a micro-USB cable from the
SensorTile to your PC. See Figure .
Figure 37: Establish a USB-wireline connection between each board and your PC.
2. Select the project folder, “STM32L4xx-SensorTile”, in Project Explorer. Then, click “Run ->
Debug As -> AC6 STM32 C/C++ Application”. See Figure in the next page.
If you wish to switch back to the C/C++ view, click the top right corner button labeled
“C/C++”. See Figure .
Figure 41: To enter the "C/C++" view, click the button highlighted in the red box. To enter the
"debug mode" view, click the button highlighted in the green box.
5. Examine your SensorTile device. Notice how none of the LED’s are activated.
6. Press the “green arrow with the yellow bar on its left” button that indicates “Resume” when
you mouse over it. See Figure .
7. Examine your SensorTile device. Notice how the orange LED is rapidly blinking.
8. Find the COM port assigned to the SensorTile board by opening the device manager. For
more information on how to open the device manager, please follow the weblink below.
https://support.microsoft.com/en-us/instantanswers/005a1acb-776e-4320-b9f2-
3a2302a320da/open-device-manager
The device listed as “STLink Virtual COM port” is the Nucleo board.
The device highlighted in blue and listed as “STMicroelectronics Virtual COM Port” is the
SensorTile.
Note: The device will not be detected by the Device Manager until the program is running.
So ensure that you have performed step 6 if you do not see your device.
9. Inspect the data the SensorTile is sending over serial wireline USB connection opening
PuTTy and entering the information as shown in Figure . Make sure this command is edited
to suit the COM port of the device as it appears in your device manager. The output should
resemble Figure .
1. Terminate and remove all existing applications on the SensorTile board as shown in
Figure .
Note: Ensure to remove ALL existing applications. Figure only contains one
application. If there are more, delete all of them.
Figure 46: Terminating and removing existing applications on the SensorTile board.
2. Open the ST-LINK utility you downloaded at the start of this tutorial. There should be an
icon on your desktop for this.
4. Click File > Open Files. A file browsing window should appear.
5. Navigate to the folder where you extracted the Example project source code.
…\v1.2.0\Projects\SensorTile\Applications\DataLog\SW4STM32\STM32L4xx-
SensorTile\Release
Figure 50: How the ST-LINK window should appear after clicking open.
Figure 53: Target > Program window after modifying “Start Address”.
16. Navigate to the folder where you extracted the Example project source code.
…\v1.2.0\Utilities\BootLoader\STM32L476RG
18. Click the file labelled “BootLoaderL4.bin” (also highlighted in Figure ) and click Open.
23. Disconnect the USB cables connecting the SensorTile and the Nucleo boards to your PC.
This will power down the devices, enabling us to safely disconnect the SWD connection
between the SensorTile board and the Nucleo board.
24. Disconnect the SWD cable connecting the SensorTile board to the Nucleo board.
25. Reconnect SensorTile board to your Windows. Do not reconnect the Nucleo board to
your PC.
26. Notice that the SensorTile device immediately starts streaming data over serial USB
connection to your PC by examining the blinking LED.
27. Examine the data transmitted from the SensorTile by Repeat step 9 from 5.5 Debug.
28. You will now observe complete system operation with a stand-alone, automatically
operating SensorTile IoT system.