Skip to content

Attiny85 not compiling, but works in Arduino-IDE #215

Closed
@yesimxev

Description

@yesimxev

Hopefully this is just a missing library or so. I'm trying to compile a C source, as I need the CLI to make my process flawless. At the moment, I have to edit the source in Arduino IDE, and compile there, which works without anything really installed. I have the Attiny core/board installed in both of them.

I have the additional boards installed into arduino-cli.yml
I have the ardino-avr lib installed.

board_manager:
  additional_urls:
    - https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
root@kali:/usr/share/arduino/hardware/arduino/cores/arduino# arduino-cli compile -b attiny:avr:ATtinyX5:cpu=attiny85,clock=internal8 /root/Arduino/Magspoof
Build options changed, rebuilding all
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c: In function 'setup':
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:52:18: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(PIN_A, OUTPUT);
                  ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:52:18: note: each undeclared identifier is reported only once for each function it appears in
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:55:23: error: 'INPUT_PULLUP' undeclared (first use in this function)
   pinMode(BUTTON_PIN, INPUT_PULLUP);
                       ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c: In function 'blink':
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:68:23: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(pin, HIGH);
                       ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:70:23: error: 'LOW' undeclared (first use in this function)
     digitalWrite(pin, LOW);
                       ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c: In function 'playTrack':
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:115:28: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(ENABLE_PIN, HIGH);
                            ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:179:23: error: 'LOW' undeclared (first use in this function)
   digitalWrite(PIN_A, LOW);
                       ^
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c: In function 'loop':
/tmp/arduino-sketch-12E8601B7903A1C11826B3F60370E025/sketch/magspoof.c:290:37: error: 'LOW' undeclared (first use in this function)
   while (digitalRead(BUTTON_PIN) == LOW);
                                     ^
Error: exit status 1
Compilation failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions