It seems that former is not yes supported and latter doesn’t works like expected.
Using vscode + PIO extension to let me compile code for 4313 if I only use:
board = ATTINY4313
I can’t use ‘PCINT2_vect’. To compile I have to force:
board_build.mcu = attiny4313
Why did you capitilize it? Documentation says otherwise.
I only see the ATTiny 2313 being support – however, according to Atmel docs the changes are minor. The non-A version missing some interrupts and other register bits; if you don’t need them using the above chip variant might still work.
Do you know of an Arduino core that supports the 2313A? I haven’t found any.
Capitalize? I think is a kind of “window case insensitive” case. when set to lowercase I get a lot of compile errors. It seems I have to define TONETIMER_NUMBER_PRESCALERS but if I do it I get “redefined”…
Yes 2313A has 2 more interrupt vectors (the ones I need to handle) don’t know if supported by Arduino but toolchain has it (C:\Users\XXX\.platformio\packages\toolchain-atmelavr\avr\include\avr\iotn2313a.h)
Can you share the exact project ( platformio.ini + code) that reproduces these error messages you’re getting? By not writing the board name correctly, some things might internally go wrong in PlatformIO.
PlatformIO passes the mcu parameter on to avr-gcc. So you might actually try to do a
Since I’m unable to reproduce them, please upload your full project folder somewhere (e.g. google drive) so I can try it with that. If it works for me, you might have a corrupted package somewhere.
C:\Users\Max\Downloads\Oled-Board-master>pio run
Processing OLED_BOARD (platform: atmelavr; board: attiny4313; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduino-avr-attiny @ ~1.3.2
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: framework-arduino-avr-attiny @ 1.3.2 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/attiny4313.html
PLATFORM: Atmel AVR (3.0.0) > Generic ATtiny4313
HARDWARE: ATTINY4313 8MHz, 256B RAM, 4KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr-attiny 1.3.2
- toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 9 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\OLED_BOARD\src\oled.cpp.o
Archiving .pio\build\OLED_BOARD\libFrameworkArduinoVariant.a
Compiling .pio\build\OLED_BOARD\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\Print.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\TinySoftwareSerial.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\WInterrupts.c.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\WString.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\abi.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\main.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\new.cpp.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\wiring.c.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\wiring_analog.c.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\wiring_digital.c.o
Indexing .pio\build\OLED_BOARD\libFrameworkArduinoVariant.a
Compiling .pio\build\OLED_BOARD\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\OLED_BOARD\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\OLED_BOARD\libFrameworkArduino.a
Indexing .pio\build\OLED_BOARD\libFrameworkArduino.a
Linking .pio\build\OLED_BOARD\firmware.elf
Checking size .pio\build\OLED_BOARD\firmware.elf
Building .pio\build\OLED_BOARD\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 9.8% (used 25 bytes from 256 bytes)
Flash: [== ] 16.0% (used 654 bytes from 4096 bytes)
========================================================== [SUCCESS] Took 5.62 seconds ==========================================================
Try and remove C:\Users\<user>\.platformio\packages\framework-arduino-avr-attiny and C:\Users\<user>.platformio\packages\toolchain-atmelavr and recompile to get a fresh version of the framework and toolchain.
If that also doesn’t help, upgrade all things to the latest version. In a PlatformIO CLI, do a pio upgrade --dev and pio platform update, then restart VSCode and retry.