Go Down

Topic: [FIXED] Code using SoftwareSerial on ATTiny won't compile on IDE 1.6 (Read 3204 times) previous topic - next topic

Vicne

Hi,

I had to reinstall my Windows 7 32b PC and thought I would try the new Arduino IDE1.6 (I was previously using 1.0.6).

I'm programming for an ATTiny85, so I had to install the correct cores from https://code.google.com/p/arduino-tiny/ (I was using "1.0" version before but now installed "1.5").
That went smoothly and I just built and uploaded the "blink" sample, which works perfectly.

However, my current project uses the "SoftwareSerial" library (the one included with the IDE distribution), and my sketch complains because of a seemingly missing "SoftwareSerial.h" :

Code: [Select]
SerialLed09.ino:1:28: fatal error: SoftwareSerial.h: No such file or directory
compilation terminated.
Error compiling.


If I switch the board to, e.g. Arduino Uno or Arduino Yùn, then the build completes with no issue.

I am absolutely certain that the same combination (ATTiny core and SoftwareSerial) with the same source code worked perfectly with v1.0.6 of the IDE but I admit I never tried in 1.5.x or 1.6.x.

I googled that error message but only found it in old topics about other boards :-(

Does anybody have an idea how to solve this issue ? I could uninstall and go back to 1.0.6 but I'd rather go forward :-)

Any hint is welcome...

Kind regards,


Vicne

Vicne


Note: Another post made me remember I first had the following error with ATTiny cores 1.5 and IDE 1.6:
Quote
"Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer."
After a bit of googling around, what I did was edit the hardware\tiny\avr\platform.txt file from the tiny cores and add:
Code: [Select]
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
just after the commented out compiler.path declaration, and then only could I compile and upload Blink without issues.

Could it be the reason of the problem ?

Kind regards,

Vicne

Vicne

Hi,

I finally fixed the issue.
The way I understand it is that on 1.6, libraries seem to be defined "per board" and not in a shared fashion anymore.
Consequently, once switching to an ATTiny board, the SoftwareSerial library was not found anymore.
What I did was duplicate the full "libraries" folder from
C:\Program Files\Arduino\hardware\arduino\avr
to
C:\Users\<username>\Documents\Arduino\hardware\tiny\avr
(this is for W7 32b. You may have to adapt the paths for other OSes)

That was basically what others did with EEPROM in this topic.

Note that this may be due to the fact that I installed the arduino tiny cores under my <username> sketch folder and not inside the program folder. I heard it was a good idea for seamless IDE upgrades, but maybe it was not such a good idea in the end (and, true, as the structure has changed between 1.0 and 1.5+, this argument is moot).

Any information about the correct way to handle this case is welcome:
- is that an IDE bug or feature ?
- should all core developers include all libraries (sounds weird) ? I could then file a bug there...
- is installing cores in user folder considered bad practice ?

Kind regards,

Vicne

Go Up