Eclipse for microcontrollers (STM32) + FreeRTOS Task Aware Debugger
- Tutorial

This article will describe how to install eclipse for microcontrollers + FreeRTOS Task Aware Debugger.
For example, Windows OS, CubeMX, and the STM32L4Discovery board.
Installation
Install:
Open PowerShell.exe as administrator and execute:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))Open PowerShell.exe as administrator and execute:
cinst -y jdk8Open PowerShell.exe as administrator and execute:
cinst -y nodejsRestart PowerShell.exe as administrator and execute:
npm install --global xpmxpm install --global @gnu-mcu-eclipse/arm-none-eabi-gccxpm install --global @gnu-mcu-eclipse/windows-build-toolsxpm install --global @gnu-mcu-eclipse/openocdEnter "GNU MCU" in the search box.
Click Install.
We leave everything as it is, click further, further, further. Eclipse will restart.


We choose the Pack installation depending on your microcontroller:

After that, we go to the kitchen to put a kettle, the update process is not fast.

When the error comes out, click Ignore All:

Run STLinkReflash.exe, accept the agreement, select [1] - Upgrade to J-Link.
At any time, you can return ST-Link back by selecting [3] - Restore ST-Link.


Select your microcontroller and click Erase.

Project creation
In the project folder, create 2 projects:
C:\projects\armtest_cube
C:\projects\armtestWe include FreeRTOS in the project, switch USE_TRACE_FACILITY -> ENABLED

RECORD_STACK_HIGH_ADDRESS -> Enable

SYS -> Timebase Source, select any unnecessary timer, for example TIM7

Turn on additional functions as needed.
Click Generate Code.

Select C Project. We set the

name of the project and its location, select the type of project.

The most important thing is to indicate the correct kernel, depending on your type of microcontroller (see datasheet). The rest of the settings are not important.

Click next, next.
If the toolchain is not detected automatically, then indicate its location.
Click Finish.

Delete everything from the project tree:

Go to the project folder armtest_cube and copy everything except .project and .cproject to the project folder armtest. We update the

project tree:

Go to the project settings Project -> Properties, select the necessary microcontroller.

We go into the linker settings, delete all the available Script files and add the ld file from the project tree.

We connect the library with support for Floating Point:

Select the format of the Motorola S-record output file.

Add includ:

Add defin for the preprocessor:

Rename the startup file “startup_stm32l476xx.s” to “startup_stm32l476xx.S”. Otherwise, errors appear in debug.

Run -> Debug configurations

http://freescale.com/lgfiles/updates/Eclipse/KDS
Total
Turn on Debug, in the new FreeRTOS menu select Task List + Heap Usage.

We get a visual display of the load of Heap & Stack and other buns:
