Compiler
Download Yagarto Gnu ARM toolchain which contains GCC compiler and GDB Debuger and install it. You can run "arm-none-eabi-gcc.exe -v "to check if everything works fine.IDE
Next step is installing Eclipse. Eclipse is Java application so you have to install Java. If you already have installed Java, command "java -version" run properly. Download Eclipse IDE for C/C++ Developers and unpack it wherever you want (in this tutorial "C:\arm\eclipse"). This tutorial is written for Eclipse Juno version.Settings
- Launch Eclipse.
- Unselect “Project→Build Automatically”.
- Whole next list is copied from Using an Eclipse-based IDE article on ChibiOS/RT.
- The default settings in Eclipse CDT are not ideal for embedded development, before starting importing projects into the workspace please execute the following steps:
- Open Eclipse preferences: “Window→Preferences”.
- Navigate the left tree into “C/C++→Code Analysis” and disable everything, without doing this you will see a lot of Errors and Warnings from the static analyzer mixed to the errors found by the compiler and that is very confusing.
- Navigate the left tree into “C/C++→New CDT Project Wizard→Makefile Project” then select the “Discovery Options” tab. Select “Automatic discovery of paths and symbols” and then “GCC per project scanner info profile”. This will enable Eclipse CDT to automatically find all the projects paths when the project is first compiled.
- Select the “Behaviour” tab and select “Use parallel build” then “Use optimal jobs number”. This will enable the projects build using all the available cores, much much faster.
- Navigate the left tree into “Run/Debug→Launching→Default Launchers”.
- Select “GDB Hardware Debugging→[debug]” then select “Standard GDB Hardware Debugging Launcher”. This will select the proper debugging mode when using various extensions plugins like the ChibiOS/RT debugging plugin.
- Press “Apply” and close the properties dialog.
Flash support
- Install ST-Link Utility (in this tutorial to "C:\arm\ STM32 ST-LINK Utility")
- Open "Run→External Tools→External Tools Configurations" and create new launcher as show next figure. On tab "Build" uncheck "Build before launch" and on tab "Common" check "External Tools" in "Display and favourites menu" section.
Press Apply and close the dialog.
- Now you can flash (program) your STM32 microprocessor simply by running "ST-LINK flash".
Debug Support
- For debugging is necessary to install "C/C++ GDB Hardware Debugging" from "Help →Install New Software.."
- Download Atollic TrueSTUDIO® for ARM® Lite installer and unpack it by 7zip or similiar unpacker. You just need directory ".\Servers\ST-LINK_gdbserver". Copy it somewhere out of the unpacked installer (in this tutorial "C:\arm\ ST-LINK_gdbserver"). Remain files you can delete.
- Open "Run→External Tools→External Tools Configurations" and create new launcher as show next figure. On tab "Build" uncheck "Build before launch" and on tab "Common" check "External Tools" in "Display and favourites menu" section. If you wan to use JTAG instead of SWD, justm remove -d argument from arguments section. Press Apply and close the dialog.
- Now create new Debug configuraton for our purposes. Go to "Run → Debug Configurations".
- Configure Main tab as show next figure.
- Configure Debugger tab as show next figure.
- On Startup tab check Set break point at: and fill main. To section Run Commands on the same tab fill jump ResetHandler. On tab "Common" check "Debug" in "Display and favourites menu" section. Press Apply and close the dialog.
Debugging
Before debugging you have to run ST-Link GDB Server (SWD) and then just press ARM-STM32 (ST-Link) in your Debug configurations.





