Events

:

:

Elektronik | Funk | Software

Der Technik-Blog

  • Social Media

    Werbung:


    New Posts


    Events

    • Keine zukünftigen Events vorhanden

    The Tech-Blog

    STM CubeIDE Setup

    STM CubeIDE Setup

    Alex @ AEQ-WEB

    As with Arduino, STM also has an IDE to program the microcontrollers and development boards. STM developed the CubeIDE, which you can download after registering with STM. In this article, we´ll show you how to install the CubeIDE and how to flash a simple program on a Nucleo Board (STM32F446RE).

    1. Software download

    The CubeIDE can be downloaded after a short registration on STM´s website. The CubeIDE is available for Windows, Mac and Linux. The software installation is the same, as with any standard software by starting the setup EXE.

    2. Board Driver

    When the board is connected to the computer, the flash memory will be recognized immediately. No driver is needed for this. STM supplies the drivers with the CubeIDE. You will be asked during installation if you want to install the drivers. Recommended is the installation of all drivers.

    3. First run and workspace

    If the installation was successful, the program will start automatically. You will be asked for the location of the workspace. You can leave the suggested path here and use it for all projects.

    Werbung:

    4. Choose your Board

    Before you create a new project in CubeIDE, you must define the board first. In our example, a Nucleo board is used with the following processor: STM32F446RE. The exact name of the processor can be found on the chip itself or on a sticker which should be located near the IC. The CubeIDE shows besides the type also some characteristics like flash size, RAM, number of IOs and the clock frequency.

    5. Project settings

    After specifying the exact microcontroller, some programming parameters must be specified or confirmed. First, you have to define a project name. Then you have to choose the programming language between C and C ++. C ++ is a simpler language for beginners as it behaves similarly to the Arduino IDE. However, we chose C for the first project. The remaining two parameters can be adopted as proposed by the program.

    6. Pin- overview and definition

    After the project has been created, a graphical overview of the chip is visible. In this view you can define the function of a single pin. We want to create a simple blinking example with the on-board LED, so pin PA5 must be defined as GPIO output.

    Werbung:

    7. Label definition

    In the software, it is possible to give each pin a label. The label can be called via the source code instead of the pin, which responds in the background to the defined pin. In our example, the on-board LED on pin PA5 will be assigned as "LED".

    8. Write your program

    The project folder contains a subfolder (Src) with the file "main.c". This file contains the main program that we can load into the controller. To create the blinking example, the two green highlighted lines from the following screenshot must be copied into the while loop of the main file.

    9. Firmware update

    Depending on the firmware version of the board, it may happen that it is already outdated at the time of delivery. Then it is not possible to load a new program on the board via CubeIDE. The CubeIDE installs automatically the firmware upgrade on the board in this case.

    Werbung:

    The upgrade usually takes one to two minutes. After that the board restarts automatically and it should be possible to load a new program onto the board.

    11. Controller reset & blink test

    The debug button in the software uploads the program to the controller. In the status line, the IDE displays the current processes and informs whether the upload was successful or not. To start the new program press the reset button on the board and the LED should flash.


    Info: This page was automatically translated and may contain errors
    122X122

    About the Author

    Alex, the founder of AEQ-WEB. He works for more of 10 years with different computers, microcontroller and semiconductors. In addition to hardware projects, he also develops websites, apps and software for computers.

    Top articles in this category:

    Selfmade Cam Slider with Stepper Motor

    Electrical Camera Slider

    • Video
    • DE/EN

    Electronic camera sliders are very expensive. We show how to build an electronic cam slider with a stepper motor for less than 100 euros.

    read more
    NodeMCU ESP8266 WiFi WLAN Weatherstation

    NodeMCU Weatherstation

    • DE/EN

    In this article, we'll show how you build a weather station with NodeMCU and ESP8266 that sends weather data over WiFi to a PHP server.

    read more

    Social Media

    Werbung:


    New Posts


    Events

    • Keine zukünftigen Events vorhanden