user27884: I recently try to get my Arduino Pro Mini (5v 16mhz)running in Clion.
I tried to set up the CMakeList.txt but I get the following error: 

Error:Can not find f_cpu in boards.txt for Arduino board ID (pro),
  aborting.

I used the following configuration:
set(${CMAKE_PROJECT_NAME}_BOARD pro)

In the boards text, located at C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt I found the following lines:
pro.name=Arduino Pro or Pro Mini

pro.upload.tool=avrdude
pro.upload.protocol=arduino

pro.bootloader.tool=avrdude
pro.bootloader.unlock_bits=0x3F
pro.bootloader.lock_bits=0x0F

pro.build.board=AVR_PRO
pro.build.core=arduino
pro.build.variant=eightanaloginputs

## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz)

pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600

pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x05
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L

So I'm wondering what Boardname to use, to get the Pro Mini working. Thanks in advance!

user4143: The problem here is that the Pro Mini comes in a number of variants for different voltages / speeds etc. The different variants are selected using a menu in the IDE.
CLion doesn't know about those menus, nor how to find the f_cpu from the right one for your board.
So there are two solutions:

Create your own board entry for the Pro Mini without the menu entries. 
Use an earlier version of the IDE that has the Pro Mini boards as separate entries (basically any version before the menu system was created).

If you want the latest API then you will have to go route 1. That could be as simple as modifying the existing pro.* entries to remove the menu and replace that section with just the flags that are set by the correct menu (basically remove all the pro.menu.* entries except the ones for your board, then remove the menu.cpu.<whatever>. from each of the lines, as well as the entire menu entry name line.)
So you would basically change these lines:
## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz)

pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600

pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x05
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L

to this:
## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------    
pro.upload.maximum_size=30720
pro.upload.maximum_data_size=2048
pro.upload.speed=57600

pro.bootloader.low_fuses=0xFF
pro.bootloader.high_fuses=0xDA
pro.bootloader.extended_fuses=0x05
pro.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.build.mcu=atmega328p
pro.build.f_cpu=16000000L

and delete all the other pro.menu entries.

27884: <p>I recently try to get my Arduino Pro Mini (5v 16mhz)running in Clion.</p>

<p>I tried to set up the CMakeList.txt but I get the following error: </p>

<blockquote>
  <p>Error:Can not find f_cpu in boards.txt for Arduino board ID (pro),
  aborting.</p>
</blockquote>

<p>I used the following configuration:</p>

<pre><code>set(${CMAKE_PROJECT_NAME}_BOARD pro)
</code></pre>

<p>In the boards text, located at C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt I found the following lines:</p>

<pre><code>pro.name=Arduino Pro or Pro Mini

pro.upload.tool=avrdude
pro.upload.protocol=arduino

pro.bootloader.tool=avrdude
pro.bootloader.unlock_bits=0x3F
pro.bootloader.lock_bits=0x0F

pro.build.board=AVR_PRO
pro.build.core=arduino
pro.build.variant=eightanaloginputs

## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz)

pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600

pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x05
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
</code></pre>

<p>So I'm wondering what Boardname to use, to get the Pro Mini working. Thanks in advance!</p>
 4143: <p>The problem here is that the Pro Mini comes in a number of variants for different voltages / speeds etc. The different variants are selected using a menu in the IDE.</p>

<p>CLion doesn't know about those menus, nor how to find the f_cpu from the right one for your board.</p>

<p>So there are two solutions:</p>

<ol>
<li>Create your own board entry for the Pro Mini without the menu entries. </li>
<li>Use an earlier version of the IDE that has the Pro Mini boards as separate entries (basically any version before the menu system was created).</li>
</ol>

<p>If you want the latest API then you will have to go route 1. That could be as simple as modifying the existing <code>pro.*</code> entries to remove the menu and replace that section with just the flags that are set by the correct menu (basically remove all the <code>pro.menu.*</code> entries except the ones for your board, then remove the <code>menu.cpu.&lt;whatever&gt;.</code> from each of the lines, as well as the entire menu entry name line.)</p>

<p>So you would basically change these lines:</p>

<pre><code>## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz)

pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600

pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x05
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
</code></pre>

<p>to this:</p>

<pre><code>## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------    
pro.upload.maximum_size=30720
pro.upload.maximum_data_size=2048
pro.upload.speed=57600

pro.bootloader.low_fuses=0xFF
pro.bootloader.high_fuses=0xDA
pro.bootloader.extended_fuses=0x05
pro.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

pro.build.mcu=atmega328p
pro.build.f_cpu=16000000L
</code></pre>

<p>and delete all the other <code>pro.menu</code> entries.</p>
