Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino internal libraries not working #550

Closed
alangerak opened this issue Feb 29, 2016 · 13 comments
Closed

Arduino internal libraries not working #550

alangerak opened this issue Feb 29, 2016 · 13 comments
Assignees
Labels
Milestone

Comments

@alangerak
Copy link

Recently, I upgraded from 2.6.1 to 2.8.4 and the internal libraries from Arduino are not working anymore. It doesn't recognise the default Arduino functions (digitalWrite etc.) but the arduino header(Arduino.h) is included.

I have run the tests using tox and the results are found here. (I had to use an exernal file, output is too large to show here)

I have tested this both Ubuntu 14.04 and Windows 8.1 but I had the same issue.

Is there a workaround for this problem other than replacing the internal libraries for external ones?

@ivankravets
Copy link
Member

What do you see in ~/.platformio/packages/framework-arduinoavr ?

@alangerak
Copy link
Author

Tree File structure

All the libraries seems to be there and I checked some of the libraries and there are identical to the ones that Arduino supplies with their IDE

@ivankravets
Copy link
Member

Try to remove rm -rf ~/.platformio.

@alangerak
Copy link
Author

So, basically reinstalling the toolchain right? In that case, it did not work. If you want to know, I have tried to link the created object file inside the library from the .pioenvs (inside of the project dir) to example code but gcc didn't complain about linking errors. Maybe there goes something wrong with linking to Arduino.h ?

@ivankravets
Copy link
Member

.pioenvs is cache directory for PlatformIO Build System. Please don't depend on it. Try to remove this folder.

@alangerak
Copy link
Author

I have removed/reinstalled it, making sure that every file has deleted(including 'hidden directories'). After that, I tried the following: create this project with megaatmega2560 as a board. When I run $platformio run , it will only give an error to the map function of Arduino. All other functions that does not use map, are compiling and working on the target board with servo.

What is even more surprising (to me) is that if I add the following line at the end of the loop() functions: map(0, 0, 1023, 0, 255);
The program does compile completely and works on the target board.

@valeros
Copy link
Member

valeros commented Mar 1, 2016

Hi @alangerak
I've just compiled your example without any error on Win8.1 x64.
Could you provide full build log please?

@alangerak
Copy link
Author

You mean the terminal output of platformio run? build log

@valeros
Copy link
Member

valeros commented Mar 1, 2016

@alangerak Please provide terminal output from platformio run -t envdump

@alangerak
Copy link
Author

envdump

@ivankravets ivankravets added this to the 2.8.5 milestone Mar 1, 2016
@valeros
Copy link
Member

valeros commented Mar 1, 2016

Thanks, the problem is localized.
I created a special PlatformIO version for debugging, could you please test it and provide terminal output from platformio run?
pip install https://github.com/platformio/platformio/archive/feature/issue-550-debug.zip

@alangerak
Copy link
Author

Terminal output

@ivankravets
Copy link
Member

Thanks a lot! Please try the latest http://docs.platformio.org/en/latest/installation.html#development-version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants