I’m using a simple attiny85 chip and a USBtinyISP, The code is uploading fine, I can add blinking lights on the middle of my code and i can see it blinking.
Simplified the code a bit for testing:
#define BUZZER_PIN 4
#define LED_PIN 1
#define BUZZER_ALARM_FREQUENCY 600
Buzzer works on arduino but not on platformio (on vscode), to test my theory out, I replaced the cores/tiny definition from platformio with the SpenceKonde (i did a diff, some files are different, but strangely not the tone.cpp), created a new variant called attiny85x
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATTINY85",
Now, if I change my board file from board=attiny85 to attiny85x, the tone function does work under platformIO. So it is definitely something with the core shipped with Atmel AVR platform.