A new CLion 2020.1 EAP build is now available for download!
You can download the build (201.6251.14) from our website, via the Toolbox App or as a snap package (for Ubuntu) and install it side by side with the stable release build.
- IAR toolchain/compiler support
- The first version of the PlatformIO plugin for CLion
- An update to the Change Signature refactoring
The CLion team is now working hard toward Embedded Development support. And this build has taken another important step – support for the IAR compiler/toolchain. Before, CLion already worked with GCC-based toolchains, Clang, and Microsoft Visual C++ toolchain (Intel compiler also works but with limitations). But the IAR toolchain is different, and so collecting compiler information in CLion previously failed.
CLion now supports the IAR compiler, which means it detects the compiler correctly and collects compiler info. Thus, projects using the IAR toolchain load successfully and work in CLion:
Note that MinGW is required for you to be able to use the IAR compiler. You might also be interested in how to use CMake with IAR Embedded Workbench. Additionally, we recommend you use Ninja as a CMake generator because of the following issue: CPP-19327.
We would also love to thank IAR Systems AB for their support and partner licenses, which helped us develop and test the integration.
PlatformIO plugin for CLion
In collaboration with the PlatformIO team, we’ve recently started some work in CLion to improve integration and help CLion users benefit from this new generation ecosystem for embedded development.
There is now an experimental plugin you can install which allows you to try the following:
- Create a new PlatformIO project from CLion’s New Project wizard:
- Have CLion PlatformIO projects generated and have several PlatformIO Run/Debug configurations created automatically (for debug and upload).
- Debug with the PIO Unified Debugger from CLion right on chip.
- Run PlatformIO tests (the configuration should be created manually).
- Upload firmware to the chip from CLion.
Don’t forget to install PlatformIO itself to get the plugin working correctly.
We will continue to work on this plugin, so stay tuned!
Default value in Change Signature refactoring
When calling the Change Signature refactoring (Ctrl+F6 on Windows and Linux, ⌘F6 on macOS), CLion updates all the usages of the function. Previously when adding a new parameter to the function signature, CLion simply added a default type value as an argument to the usages (i.e.
0 for numerical,
nullptr for pointers). This helps keep the code compilable, but is not always what you want, as you might need some other value to be used (and so in this case you later have to call the Find Usages and update the arguments manually).
Now, Change Signature refactoring includes the ability to point CLion to a value to be used by adding the required value to the new Default value field in the dialog:
If you keep the field blank, the old behavior is applied and the default value for the type is used.
The same logic applies to the Create Parameter From Usage quick-fix and the Add Parameter to Constructor intention:
Extract Parameter uses either the default type value or the value with which the variable is initialized:
Your CLion team
The Drive to Develop