Code Monkey home page Code Monkey logo

platformio-vscode-ide's Introduction

PlatformIO IDE for VSCode

PlatformIO: Your Gateway to Embedded Software Development Excellence.

Unlock the true potential of embedded software development with PlatformIO’s collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success.

  • Open source, maximum permissive Apache 2.0 license
  • Cross-platform IDE and Unified Debugger
  • Static Code Analyzer and Remote Unit Testing
  • Multi-platform and Multi-architecture Build System
  • Firmware File Explorer and Memory Inspection.

Platforms: Atmel AVR, Atmel SAM, Espressif 32, Espressif 8266, Freescale Kinetis, Infineon XMC, Intel ARC32, Intel MCS-51 (8051), Kendryte K210, Lattice iCE40, Maxim 32, Microchip PIC32, Nordic nRF51, Nordic nRF52, NXP LPC, RISC-V, Silicon Labs EFM32, ST STM32, ST STM8, Teensy, TI MSP430, TI Tiva, WIZNet W7500

Frameworks: Arduino, CMSIS, ESP-IDF, ESP8266 RTOS SDK, Freedom E SDK, Kendryte Standalone SDK, Kendryte FreeRTOS SDK, libOpenCM3, mbed, PULP OS, SPL, STM32Cube, WiringPi, Zephyr RTOS

Features

  • Cross-platform code builder without external dependencies to a system software:
    • 1000+ embedded boards
    • 40+ development platforms
    • 20+ frameworks
  • Debugging
  • Unit Testing
  • Static Code Analysis
  • Remote Development
  • C/C++ Intelligent Code Completion
  • C/C++ Smart Code Linter for rapid professional development
  • Library Manager for the thousands of popular libraries
  • Multi-projects workflow with multiple panes
  • Themes support with dark and light colors
  • Serial Port Monitor
  • Built-in Terminal with PlatformIO Core tool (pio, platformio)

How it works

!!! PLEASE READ "QUICK START" AND "USER GUIDE" BEFORE !!!

Please follow to the official documentation PlatformIO IDE for VSCode.

PlatformIO IDE for VSCode

License

Copyright (C) 2017-present PlatformIO [email protected]

The PlatformIO IDE for VSCode is licensed under the permissive Apache 2.0 license, so you can use it in both commercial and personal projects with confidence.

platformio-vscode-ide's People

Contributors

barbeque avatar dmytrokyrychuk avatar exaphis avatar formulahendry avatar ivankravets avatar robomagus avatar sparvanders avatar tasssadar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

platformio-vscode-ide's Issues

Failed to download virtualenv-14.0.6.tar.gz: Reference Error: atom is not defined

Hi,

Everything worked fine until I decided to open a new VS Code window. Then a PlatformIO Core installation began and failed, producing the following error:

Error: Failed to download file
https://pypi.python.org/packages/source/v/virtualenv/virtualenv-14.0.6.tar.gz:
Reference Error: atom is not defined

Any help would be much appreciated.

Thanks in advance.

Working with multiple projects

Hello,

just a quick question. Are you supporting the new workspace feature of VSCode? I mean, I have 4 folders opened, but I want only to compile one of them. At the moment it is compiling the first one, but I want to compile e.g. 3rd one, because I want to do some memory optimization of few linked libraries.

Does it need some work from your side or is it M$’s bug? In atom it takes selected folder or active file and compiles the corresponding project.

Thanks,
Regards,
Petr Sourek

Selection on enviroment

One of the features I miss most from the Atom version of Platform IO IDE is the ability to select the environment. It would be great if this could be added, although IMHO not like it is in Atom (a long list of all the environments/target combinations), but rather just an override to the env_default in platformio.ini, ie you have an option that just select an env and then all the build/upload tasks work as if the env_default was set to the selected env.

__AVR__ not set (in c_cpp_properties.json) -> Intellisense parsing incorrectly

The __AVR__ macro does not seem to be defined when intellisense parses the code.
This breaks autocomplete etc. for code/libraries that use this macro (e.g. Low-Power library).

Project compiles fine though as gcc defines the macro.

In c_cpp_properties.json I find only the chip macro set (e.g. __AVR_ATmega32U4__), not the __AVR__ platform macro. Manually adding __AVR__ to the defines list makes intellisense resolve correctly. If this is the correct place for the define, I think it should be put there automatically.

Environment:
Windows 7
VSCode settings: "C_Cpp.intelliSenseEngine": "Default"
c_cpp_properties.json: "intelliSenseMode": "msvc-x64"

Integrated debugger fails

On windows 10 x64, debugging fails under Visual Studio Code. I am logged into Visual Studio Code with my PlatformIO account. Pressing the debug button just causes the status bar to flash orange.

Board I am using is Nucleo-F103Rb. I am able to debug this same project under PlatformIO for Atom.

forceUploadAndMonitor does not work on newer versions of VSCode

When I have "platformio-ide.forceUploadAndMonitor": true" I observe following behaviour:

1 Run VSCode
2. Upload - program is compiled, uploaded and serial monitor is started
3. Press upload again
4. Agree to terminate task
5. Get error: "The task '{0}' is already active. To terminate it use Terminate Task... from the Tasks menu."
6. Try upload again
7. Agree to terminate task
8. Get error: "Terminal with ID 2 does not exist (has it already been disposed?)"

I am using VSCode 1.15

Windows: Set "intelliSenseMode" property in c_cpp_properties.json file to "clang-x64"

PlatformIO should set "intelliSenseMode" property in c_cpp_properties.json file to "clang-x64".

See:

https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/FAQ.md

How do I get the new IntelliSense to work with MinGW on Windows?

Since MinGW is a relative of GCC, Microsoft mode compilation (which is the default on Windows) doesn't work very well with it. To use GCC/CLang mode, set the "intelliSenseMode" property in your c_cpp_properties.json file to "clang-x64".

Since PlatformIO uses CLANG like MinGW, Intellisense should use CLANG as well. (On Linux it is the default in VSCode C++ Extension.)

Manually editing c_cpp_properties.json only works temporarily because PlatformIO overwrites the file and "intelliSenseMode" property returns to "msvc-x64" on Windows.

Failed to launch external program

2017-07-08 10-11-19

Using vsc build-in PIO core, I failed to build or etc. with error "Failed to launch external program "/home/biglion/.platformio/penv/bin/platformio" -c vscode."

And delete the escape charactor " in task.json->"command" fixed my probleam~~~

IDE Doesn't work, vscode (1.14.2) PlatformIO IDE (0.5.1) on macosx (Sierra)

In a new folder, I try to Initialize a new PlatformIO project and I get

Popup

PIP: Error: spawn /Volumes/Macintosh HD/Users/Eric/.platformio/penv/bin/pip ENOENT

and in output pane

Installing PlatformIO Core...
Please don't close this window and don't open other folders until this process is completed.
Failed to install PlatformIO IDE.

