Introduction The STM32 Nucleo board is a low-cost and easy-to-use development platform used to quickly evaluate and start a development with an STM32 in 32-pin package, 64-pin package and 144-pin package. This document provides guidelines to beginners on how to build and run a sample application and allows them to build and debug their application.
Section Download the STM32 Nucleo firmware from the www.st.com/stm32nucleo webpage. Establish the connection with the STM32 Nucleo board, by connecting CN1 of the Nucleo board to the USB port of the PC (Figure 2,Figure 3 Figure 4 show the connector CN1 inside the red circle).
SW4STM32 v1.5 and later – No limitation Information on the toolchain version supporting the STM32 device is available on toolchain release note at third-party web site. a. Registration before the download is required. b. The device support pack is separate from the MDK-ARM releases.
The ST-Link_V2_USB.exe file is automatically executed when installing the software toolchain. Complementary information on the firmware package content and the STM32 Nucleo requirements is available on the Getting started with the STM32 Nucleo board firmware package UM1726 User manual at the www.st.com website.
Firmware package UM1727 Firmware package The STM32 Nucleo examples, applications and demonstration are provided in one single .zip file. The extraction of the .zip file generates one folder, STM32 Nucleo_FW_VX.Y.Z, which contains the following subfolders (see Figure Figure 5. Package contents •...
UM1727 Firmware package 4.1.1 EWARM toolchain The following procedure explains how to compile, link and execute an existing EWARM project. Open IAR Embedded Workbench for ARM (EWARM). Figure 6 shows the basic names of the windows referred to in this document: Figure 6.
Firmware package UM1727 In IAR Embedded Workbench IDE, from the Project menu, select Download and Debug or, alternatively, click the Download and Debug button in the toolbar, to program the Flash memory and start debugging (see Figure Figure 8. Download and debug button The debugger in IAR Embedded Workbench can be used to debug source code at C and assembly levels, set breakpoints, monitor individual variables and watch events during the code execution (see...
UM1727 Firmware package Figure 10. Go button 4.1.2 MDK-ARM toolchain Open Keil MDK-ARM Microcontroller Development Kit. Figure 11 shows the basic names of the "Keil µvision5" windows, to which this document refers. Figure 11. µvision5 IDE In the Project menu, select Open Project... Browse to select either an example or a demonstration or a template project file and click Open to launch it in the Project window.
Firmware package UM1727 Figure 12. MDK-ARM project successfully compiled If user needs to change his project settings (Include and preprocessor defines), he must go through the project options: – For Include directories: Project>Options for Target > C/C++ > Include Paths –...
UM1727 Firmware package Figure 14. MDK-ARM debugger screen To run the application from the Debug menu, select Run. Alternatively, click the Run button in the toolbar to run the application (see Figure 15). Figure 15. Run button DocID025840 Rev 5 13/22...
Firmware package UM1727 4.1.3 TrueSTUDIO toolchain Open Atollic TrueSTUDIO for ARM product. The program launches and prompts for the workspace location. Figure 16. TrueSTUDIO workspace launcher dialog box Browse to select a TrueSTUDIO workspace of either an example or a demonstration or a template workspace file and click OK to load it.
Firmware package UM1727 In the Projects panel, select the project and click Finish. In the Project Explorer, select the project, open the Project menu, and click Build Project. If the project is successfully compiled, the following messages will be displayed on the console window (see Figure 19).
UM1727 Firmware package Figure 20. TrueSTUDIO debug window The debugger in the Atollic TrueSTUDIO can be used to debug source code at C and assembly levels, set breakpoints, monitor individual variables and watch events during the code execution. To run the application, from the Run menu, select Resume, or alternatively click the Resume button in the toolbar.
Firmware package UM1727 4.1.4 SW4STM32 toolchain Open the AC6 SW4STM32 for STM32. The program launches and prompts for the workspace location (See Figure 21). Figure 21. SW4STM32 workspace launcher dialog box Browse to select a SW4STM32 workspace of either an example or a demonstration or a template workspace file and click OK to load it.
UM1727 Firmware package Click Select root directory, browse to the SW4STM32 workspace folder (See Figure 23). Figure 23. SW4STM32 import projects dialog box In the Projects panel, select the project and click Finish. In the Project Explorer, select the project, open the Project menu, and click Build Project.
Firmware package UM1727 To change the project settings (Include directories and preprocessor defines), simply go through Project>Properties, select C/C++ Build>Settings from the left panel: • For Include directories follow the path: C Compiler>Directories>Include path • For pre-processor defines follow the path: C Compiler>Symbols>...
Revision Changes 19-May-2014 Initial release Added new part numbers in the cover page. 20-Jun-2014 Removed Table1 Nucleo board General information. Replaced all rpns of NUCLEO with reference to the “STM32 MCU 09-Sep-2014 Nucleo” line. Added Section 4.1.4: SW4STM32 toolchain. 30-Nov-2015...
Page 22
ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Need help?
Do you have a question about the STM32 and is the answer not in the manual?
Questions and answers