CLion 2020.1 EAP: IAR Toolchain, PlatformIO Plugin, and Updates to Change Signature Refactoring

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

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:
IAR Toolchain

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:
    PlatformIO plugin
  • 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:
Change Signature default value

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:
Parameter from usage

Extract Parameter uses either the default type value or the value with which the variable is initialized:
Extract Parameter update

There is also a new ability to split terminal sessions vertically or horizontally so that you can run them side by side. Check out the full release notes here.


Your CLion team
The Drive to Develop

This entry was posted in Early Access Preview and tagged , , , , . Bookmark the permalink.

13 Responses to CLion 2020.1 EAP: IAR Toolchain, PlatformIO Plugin, and Updates to Change Signature Refactoring

  1. Wokabo says:

    Horrible freezes included?

  2. Roman says:

    Performance was #1 for 2020.1:
    “Performance and responsiveness: continue eliminating UI freezes and working on large architectural changes to make global improvements to CLion’s performance.”

    Do you still plan these? For me currently performance is the main issue.

    • Anastasia Kazakova says:

      For sure, and we are on it. Mostly working on various internal prototypes and architectural changes, so nothing to announce yet, except some small improvements here and there, which mostly go to release notes silently. But I can assure you we are now working hard on possible bigger changes.

  3. Olga says:

    Thanks for the IAR supporting. Looks good.

  4. Pete says:

    I am working with CLion for 2 years on a midsize ARM Embedded pure ANSI-C project (about 160 files). With build (201.6073.20) it is the first time, that I have UI freezes. In some (not all) files I encounter delays for up to 3 secs for a single keystroke.

    Is there a way to monitor would causes these freezes and send it to you?

    • Anastasia Kazakova says:

      Sure, when the UI freeze happens the thread dump is automatically captured. Go to the log directory (Help | Show log in ), pack the recent freezes along with the idea.log, send to us (ticket or via support channel) with the description of what you were doing during the freeze. We’ll much appreciate the info.

Leave a Reply

Your email address will not be published. Required fields are marked *