richardvdweerd / a85_fluor_lights

Flickering lights simulator for use in a dcc model train.
0 stars 0 forks source link

error within #ifdef #1

Open richardvdweerd opened 3 years ago

richardvdweerd commented 3 years ago

if defined( MEGATINYCORE_SERIES )

include

endif

if defined( __AVRATtiny85_\ )

include

endif

I am using PlatformIO. Compiling for environments "attiny85" and "attiny1616" works fine, while compiling for environment "program_via_ArduinoISP" I get an error:

C:\users\gebruiker.platformio\packages\framework-arduino-avr-attiny\libraries\tinyNeoPixel\tinyNeoPixel.cpp: In member function 'void tinyNeoPixel::show()': C:\users\gebruiker.platformio\packages\framework-arduino-avr-attiny\libraries\tinyNeoPixel\tinyNeoPixel.cpp:176:8: error: 'NEOPIXELPORT' was not declared in this scope hi = NEOPIXELPORT | pinMask; ^~~~ C:\users\gebruiker.platformio\packages\framework-arduino-avr-attiny\libraries\tinyNeoPixel\tinyNeoPixel.cpp:176:8: note: suggested alternative: 'NOT_A_PORT' hi = NEOPIXELPORT | pinMask; ^~~~ NOT_A_PORT`

All works fine when #include <tinyNeoPixel.h> is commented out, using the "Arduino-ISP" environment.

richardvdweerd commented 3 years ago

Here is the platformio.ini file: ; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html

[platformio] default_envs = attiny85

; test platform - digispark attiny85 [env:attiny85] platform = atmelavr board = digispark-tiny framework = arduino

; live platform - attiny85 on custom board [env:program_via_ArduinoISP] platform = atmelavr board = attiny85 framework = arduino upload_protocol = custom upload_port = COM5 upload_speed = 19200 board_build.f_cpu = 8000000L upload_flags = -C ; use "tool-avrdude-megaavr" for the atmelmegaavr platform $PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf -p $BOARD_MCU -P $UPLOAD_PORT -b $UPLOAD_SPEED -c stk500v1 upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

[env:attiny1616] platform = atmelmegaavr board = attiny1616 framework = arduino