Files and directories are created in the folder, but the IDE is not present and none of the PlatformIO: commands work (can't open terminal, etc)

I have installed PlatformIO Core outside of PlatformIO IDE. Before I did that, nothing was created in the directory.

I've also tried multiple uninstalls/reinstalls of all and can not get around this problem

Verifying PlatformIO Core installation... stuck here.

It was working perfectly with couple of VSCode updates back. But VSCode force updated, and the extension now is stuck here.

Have tried reinstalling, disabling with no use.

  • VSCode Version: Code 1.17.2 (b813d12980308015bcd2b3a2f6efa5c810c33ba5, 2017-10-16T13:59:48.528Z)
  • OS Version: Windows_NT ia32 10.0.16299
  • Extensions:
Extension Author (truncated) Version
scad efb 1.0.1
cpptools ms- 0.14.0
platformio-ide pla 0.7.3
debug web 0.21.2

Steps to Reproduce:

  1. Install latest VSCode and PlatformIO Extention
  2. Start VSCode. The status bar message with be "Verifying PlatformIO Core installation"

Reproduces without extensions: No

pio invades every project/workspace

I'm using vscode for various coding tasks from php and node to arduino. The pio indexer/home screen comes up on every workspace, while only a few of those are actually arduino projects. This is very annoying especially when the indexer goes about looking at a few thousands of vendor depencies in php or node projects.

I'm looking for a way to disable pio by default and only enable on selected projects.

Setting PATH for terminal fails

My original problem was that the pio command couldn't be found when I clicked the "Platform IO: Serial Monitor" or "Platform IO: New Terminal" buttons.

I investigated a bit, but my findings confuse me.

So I replaced this block with:

    console.log(process.env.PATH);
    console.log(constants.IS_WINDOWS);
    
    if (constants.IS_WINDOWS) {
      commands.push('set PATH=' + process.env.PATH);
    } else if (process.env.SHELL && process.env.SHELL.includes('fish')) {
      commands.push('set -gx PATH ' + process.env.PATH.replace(/\:/g, ' '));
    } else {
      commands.push('export PATH=' + process.env.PATH);
    }
    
    commands.push('blah');
    commands.push('set FOO=BAR');
    commands.push('set PATH=' + process.env.PATH);
    commands.push('echo %FOO%');
    commands.push('set FOO=BAR');
    commands.push('echo %FOO%');
    commands.push('echo %PATH%');
    commands.push('pio --help');

Here's the console output:

[Extension Host]
C:\Users\andre\.platformio\penv\Scripts;C:\Windows\SYSTEM32;C:\Windows\SYSTEM32;C:\Windows;C:\Windows\SYSTEM32
extensionHost.ts:285
[Extension Host]
true
extensionHost.ts:285

And here's the terminal output:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\dev-projects\#Arduino\vscodetest>echo %FOO%
%FOO%

C:\dev-projects\#Arduino\vscodetest>set FOO=BAR

C:\dev-projects\#Arduino\vscodetest>echo %FOO%
BAR

C:\dev-projects\#Arduino\vscodetest>echo %PATH%
C:\Windows\SYSTEM32;C:\Windows

C:\dev-projects\#Arduino\vscodetest>pio --help
Der Befehl "pio" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\dev-projects\#Arduino\vscodetest>
C:\dev-projects\#Arduino\vscodetest>

PIO and VSCode; spaces in paths in tasks.json

This follows on from https://community.platformio.org/t/pio-and-vscode-spaces-in-paths-in-tasks-json/2257/3

Tasks.json appears to be an auto-generated file and contains:

{
    "version": "0.1.0",
    "runner": "terminal",
    "command": "\"C:\\Users\\Bob Brown\\.platformio\\penv\\Scripts\\platformio.exe\"",
    "isShellCommand": false,

Note that the 'command' value is a path containing a space.

This causes a build to fail:

C:\Users\Bob : The term 'C:\Users\Bob' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Bob Brown\.platformio\penv\Scripts\platformio.exe -c vscode  ...
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Bob:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Since tasks.json is regenerated frequently, any attempt to edit it does not 'stick'.

Arduino blink example project shows nonsense 'problems'

The following canonical Arduino 'blink' example:

#include <Arduino.h>

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH); delay(1000);
  digitalWrite(LED_BUILTIN, LOW); delay(1000);
}

Set up for the Macchina M2 board (atmelsam) is plastered with error squiggles, due to each of the Arduino / Wiring function calls being marked with:

file: 'file:///.../Documents/PlatformIO/Projects/171125-213209-macchina2/src/main.cpp'
severity: 'Error'
message: 'expression preceding parentheses of apparent call must have (pointer-to-) function type'
at: '5,3'
source: ''
code: 'undefined'

