avr-gcc error related to attiny13

thank you for your attention.

Arduino IDE showed error message like this

C:\Users\user\AppData\Local\Temp\arduino_build_364232/…\arduino_cache_580864\core\core_diy_
attiny_avr_attiny13_diy_version_attiny13,boot_none,clock_9_6MHz,core_MillisCore,millis_ppm_1p6,
print_BinHexDec,serial_HalfDuplexRW,lto_enable,bodlevel_2v7_6b7b3b2f0c5502ff24b3b6bf6d758fb0.a
: No such file or directory

I was doing programming sleep mode using pin change interrupt in attiny13 board

A kind of Power switch(Mosfet) activating in Certain (interrupt) signal

My sketch is as below

// ATiny_SmartSwitch.ino
//
#include <avr/io.h>
#include <avr/sleep.h>

const int wakeUpPin = 3; // PB3: External Signal Pin (Interrupt)
const byte powerPin = 4; // PB4: MOSFET Gate Pin

int prevState = 0;
int long time2sleep = 5000; // Stand by Time to Sleep (ms)
unsigned long lastActive = 0;

void setup() {
pinMode(wakeUpPin, INPUT);
digitalWrite(wakeUpPin, HIGH);
pinMode(powerPin,OUTPUT);

PCMSK |= (1<<PCINT3); // pin change mask: listen to portb, pin PB3
GIMSK |= (1<<PCIE); // enable PCINT interrupt // PB3 as an Interrupt Pin (Wake up)

}

void loop() {
digitalWrite (powerPin, HIGH); // MOSFET ON

if(digitalRead(wakeUpPin) == LOW) {
if(prevState == 0) lastActive = millis();
prevState = 1;
}
else {
prevState = 0;
}

if(millis()-lastActive > time2sleep) { // If 5 seconds passed since last wakeup occured, it goes to sleep
digitalWrite (powerPin, LOW);
goToSleep();
lastActive = millis();
}
}

void goToSleep() {
sleep_enable();

set_sleep_mode(SLEEP_MODE_PWR_DOWN);

sleep_cpu(); // Sleep Now… z z z z z

sleep_disable(); // Wake up Here

}

ISR(PCINT0_vect) {
// Do Something !!!

}

I don’t understand what that error message means!

But I found out it worked in attiny 25/45/85 series, while I was struggling with this matter.

Main Differences between 13 and 25/45/85 are clock hz and Ram size

the address of this information is from the posting;

I think it could be a clue. but I dont know how to apply this clue to my sketch.

Can you advise me how to fix it?

Try using MicroCore to see if the problem still occurs:

thank you for your solution..

It's strange.

Because I also doubted that incomplete board would have been a reason, I changed Attiny Board URL to microcore from something else.

But it didn't work.

thus I thought it' not the cause of malfunctioning.

ButI tried again . Cause you suggested it!
And it Worked! I don't understand how it works.
I spent whole afternoon struggling with this problem.

So I decided to use Arduino Forum for the first time to solve this matter

And the result is as you see.

thank you for your help

It still seems to me a miracle. I might need time to get used to it. ^^ Have a good day~

Glad to hear it's working! It's frustrating when a problem is resolved without really understanding the cause but I suppose sometimes we just need to be grateful for the miracles.

Enjoy!
Per