PlatformIO Community

ATTiny85 library appears to be broken


#1

It seems that the ATTiny85 library is broken on most recent platformio (Home 2.0.0, Core 3.6.4 (running on vscode).

//platform.ini
[env:digispark-tiny]
platform = atmelavr
board = digispark-tiny
framework = arduino

Build output:

[Running] cd "/Users/jottr/dev/platform-io/digispark-test/src/" && g++ main.cpp -o main && "/Users/jottr/dev/platform-io/digispark-test/src/"main
main.cpp:1:10: fatal error: 'Arduino.h' file not found
#include <Arduino.h>
         ^~~~~~~~~~~
1 error generated.

[Done] exited with code=1 in 0.041 seconds


#2

Does it work on the terminal if you do it? Because for me, it does.

C:\Users\Maxi\Desktop\attiny>pio run
Processing digispark-tiny (platform: atmelavr; board: digispark-tiny; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/digispark-tiny.html
PLATFORM: Atmel AVR > Digispark USB
HARDWARE: ATTINY85 16MHz 512B RAM (5.87KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 29 compatible libraries
Scanning dependencies...
No dependencies
avr-g++ -o .pioenvs\digispark-tiny\src\main.cpp.o -c -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=attiny85 -DPLATFORMIO=40000 -DARDUINO_AVR_DIGISPARK -DF_CPU=16500000L -DARDUINO_ARCH_AVR -DARDUINO=10805 -Isrc -Iinclude -IC:\Users\Maxi\.platformio\packages\framework-arduinoavr\cores\digispark_tiny -IC:\Users\Maxi\.platformio\packages\framework-arduinoavr\variants\digispark src\main.cpp
avr-gcc -o .pioenvs\digispark-tiny\FrameworkArduinoVariant\pins_arduino.c.o -c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=attiny85 -DPLATFORMIO=40000 -DARDUINO_AVR_DIGISPARK -DF_CPU=16500000L -DARDUINO_ARCH_AVR -DARDUINO=10805 -IC:\Users\Maxi\.platformio\packages\framework-arduinoavr\cores\digispark_tiny -IC:\Users\Maxi\.platformio\packages\framework-arduinoavr\variants\digispark C:\Users\Maxi\.platformio\packages\framework-arduinoavr\variants\digispark\pins_arduino.c
...
DATA:    [          ]   1.8% (used 9 bytes from 512 bytes)
PROGRAM: [          ]   4.8% (used 286 bytes from 6012 bytes)
============================================= [SUCCESS] Took 7.96 seconds =============================================

#3

Works just fine for me also on Core v3.6.4 / Atmel AVR v1.12.5

Processing digispark-tiny (platform: atmelavr; board: digispark-tiny; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/digispark-tiny.html
PLATFORM: Atmel AVR > Digispark USB
HARDWARE: ATTINY85 16MHz 512B RAM (5.87KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 30 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pioenvs/digispark-tiny/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   1.8% (used 9 bytes from 512 bytes)
PROGRAM: [          ]   4.8% (used 286 bytes from 6012 bytes)
================================================== [SUCCESS] Took 0.71 seconds ==================================================