Navigation to the definitions of the functions works, though they are also marked up with nonsense errors.

The problem appears to be due to this fragment in .vscode/c_cpp_properties.json:

        "intelliSenseMode": "clang-x64",
        "macFrameworkPath": [
            "/System/Library/Frameworks",
            "/Library/Frameworks"
        ]

It looks like Visual Studio recently added a new "intelliSenseMode": "gccarm" mode, but my VS Code installation (1.18.1) rejects it.

Enable local echo in PySerial

CTRL+E is a default mapping in VS Code. To enable local echo, this keybinding needs to be added to the PlatformIO extension:
{ "key": "ctrl+e", "command": "", "when": "terminalFocus" }

This lets the CTRL+E pass thru to the terminal.

Auto complete not working properly

HI

Last week I installed fresh installation of VSCode and platformio plug-in for it (using it for dev for ESP32 under Arduino FW).

Everything works fine, except for auto complete function. For some reason, autocomplete always list all available functions, members and not only the ones related to given object. For example, when using Serial object from Arduino, I get hundred of suggestions for member functions/properties and not only the ones related to Serial object.

I have installations running on two machines with same behavior. Fur curiosity reasons I tried Atom wit PIO and there it works fine.

Any suggestion what could be wrong here?

Thx.
Ivan

Don't replace default terminal with PlatformIO

It extremely annoying to have PlatformIO's export PATH=... and pio --help pop up each time a new terminal is opened.

