STM32CubeMX Projects and GNU ARM Eclipse
STM32CubeMX Project Export
- Open STM32CubeMX and open the your project
- in Project -> Settings…
- select the Project tab
- under Toolchain / IDE
- select SW4STM32
- hit OK
- It will warn you that the previously generated files will be corrupted. That’s ok. They’re not there.
- select Project -> Generate Code
Import Project into Eclipse
Pretty simple:
- in the Project Exporer tab, right-click to show the context menu and select Import…
- under C/C++, select Existing Code as Makefile Project
- hit Next
- in the Import Existing Code dialog
- name the project
- hit Browse and select your repo top-level directory
- under Toolchain for Indexer Settings, select Cross ARM GCC
- hit Finish
Configure the Project
- Enable Parallel Build
- in C/C++ Build, select the Behavior tab
- under Build Settings, check the Enable parallel build box, and select the Use unlimited jobs radiobutton
- under Workbench Build Behavior, check the Build on resource save (Auto build) box
- Specify Build Configurations
- in C/C++ Build, click the Manage Configurations… button
- create a new configuration called
Release
by copying the current configuration - rename the current configuration to
Debug
- click Ok
- create a new configuration called
- with the Debug configuration selected,
- select the Behavior tab
- under Workbench Build Behavior, for the Build field, enter
target=<_your_target_name_here_> build=Debug
- for the Build on Resource Save (Auto Build), enter the same value from the Build field
- for the Clean field, enter
clean target=<_your_target_name_here_>
- with the Release configuration selected,
- select the Behavior tab
- under Workbench Build Behavior, for the Build field, enter
target=<_your_target_name_here_> build=Release
- for the Build on Resource Save (Auto Build), enter the same value from the Build field
- for the Clean field, enter
clean target=<_your_target_name_here_>
- in C/C++ Build, click the Manage Configurations… button