Library Configuration


Most libraries included in the Dooba SDK deal with a certain amount of constants relating to hardware configuration.
In most (all, really) cases, these constants are configured for use with the ioNode, often coupled with the Fiddle.

However, the SDK is designed with custom boards in mind. All of these constants are configurable.

A word about scope

Typically, applications are made to target specific hardware platforms. However, sometimes even libraries may happen to specific hardware.
For this reason, configuration can be overridden at various levels.

To configure a library that we're using, we need to modify our definition file (dfe.conf).
When building, configuration will be passed down to dependencies as dbuild recursively builds them.

How it's done

Below is a simple real-world example - the Trax Tank Controller uses a board with a different wiring for the WiFi module.
Therefore its definition file reflects the required adjustments:

# Dooba Firmware Element Configuration

name: trax
type: app
mmcu: atmega1284p
freq: 10000000L
  - ionode
  - esp8266
  - scom
  - pwm
  - -DESP8266_P_RST=4
  - -DESP8266_P_FLASH=5

Notice the compiler_options section? This is where we can override the pin configuration for the esp8266 library, to match the Trax hardware platform.