Happens in a freshly opened project when I press Ctrl+`

Somewhat related to #6

Platform IO VSCode IDE 0.2.0
VSCode 1.12.2
Fedora 25 x64

Do not destroy PIO Home when tab editor is changed

Temporary solution

Please open PIO Home in a separate layout (Split Editor and drag PIO Home tab to a new tab pane). See | | | icon in the top right corner.


Currently, VSCode totally destroys PIO Home when a user changes tab. Need to find a way how to restore previous IFRAME state.

There is no information here:

/cc @dbaeumer @Tyriar should I open a feature request? Related source code.

screen shot 2017-08-10 at 01 52 05

Error after update

I just ran pio update in Visual Studio Code with platformio. Now I get the following error when I open the IDE:

PlatformIO: IntelliSense Index failed: Error: Detected unknown package 'espressif8266_stage'

I have verified that espressif8266_stage is installed correctly by running platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage, so that is not the problem.

When I try to build a project using the espressif8266_stage platform I get

PlatformManager: Installing espressif8266_stage
Error: Detected unknown package 'espressif8266_stage'
The terminal process terminated with exit code: 1

in the console. What is going on?

PlatformIO Terminal throws errors when opening

I just installed the IDE for vscode. When I want to open the terminal it throws the following erros:

+ ... werShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files (x86)\NVIDIA ...
+                                                               ~~~
    + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

C:\Users\Stauffer\AppData\Local\Programs\Python\Python36-32\Scripts\ : Die Benennung "C:\Users\Stauffer\AppData\Local\Programs\Python\Python36-32\Scripts\" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.                                                                               I
n Zeile:1 Zeichen:864                                                                                                                                                                                                                       +
 ... hysX\Common;C:\Users\Stauffer\AppData\Local\Programs\Python\Python36- ...                                                                                                                                                              +
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : ObjectNotFound: (C:\Users\Stauff...n36-32\Scripts\:String) [], CommandNotFoundException
   + FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                            C
:\Users\Stauffer\AppData\Local\Programs\Python\Python36-32\ : Die Benennung "C:\Users\Stauffer\AppData\Local\Programs\Python\Python36-32\" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren     P
rogramms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.                                                                                            In
 Zeile:1 Zeichen:933                                                                                                                                                                                                                       +
... 32\Scripts\;C:\Users\Stauffer\AppData\Local\Programs\Python\Python36- ...                                                                                                                                                              +
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : ObjectNotFound: (C:\Users\Stauff...on\Python36-32\:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                           C:
\Users\Stauffer\AppData\Local\Programs\Python\Launcher\ : Die Benennung "C:\Users\Stauffer\AppData\Local\Programs\Python\Launcher\" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren           Pr
ogramms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.                                                                                            In
Zeile:1 Zeichen:994                                                                                                                                                                                                                       + .
.. ython36-32\;C:\Users\Stauffer\AppData\Local\Programs\Python\Launcher\ ...                                                                                                                                                              +
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo          : ObjectNotFound: (C:\Users\Stauff...ython\Launcher\:String) [], CommandNotFoundException
 + FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                          C:\
Users\Stauffer\AppData\Local\Microsoft\WindowsApps : Die Benennung "C:\Users\Stauffer\AppData\Local\Microsoft\WindowsApps" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms         erk
annt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.                                                                                                      In Z
eile:1 Zeichen:1052                                                                                                                                                                                                                      + ..
. n\Launcher\;C:\Users\Stauffer\AppData\Local\Microsoft\WindowsApps;C:\ ...                                                                                                                                                              +
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\Users\Stauff...oft\WindowsApps:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                         C:\P
rogram : Die Benennung "C:\Program" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern    entha
lten), und wiederholen Sie den Vorgang.                                                                                                                                                                                                 In Ze
ile:1 Zeichen:1106                                                                                                                                                                                                                      + ...
 Users\Stauffer\AppData\Local\Microsoft\WindowsApps;C:\Program Files\L ...                                                                                                                                                              +
                                                    ~~~~~~~~~~                                                                                                                                                                              +
 CategoryInfo          : ObjectNotFound: (C:\Program:String) [], CommandNotFoundException                                                                                                                                                   +
 FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                        x86 :
 Die Benennung "x86" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und  wieder
holen Sie den Vorgang.                                                                                                                                                                                                                 In Zeile:1 Zeichen:1150                                                                                                                                                                                                                      + ...
t\WindowsApps;C:\Program Files\LLVM\bin;C:\Program Files (x86)\Micros ...                                                                                                                                                              +
                                                          ~~~                                                                                                                                                                              +
CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException                                                                                                                                                          +
FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                       PS X:\
sensor> pio --help                                                                                                                                                                                                                     pio :
Die Benennung "pio" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und  wiederh
olen Sie den Vorgang.                                                                                                                                                                                                                 In Zeile:1 Zeichen:1                                                                                                                                                                                                                         + pio --help                                                                                                                                                                                                                                 + ~~~
                                                                                                                                                                                                                                          + CategoryInfo          : ObjectNotFound: (pio:String) [], CommandNotFoundException                                                                                                                                                          + FullyQualifiedErrorId : CommandNotFoundException
                                                                                                                                                                                                                                      PS X:\sensor>

```

Arduino Libs not found

In both Atom and VS code the tilde (~) does not resolve the home path in platformio.ini.

this works ---> lib_extra_dirs = C:/Users/je/Documents/Arduino/libraries
Not this -----> lib_extra_dirs = ~/Arduino/libraries

Serial monitor UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128)

When I open the Visual studio code serial monitor I get this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128)

Works fine in the Arduino IDE Serial Monitor with the same baud rate.

MacOS with Python 2.7
$LANG en_GB.UTF-8

--- Miniterm on /dev/cu.usbserial-DN01J4DW  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Exception in thread rx:
Traceback (most recent call last):
  File "/usr/local/var/pyenv/versions/2.7/lib/python2.7/threading.py", line 530, in __bootstrap_inner
    self.run()
  File "/usr/local/var/pyenv/versions/2.7/lib/python2.7/threading.py", line 483, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/chris/.platformio/penv/lib/python2.7/site-packages/serial/tools/miniterm.py", line 453, in reader
    self.console.write(text)
  File "/Users/chris/.platformio/penv/lib/python2.7/site-packages/serial/tools/miniterm.py", line 68, in write
    self.output.write(text)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128)

