vscode does not work propperly : gettin errors along the way

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
apollodriver
Posts: 34
Joined: Tue Jan 29, 2019 8:54 am

vscode does not work propperly : gettin errors along the way

Post by apollodriver » Wed Jan 13, 2021 11:08 am

hi there - good day dear developer and user of Micropython.

at the moment i have issus with the VSCode

btw: well - on the linux-notebook all goes well. There the Vscode runs perfect.

but i have VSCode installed on Win10 at the office - and here i added a bunch of stuff - like PlatformIO/Projects/ESP/.pio/build/esp32dev/ and stuff like that. And i guess that i have messed up my system somewhat.

i want to follow the manpages here: https://marketplace.visualstudio.com/it ... hon.python
but at the moment i guess that everything is messed up alot.


well i have looked after various options and things - but afaik i did not find out what goes wrong here.

guess that i have set up VScode wrong -

probably i have to throw away PlatformIO -

i guess that vscode waits to run and work with ESP32 (see below)

VSC normally runs a C++ Debugger: i guess that i have to tell VSCode that it will work with python.

Code: Select all

> Executing task: C:\Users\Kasper\.platformio\penv\Scripts\pio.exe run <

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (1.10.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 2.10003.190916 (1.0.3)
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Linking .pio\build\esp32dev\firmware.elf
Building .pio\build\esp32dev\firmware.bin
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   4.5% (used 14628 bytes from 327680 bytes)  
Flash: [==        ]  15.9% (used 208524 bytes from 1310720 bytes)
esptool.py v2.6
=========================================================================================================== [SUCCESS] Took 8.48 seconds ===========================================================================================================


Terminal will be reused by tasks, press any key to close it.

well i also have had a closer look at the manpages: https://marketplace.visualstudio.com/it ... hon.python

but at the moment i have no glue whats going on here.

any ideas **smile** - btw. should i

a. debug the system or
b. kill platform-io and all that stuff


dear friends i look forward to hear from you again



update:



see what else goes on here

Code: Select all

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: [url]https://docs.platformio.org/page/boards/espressif32/esp32dev.html[/url]
PLATFORM: Espressif 32 (1.10.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 2.10003.190916 (1.0.3) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> [url]http://bit.ly/configure-pio-ldf[/url]
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   4.5% (used 14628 bytes from 327680 bytes)
Flash: [==        ]  15.9% (used 208616 bytes from 1310720 bytes)
========================= [SUCCESS] Took 1.91 seconds =========================
Reading symbols from c:\Users\Kasper\Documents\PlatformIO\Projects\ESP\.pio\build\esp32dev\firmware.elf...
done.
PlatformIO Unified Debugger -> [url]http://bit.ly/pio-debug[/url]
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
	[url]http://openocd.org/doc/doxygen/bugs.html[/url]
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
.pioinit:15: Error in sourced command file:
Remote communication error.  Target disconnected.: No error.


see what else goes on here


Code: Select all

UTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY

// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html

{
    "version": "0.2.0",
    "configurations": [
        
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug",
            "executable": "c:/Users/Kasper/Documents/PlatformIO/Projects/ESP/.pio/build/esp32dev/firmware.elf",
            "projectEnvName": "esp32dev",
            "toolchainBinDir": "C:/Users/Kasper/.platformio/packages/toolchain-xtensa32/bin",
            "preLaunchTask": {
                "type": "PlatformIO",
                "task": "Pre-Debug"
            },
            "internalConsoleOptions": "openOnSessionStart"
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (skip Pre-Debug)",
            "executable": "c:/Users/Kasper/Documents/PlatformIO/Projects/ESP/.pio/build/esp32dev/firmware.elf",
            "projectEnvName": "esp32dev",
            "toolchainBinDir": "C:/Users/Kasper/.platformio/packages/toolchain-xtensa32/bin",
            "internalConsoleOptions": "openOnSessionStart"
        }
    ]
}

well i have looked after various options and things - but afaik i did not find out what goes wrong here.

guess that i have set up VScode wrong -

probably i have to throw away PlatformIO -

i guess that vscode waits to run and work with ESP32 (see below)

VSC normally runs a C++ Debugger: i guess that i have to tell VSCode that it will work with python.

Code: Select all

> Executing task: C:\Users\Kasper\.platformio\penv\Scripts\pio.exe run <

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (1.10.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 2.10003.190916 (1.0.3)
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Linking .pio\build\esp32dev\firmware.elf
Building .pio\build\esp32dev\firmware.bin
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   4.5% (used 14628 bytes from 327680 bytes)  
Flash: [==        ]  15.9% (used 208524 bytes from 1310720 bytes)
esptool.py v2.6
=========================================================================================================== [SUCCESS] Took 8.48 seconds ===========================================================================================================


Terminal will be reused by tasks, press any key to close it.


well i also have had a closer look at the manpages: https://marketplace.visualstudio.com/it ... hon.python

but at the moment i have no glue whats going on here.

any ideas **smile**
WPGear.org is a compendium of useful developer tools for working with WordPress.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: vscode does not work propperly : gettin errors along the way

Post by jimmo » Fri Jan 15, 2021 4:12 am

Hi,

MicroPython has nothing to do with PlatformIO, so I don't know if that's confusing it or not.

But I guess the main question is -- are you trying to write Python code to run on an ESP32 (running MicroPython firmware), or are you working on the ESP32 MicroPython firmware itself (in C)?

Post Reply