Arduino

From ERIKA WIKI
Jump to: navigation, search

Synopsys

The Arduino UNO is a low cost, open-source board produced by Arduino with Atmel (now Microchip) ATmega328p microcontroller, interfaces to USB, and many I/O to connect whatever device you need.

The Arduino UNO board (see Figure 1) is supported by the AVR8 porting of ERIKA Enterprise v3 and by Arduino SDK 1.8.5.


Figure 1: The Arduino UNO board

Configuration and Programming

Here are listed, after the informations to set Arduino parameters, the OIL fields customized to integrate the Arduino SDK 1.8.5 in ERIKA Enterprise v3.

See RT-Druid configuration page for more details about how configure RT-Druid.

Arduino SDK Path

It is possible to choose the path of the Arduino SDK 1.8.5 in three different ways:

  • Arduino SDK specific environment variables: ARDUINO_SDK_FILES.
    • E.g.: ARDUINO_SDK_FILES="C:\Program Files (x86)\Arduino".
  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_avr8__path_for_arduino_sdk.
    • E.g.: preference_avr8__path_for_arduino_sdk="C:\Program Files (x86)\Arduino".

Arduino Serial Port

It is possible to choose the Arduino Serial Port in two different ways:

  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_avr8__serial_port_for_arduino.
    • E.g.: preference_avr8__serial_port_for_arduino=COM3

Arduino Serial Baurate

It is possible to choose the Arduino Serial Baudrate in two different ways:

  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_avr8__serial_baudrate_for_arduino.
    • E.g.: preference_avr8__serial_baudrate_for_arduino=115200


Library Integration

LIB section in the OIL file MUST be set to ARDUINO.

ARDUINO library section has the following objects and attributes:

  • STAND_ALONE: Arduino SDK integration Mode.
    • FALSE: To integrate Arduino SDK in libee.a.
    • TRUE: To generate a stand-alone libarduinosdk.a.
  • SDK_BOARD: Arduino SDK Board Selection.
  • VARIANT: Arduino SDK Variant.
    • CC: Arduino.cc.
      • VERSION: Version.

Example of a LIB section:

   LIB = ARDUINO {
     /* Used to select Board: UNO or NANO */
     SDK_BOARD = UNO;
     /* Used to select vendor: CC or ORG */
     VARIANT = CC {
       VERSION = "1.8.5";
     };
     /* Create libarduino.a */
     STAND_ALONE = TRUE;
   };

Programming

To program Arduino UNO board see this tutorial.