PlatformIO Home is not available

Solution

Check pioplus.exe process in Windows firewall set to access public and private networks


PlatformIO IDE as a vscode plug-in became difficult to use, Library can not download the local management, create a new project, in China can not access the PlatformIO Home page, the establishment of the project will fail, hoping to provide a sound offline version.

PlatformIO IDE作为vscode 插件之后变得难用了,Library不能本地下载管理,创建新项目时,在**无法访问 PlatformIO Home 页,建立项目会失败,希望能提供完善的离线版本。

AssertionError in cmd_account.cmd_check_permission

Attempted to install PlatformIO IDE (VSCode) on 2 computers. Both are fresh installs, both give this error:
Unable to open 'PIO Home': Could not start PIO Home server: Error: timeout.

Both computers are Windows 10 1709 64-bit. All I did was follow the instructions to install the VSCode version of PlatformIO IDE as provided on your website:
http://platformio.org/get-started/ide?install=vscode

Neither computer had previous versions of VSCode or PlatformIO installed, and I did restart after installing VSCode and after installing PlatformIO IDE extension.

The only integrated terminals available in VSCode are command shell and powershell (no python)
I notice these steps are commonly requested when troubleshooting this, so here they are:

C:\Users\dp250>ECHO %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\dp250\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;C:\Program Files\Microsoft VS Code\bin

C:\Users\dp250>ECHO %PYTHONPATH%
%PYTHONPATH%
C:\Users\dp250>python --version'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\dp250>pip --version
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\dp250> pip list
'pip' is not recognized as an internal or external command,
operable program or batch file.

0.2.0->0.3.0 stuck in upgrade loop

Hi, I have pio core 3.3.1 installed (standalone).
After upgrading to pio-vscode-ide 0.3.0 vscode gets stuck in a loop where, after opening vscode, it first displays "verifying platformio installation" in the status bar, then goes on to
"Installing PlatformIO Core... Please don't close this window and don't open other folders until this process is completed." in the terminal.

After that it asks me to restart vscode, and then the whole process repeats - verifying, installation, restart.
0.2.0 worked fine.

If I ignore the restart prompt I don't get any PIO icons on the status bar, but build/upload commands (via Ctrl-Alt-B / Ctrl-Alt-U) work as expected.

(also, setting platformio-ide.useBuiltinPIOCore & platformio-ide.customPATH makes the "Installing PlatformIO Core" complete immediately, but still asks me to restart)

os: windows10, python: 2.7.13 32-bit in non-default dir s:\software\python, but on user's PATH

Don't overwrite workspace settings.json

PlatformIO VSCode integration overwrites workspace settings.json after a while or on project load so it's impossible to use workspace-specific settings.

Platform IO VSCode IDE 0.2.0
VSCode 1.12.2
Fedora 25 x64

Initialize project without workspace

Would be good to allow initializing of a project without opened workspace. In this case need to ask user to select a folder for the further project.

identifier "uint8_t" is undefined

I get all uint8_t and uint16_t declarations marked as errors with identifier "uint8_t" is undefined in my platformio-project for an ESP8266. It can easily be reproduced: Just generate a new project for an esp8266 board, choose arduino as framework and type uint8_t x = 3 somewhere. It will hilight uint8_t and tell its an undefined identifier.

This does not happen on AVR projects for example.

I spend quite some time to debug this issue and found this line be responsible in my c_cpp_properties.json at the includePath array:

           "/home/jan/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/4.8.2/include-fixed",

Deleting this fixes the issue.

PlatformIO-IDE Installation Issue, "OSError: [Errno 2] No such file or directory:"

I get "OSError: [Errno 2] No such file or directory:" installing from either "Atom" or "Visual Studio Code".

Installing from Atom :
OSError: [Errno 2] No such file or directory: '/cygdrive/c/Users/Deon-Marais/AppData/Local/atom/app-1.20.1/C:\Users\Deon-Marais\.platformio\penv'

Installing from Visual Studio Code
OSError: [Errno 2] No such file or directory: '/cygdrive/e/MSVSCode/C:\Users\Deon-Marais\.platformio\penv'

Any guidance or assistance would be appreciated.

Include file not found in include path error for simba.h

For some reason, VS Code is showing an Include file not found in include path error when including simba.h. c_cpp_properties.json shows the SimbaFramework directories in the includePath array, however, I cannot find the simba.h header file anywhere in
.pioenvs/<board>/SimbaFramework/src.

VS Code 1.12.2
PlatformIO IDE for VSCode 0.2.0
macOS 10.12.5

Run a task was removed

In 24ef585 the 'PlatformIO: Run a Task' command was removed, was this intentional? Is there a new way to perform the same option (other than going to the command line)?

PlatformIO IDE stop working

Hello everyone.

I submit this problem in PIO forum but I thought that I should submit it here (because version number is < 1.0).


I use PlatformIO IDE on Visual studio code, OSX.

Build is possible immediately after starting the program.
But, when I modify some codes, save and build it, status bar displays "Fetching build tasks..." and it not complete never.
It recover only when reloading vscode after.

Is there a way to solve it?

Thanks.

PIO Home screen comes up on every start

with v007 every time when you start the ide the pio home screen pops up, this is very annoying.
I'm missing "platformio-ide.showHomeOnStartup": false, in the config.

fresh install on VSC, Windows 64bits, 1.18.1 doesn't work

Start with an open, empty folder then: Platform.IO IDE 0.7.4 => Install and asks for reload. After reloading it opens PIO Home and there is the Home icon on the left side (that is the only one)

Then, actions "Initialize or update project and I select a platform and it installs it. In the folder now there are some other files (same if I open home and then "Initialize project").
I open the main.cpp and try to build => "No build task to run found" (there are no platform.io icons on the lower status bard besides the home as well...).

VSC, Windows 64bits, 1.18.1

How can I troubleshoot this?

thanks!

travis.yml and gitignore files updated

After saving platformio.ini my gitignore gets updated with those three lines:

.pioenvs
.piolibdeps
.vscode

Also file .travis.yml is created.

Why? I don't want this. How is this related to platformio as an iot platform? Why should platformio generate travis file? I would prefer to have my own control over gitignore (especially ".vscode" entry) and I don't want that travis file.

Both of these things should be either only in documentation or at least configurable.
Thank you.

Serial port configuration

Another missing (and IMHO really useful) feature from the Atom version is the ability to select the port and baud rate for the serial monitor.

CodeHelper maxes out to 100% in multiple processes

I just installed platformio vscode extension and find that after building a few times using a teensy project that multiple CodeHelper processes are present in the activity monitor on Mac OS X and they are maxed out at 99 - 100%. After quitting VsCode they do not exit and must be force quit.

I have not seen this behavior previously using Arduino extension or regular vscode activity without extensions.

Upgrading to 0.7.4 goes into an endless loop

Windows 8 x64
VSCode 1.18.1

on starting VSCode it goes 'Verifying PlatformIO IDE..' then 'Installing PlatformIO' with output showing
"Installing PlatformIO Core...
Please don't close this window and don't open other folders until this process is completed."

on restart of VSCode the same sequence repeats. Verified on two separate installations with 0.7.3 previously installed.

VSCode Extension's shows PlatformIO IDE version 0.7.4 is correctly installed. Uninstalling and re-installing extension gives same result.

Close open serial monitor before uploading

Here is one issue that annoys me quite a bit: if there is open serial monitor upload fails as given COM port can not be used. As I have terminal always open, I often forget to kill it before uploading the code and end up with error.

It would be very helpful that upload action preforms automatic closing of open serial monitor (should be configurable).

Thx.
Ivan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.