UECIDE

|juˈekaɪdiːˈiː| :: Wake Up Your Arduino
Last edit: 2020-10-12 by matt

#Pragma options


Much of UECIDE's internals can be controlled from within your sketch during compilation using #pragma options. This ranges from selecting which board / compiler is in use, to adding extra compilation flags and other settings.

#pragma options take the form of:

#pragma key value

Some compilers also use #pragma internally in the same format. UECIDE understands the following keys:

  • parameter

Sets, or overrides, an internal UECIDE variable. Exactly what variables are available for use depends on the board / core / compiler selected. Common usages include:

#pragma parameter extra.cflags=-Wunused-variable::-Wunused-local-typedefs
#pragma parameter extra.cppflags=-ffast-math
#pragma parameter extra.ldflags=-flto
#pragma parameter extra.libs=-lSDL2
  • board

Sets the current board. Good for locking a sketch down to always compiling for the same board. For example:

#pragma board chipkit-lenny
  • compiler

As for board but selectes a compiler:

#pragma compiler arm-none-eabi-gcc-7
  • core

As for board and compiler but selected a core:

#pragma core arduino
  • option

Similar to parameter but is used to select an entry in the Options menu. Format is:

#pragma option key=value

Where key is the name of a group and value is a selection within that group. The Copy settings option in the Options menu will copy the currently selected options into the clipboard in this #pragma format so you can paste them into your sketch.

  • port

Selects a serial port for you. For example:

#pragma port /dev/ttyUSB1

Support Us

Running this server costs money. This server not only hosts this website, but is also the main build platform for creating the download files for UECIDE. Just a couple of pounds (or Dollars, Yen, Mongolian tögrög... we're not fussy) can help to offset the costs.

Alternatively, if you want to be more personal, you could buy me something on Amazon. I have a small wish-list of low-cost items that I'd quite like to receive. Make it a surprise.

Or at the very least it would help if you could support me through my Amazon affiliate link (click any of the Amazon adverts, like this one below) so that I can scrape a little off their massive profits when you shop with them.


Latest WiKi Edits