Getting confused with PlatformIO Core

Good morning All!

I am still investigating this problem.

These are the steps I performed:

1. In Atom, I selected PlatformIO->Update platforms, packages, and libraries. This is the output I got:
PS D:\Projects\ActoSenso\Nodes\fws> platformio update
********************************************************************************************************************
Obsolete PIO Core v3.5.1 is used (previous was 3.5.2a3)
Please remove multiple PIO Cores from a system:
http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
********************************************************************************************************************

Updating tool-scons                      @ 3.20501.2      [Up-to-date]
Updating tool-unity                      @ 1.20302.1      [Up-to-date]
Updating contrib-pysite                  @ 0.1.4          [Up-to-date]
Updating contrib-piohome                 @ 0.6.1          [Up-to-date]
Updating tool-pioplus                    @ 0.13.4         [Up-to-date]

Platform Manager
================
Platform Espressif 8266
--------
Updating espressif8266                   @ 1.6.0          [Up-to-date]
Updating tool-mkspiffs                   @ 1.200.0        [Up-to-date]
Updating tool-esptool                    @ 1.409.0        [Up-to-date]
Updating tool-espotapy                   @ 1.1.0          [Up-to-date]
Updating framework-arduinoespressif8266  @ 1.20400.0      [Up-to-date]
Updating toolchain-xtensa                @ 1.40802.0      [Up-to-date]
  1. I went to this page: Redirecting... and following the instructions for removing platformio: pip uninstall platformio
    It uninstalled successfully.

  2. Back in Atom, I selected PlatformIO->Upgrade PlatformIO Core. This is the output I got:
    PS D:\Projects\ActoSenso\Nodes\fws> platformio upgrade
    You’re up-to-date!
    PlatformIO 3.5.1 is currently the newest version available.

  3. If I perform step 1 again, I still get the same output, i.e.:
    Obsolete PIO Core v3.5.1 is used (previous was 3.5.2a3)
    Please remove multiple PIO Cores from a system:

And my project still doesn’t compile, still getting the “‘minute’ was not declared in this scope” and similar errors, and my C:\Users\Viktor.eromu.platformio\lib folder is still empty.

Any ideas how to go on? I’m kind of stuck…

  1. Did you remove all PIO Cores?
  2. Please open PIO IDE Terminal and type pio upgrade --dev
  3. Please provide an output of platformio.ini. It seems that some library. Also, having a simple source file to reproduce this issue would be great.
1 Like

Hi @ivankravets,

  1. I don’t know… How do I do this?
  2. I followed your instructions, and it seemed to be OK. This is the output:
    PS D:\Projects\ActoSenso\Nodes\fws> pio upgrade --devPlease wait while upgrading PlatformIO …
    PlatformIO has been successfully upgraded to 3.5.2a4
    Release notes: Redirecting...
    I tried to compile my project, but it failed with the same errors.
  3. I’m not sure what you mean by the “output of platformio.ini”, but this is the content of the project’s platformio.ini:
    [env:esp12e]
    platform = espressif8266
    framework = arduino
    board = esp12e
    #upload_port = 192.168.1.203
    upload_port = COM5

I use the same platformio.ini for several projects with no problem until a few days ago when I updated/upgraded the whole development environment on my machine. Now all the projects that make use of time functions from Time.h fail to compile.

I will try to prepare a simple sample project for you. For now have a look at the attached screenshot for the error message.

Here is a sample project I prepared that produces the error.
test project

Does it work with Arduino IDE?

I don’t have Arduino IDE installed and don’t want it on my dev machine. I might try it on a test box later.

At the moment, none of my projects compile. And they all compiled OK before the updates.

Shall I try uninstalling then installing everything from scratch? (I would love to avoid this, and use it as a last resort…)

Did the test project I attached compile for you?

I tried your project in different places with different versions. It doesn’t work, even with Arduino IDE. It means that something is wrong with your code. Please get a help here esp8266/Arduino - Gitter

Hmmm, that is interesting… If this is the case, then how do you explain, that all of the other projects stopped working with the same error? Projects, that were already in production, working OK for many months.

I’m not saying it is impossible that there is a problem in my code, but everything was working until this last update.

You also saw, that to get this specific compilation code all you have to have in the code is a mention of one of the data types in time.h. To me this means that there is a problem with the time.h not recognized properly, just as it is mentioned in the linked thread.
I was happy to see that thread offering an explanation (which sounded reasonable), but I found my :\Users\your_user.platformio\lib folder empty. I wonder if this is normal?