VSCode & PlatformIO


#1

Hello,

I’m new in VSCode & PlatformIO.
Everything seems working except a path in the problems reports.

I compile my project with SUCCES, but I have few warnings shown in PROBLEMS columns.
When I click on the file having the warning, I have message “File not found”.

When I check where the is suppose to be, it says :

~/Documents/PlatformIO/Projects/MyProjects/User/Me/Documents/PlatformIO/Projects/MyProjects/

So it’s PATH problem, it join my project path + full path. Any idea how I can solve this ?

Thanks,
Minims


#2

Can you provide a screenshot? Does this occur on every project?


#3

Yes, it’s some projects imported from Arduino via PlatformIO.


#4

Can you provide the full sketch (without passwords of course) and platformio.ini?


#5

platform.io:

[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
monitor_speed = 115200 

and a project I have imported :

Same issue.


#6

But the warnings from the lower screenshot are justified, they are actual compiler warnings. Can you reproduce the errors with any other project? Where do you have the MQ7.ino file from?


#7

MQ7.ino is one of mine : MQ7

The lib I use in this code is :
Fetch URL: https://github.com/swatish17/MQ7-Library.git

I have made some errors here to have the problem. same platform.io file.

The second error have not the right path.


#8

Could you try to convert INO to CPP? See https://docs.platformio.org/en/latest/faq.html#convert-arduino-file-to-c-manually

Did it help?


Intellisense giving false error squiggles
#9

Hi @ivankravets, Yes it works great in this way.
So why does it fails if it’s an .ino file ?


#10

INO is not a valid CPP format. It’s a specific file format which was developed for Wiring IDE. Later, Banzi (Arduino co-founder) stole an idea with Wiring and made a business on top of Wiring under “Arduino” label. As result, PDE (original format) was copied to INO. I recommend to read this https://arduinohistory.github.io/

In any case, I’ve just filed an issue and will add warning to PlatformIO IDE about possible issues with INO format: