Skip to content

initVariant() function not being linked in 1.6.6 #4205

Closed
@kmclifton

Description

@kmclifton

We have some custom init code that needs to run to initialise our hardware (not Arduino). In version 1.6.5 of the IDE we simply included a file called initvariant.cpp (defining void initVariant() ) alongside pins_arduino.h under variants/standard in our package directory. See contents of initvariant.cpp below. With the upgrade to 1.6.6 that seems to have broken. The init code no longer runs at all. It isn't linked in.
Possibly related to this issue: arduino/arduino-builder@aee32ff

#include <Wire.h>
#include <Arduino.h>
#include <pins_arduino.h>

void initVariant() 
{ 
    Wire.begin();
    pinMode(EXPANDER_RSTN, OUTPUT);
    digitalWrite(EXPANDER_RSTN, LOW);
    delay(10);
    digitalWrite(EXPANDER_RSTN, HIGH);

    delay(10);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions