I have to restart the IDE after every compilation for ATtiny.

I can compile and upload a program one time and then without making any changes to the sketch when I try uploading again I get this error message:

avr-gcc: error: C:\Users\jalau\AppData\Local\Temp\arduino_build_769854/..\arduino_cache_260658\core\core_diy_attiny_avr_attiny13_diy_version_attiny13a,boot_none,clock_9_6MHz,core_MillisCore,millis_ppm_1p6,print_BinHexDec,serial_HalfDuplexRW,lto_enable,bodlevel_2v7_807f99df2a7081cadbcaa898d8fc1fc9.a: No such file or directory

Even if I did make changes to the sketch it doesn't upload the only thing that lets me upload again is restarting the IDE.

I am using an Arduino as ISP to program an ATtiny13a using the DIY ATtiny board library

Does the same problem occur if you only compile?

Does the same problem occur if you select Tools > Board > Arduino/Genuino Uno?

Yes, It only compiles once.

It doesn't have this problem when compiling for the UNO or for the ATtiny85 in the same boards library

Post a link to where you got the DIY ATtiny board library from.

If it has the necessary configuration, you might want to try using MicroCore instead:

Here is the link that I put in the preferences to get the additional boards:

https://raw.githubusercontent.com/sleemanj/optiboot/master/dists/package_gogo_diy_attiny_index.json

I installed it but I can't reproduce the issue.

Absolutely not my area of expertise. But that filepath is extremely long (and actually exceeds what a windows command prompt /shell can handle).

Hmm, I wonder if it's that simple? The board name is just long enough that that core generates a too-long path from it...?

in that case, it's a bug in the core.

I found out why I couldn't reproduce the issue. I had File > Preferences > Aggressively Cache Compiled Core unchecked. With that option checked I can now reproduce the issue.

So the workaround is to uncheck that option.

I'm now investigating to see if I can find the actual cause of the problem.

OK, it is that the path to the .a file exceeds Windows' MAX_PATH of 260 characters. Supposedly Windows has a feature where you can prefix the long path with \?\ to increase the max path length of 32,767 characters but when I do that avr-gcc doesn't like it "Invalid argument".

There is also supposedly a registry edit you can make to remove this limitation but I already had it set and the problem still occurs for me:

So I don't know if there is a good fix for this other than to shorten the board option identifiers.

There was a similar issue with the maximum command length (something like 32,767) on Windows:

The limitation on Linux is much larger so that was only a problem on Windows.

I went and unchecked File > Preferences > Aggressively Cache Compiled Core and now all is working well! Thanks for all the help!