Hello everyone, as you might guess from the title that this tutorial is all about STM32. STM32 are basically ARM cortex 32 bit line developed by ST microelectronics. Its been their since 2007 and recently gained lot of popularity in embedded world.
The nomenclature of these microcontrollers is a bit confusing, so let’s go to the ST website, where they have explained it best. Please go through the following image from the ST website

So as you can see these microcontrollers are being divided into 4 major categories depending on application use and dependencies. Mainly the parts we are going to use for this series is from main stream as they are best suitable for most of the applications we develop.
The main question after selection of device family is how are we going to develop a application around such a complex microcontroller. Well ST already answered this by introducing various development boards which we can use to develop our demos and by using their open source schematics we can optimize the our hardware to more perfections.
Although there are no of devices available in each controller family. There is a simple trick to select required controller.

ST microelectronics had develop two main categories of boards which are currently available in market for use. The Nucleo board series and the Discovery board series. Out of which the Nucleo series has minimum hardware interfaces with Arduino like port pinouts whereas in discovery board you will find a external device/peripheral is attached to explore. They are many boards available in this range so to avoid any confusion ST had given a chart from which you can choose. These boards are available in various physical sizes and memory configurations so choose according to your taste.
STM32 microcontrollers are supported by a complete range of evaluation tools ranging from highly affordable kits to fully equipped, high-end application development boards. They implement the full range of device peripherals and features of each product line. The evaluation tools also come complete with third-party solutions that use an IDE and in-circuit debugger/programmer.
STM32 Nucleo boards help design engineers try out new ideas and to quickly create prototypes with any STM32 MCU. All Nucleo boards come with Arduino™ connectors and the STMicroelectronics Morpho connectors allowing for easy hardware add-ons. STM32 Nucleo users have free access to the mbed online compiler, the mbed online C/C++ SDK and the developer community at mbed.org. Build a complete application in only a few minutes.
STM32 Discovery kits are an inexpensive and complete approach to evaluating the outstanding capabilities of STM32 MCUs. They include the necessary components, like MEMS microphones, sensors, and LCD displays, to demonstrate specific device features. With a HAL library, multiple software examples, and the integrated debugger/programmer, the discovery kits are ideal for prototyping.
STM32 Evaluation boards include all the required external hardware necessary for using the complete features set of an STM32 Microcontroller. They give access to all the microcontroller’s pins, allowing them to be considered a reference design for application development.
I personally like the Nucleo series the most as they are simple enough to use and provide minimal hardware interfaces such as LED and key to test basic functionality. I own multiple Nucleo boards but for this series I am going to use my very own trusty Nucleo-F401 board.

Apart from this there are several other boards which are available for users to choose. These boards have been developed by third parties and distributed by them. Several boards in the last couple of years have become famous, such as the Blue pill board with STM32F103C8/CB, also the Black pill V1.2 with STM32F401CCU6. But these boards are being designed as open source, so please buy these boards at your own risk, as Chinese counterfeits are now taking over the place of these third party boards. These Chinese counterfeits are cheap and available in bulk, also do not come with original STM32 ICs, and they do not work, buggy and have lots of problems. So I will recommend all ways to use boards from the trusted part dealer.

Also, these boards do not come with a built in programmer and debugger, which you might need to buy separately. Which you can buy the original STM32 V2 or the knock-off Chinese versions, which also works pretty well.
The original ST link is expensive but it can last long. I had seen in several occasions that these Chinese counterfeits failed to work although microcontroller is fresh and original from STM. And in these situations the original works smoothly without any issues at any given time.


But for DIY and hobbyist these knock offs will works perfectly. If any situation if you find that these knock-offs does not work do not panic and don’t throw away your MCU instead try other ST-Link once or use different MCU at that time and keep this MCU and test later.
Now, with all these hardware requirements, you still need a few more software to write the program, compile it, flash it into the controller’s memory, etc. The ST already gives a solution on this. STM32CubeIDE, which is an all-in-one tool that provides a compiler, editor, programmer, debugger, etc. in one single software. In this tutorial, I will teach you how to use this tool. This is a multi-platform tool, so no matter which OS you use, the software will run until you fulfill its backend needs. It also contains a GUI for controller peripheral setting which helps you in developing an application quickly. This software is also available free on the ST website.
STMicroelectronics provides a comprehensive and free software ecosystem for developing applications on STM32 microcontrollers. This ecosystem includes IDEs, configuration tools, firmware libraries, middleware, debugging tools, and AI development platforms, all available at no cost.

- STM32CubeIDE is STMicroelectronics’ official free IDE, built on Eclipse and integrating STM32CubeMX for easy project setup.
✔ Cross-platform: Works on Windows, Linux, and macOS.
✔ Integrated STM32CubeMX: Helps in pin configuration, clock setup, and middleware selection.
✔ Supports GNU Arm Toolchain: Uses free GCC compiler.
✔ Built-in Debugging: Supports ST-LINK, J-Link, and SEGGER debuggers.
✔ RTOS Support: Works with FreeRTOS and other RTOS solutions.
💡 Best for: Beginners and professionals looking for an all-in-one free STM32 development solution.
- STM32CubeMX is a graphical tool to generate initialization code for STM32 projects.
✔ Pin & Clock Configuration: Easily set up GPIO, peripherals, and clock sources.
✔ Middleware Setup: Enables USB, TCP/IP, File System, and RTOS with a few clicks.
✔ Code Generation: Outputs C code compatible with STM32CubeIDE, Keil, and IAR.
✔ Power Consumption Estimation: Helps optimize energy efficiency.
💡 Best for: Quickly setting up STM32 projects with minimal manual configuration.
- STM32 Firmware Packages Each STM32 series (e.g., STM32F4, STM32L0) has a Cube firmware package, which includes:
✔ Low-Level (LL) Drivers – Lightweight, fast access to registers.
✔ Hardware Abstraction Layer (HAL) Drivers – Simplifies peripheral usage.
✔ Middleware Components:
- FreeRTOS – Real-Time Operating System.
- USB Host/Device Stack – CDC, HID, MSC support.
- TCP/IP Stack – LWIP for networking.
- File System (FatFS) – FAT file system support.
💡 Best for: Standardized firmware development across STM32 families.
- STM32CubeProgrammer is a universal flashing tool for programming STM32 devices via:
- ST-LINK (JTAG/SWD)
- UART (USART bootloader)
- USB DFU
- I2C/SPI
💡 Best for: Flashing firmware and debugging using ST-LINK or bootloader.
- STM32Cube Monitor is a real-time variable monitoring tool, useful for debugging and tuning parameters.
✔ Supports real-time data visualization
✔ Compatible with FreeRTOS and custom applications
💡 Best for: Monitoring system performance without stopping execution
In short, these are the major advantages of using STM32 Microcontrollers
✅ Completely Free: No licensing costs for tools.
✅ Official & Well-Supported: Developed by STMicroelectronics.
✅ Easy to Use: IDE + Code Generator + Debugging tools in one ecosystem.
✅ Scalable: Works across all STM32 microcontrollers.
🚀 If you’re working on STM32, using ST’s free tools will save you time, effort, and money!

- Configuration: use STM32CubeMX, a graphical tool, to easily configure STM32 microcontrollers and generate corresponding initialization C code for peripheral drivers (source: https://www.st.com/en/development-tools/stm32cubemx.html).
- Development: use STM32CubeIDE, an integrated development environment based on Eclipse and the GNU C/C++ toolchain, to develop, compile, and debug your application solution. It also integrates features from other ecosystem tools, such as STM32CubeMX code generation (source: https://www.st.com/content/st_com/en/ecosystems/stm32cube-ecosystem.html).
- Programming: use the STM32CubeProgrammer to read, write, and check external devices and memories through various communication media (JTAG, SWD, UART, USB DFU, I2C, SPI, CAN, etc.) (source: https://www.st.com/en/development-tools/stm32cubeprog.html).
- Monitoring: use STM32CubeMonitor to tune and diagnose STM32 applications at runtime, reading and viewing variables in real-time (source: https://www.st.com/en/development-tools/stm32cubemonitor.html).
will meet in next tutorial where I will show you how to create your first project inSTM32CubeIDE with STM32 Nucleo boards.