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:
Eclipse IDE for C / C ++ Developers
Download eclipse , unpack, copy to C: / eclipse
chocolatey
Chocolatey - a package manager for Windows, an analog of apt-get, allows you to install programs through the console.
Open PowerShell.exe as administrator and execute:
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'))
Jdk
Without JDK, eclipse and CubeMX will not start.
Open PowerShell.exe as administrator and execute:
Open PowerShell.exe as administrator and execute:
cinst -y jdk8
Node.js
Node.js contains the npm package manager needed to install xpm.
Open PowerShell.exe as administrator and execute:
Open PowerShell.exe as administrator and execute:
cinst -y nodejs
xpm
Xpm - xPack package manager, allows you to quickly install the necessary utilities for eclipse with three lines on the command line.
Restart PowerShell.exe as administrator and execute:
Restart PowerShell.exe as administrator and execute:
npm install --global xpm
Arm compiler, build system and debugger
Restart PowerShell.exe as administrator and execute:
xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc
xpm install --global @gnu-mcu-eclipse/windows-build-tools
xpm install --global @gnu-mcu-eclipse/openocd
GNU MCU Plugin:
Launch eclipse, Help -> Eclipse marketplace ...
Enter "GNU MCU" in the search box.
Click Install.
We leave everything as it is, click further, further, further. Eclipse will restart.
Enter "GNU MCU" in the search box.
Click Install.
We leave everything as it is, click further, further, further. Eclipse will restart.

Mcu pack
Go to Packs, click Refresh. 
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:

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:

Cubemx
Follow the link , download and install
ST-Link
Follow the link , download and install
J link software
Follow the link , download and install
Flashing ST-Link to J-Link
Follow the link , download and install.
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.
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.

We erase the memory on the microcontroller
Open the J-flash lite in the launch, click OK. 
Select your microcontroller and click Erase.

Select your microcontroller and click Erase.

Project creation
In the project folder, create 2 projects:
C:\projects\armtest_cube
C:\projects\armtest
Create a project in CubeMX
We go into CubeMX, create a new project.
We 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.

We 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.

Create a project in Eclipse
Go to Eclipse -> New -> Project ...
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
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

Install FreeRTOS debugger plugin
Help -> Install new Software ...

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:
