curdeveryday / vscode-m5stack-mpy Goto Github PK
View Code? Open in Web Editor NEWA extension to mange files for M5Stack micropython system
License: MIT License
A extension to mange files for M5Stack micropython system
License: MIT License
Hello @curdeveryday,
First of all thanks a lot for having done all of this work for us, very useful.
If you want I am about rewriting it from scratch keeping the same logic/features, so I will start by a fork and then do a proposal through a PR later.
I have been playing quite a lot with the extension, debugging it, making changes there and there on how the serial communication was done etc...
My main question is around the following:
I got other questions but will raise them later.
OS: Ubuntu 20.04
VSCode: 1.49.1
Plugin: vscode-m5stack-mpy version 1.0.6
Plugin installs without complaint, asks to reload/restart VSCode.
The "Add M5Stack" button that should display does not. I don't see another way of using this plugin without the button.
windows11
vscode:1.85.2
安装完mpy后,连接设备,vscode没有add m5 stack 这个选项
I've tested this extension and found the "Reset M5Stack" command is not working.
Reinstalled eveerything and the Add M5Stack button now appears but when I click run on M5Stack I get the error below
Thanks
vscode-m5stack-mpy version 1.1.7
VSCode:
Version: 1.66.0 (user setup)
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5
Date: 2022-03-30T05:50:14.623Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19043
[2022-04-06 10:03:33.891] [exthost] [info] ExtensionService#_doActivateExtension curdeveryday.vscode-m5stack-mpy, startup: false, activationEvent: '*'
[2022-04-06 10:03:57.587] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'sendCommand')
at e.exec (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:32622)
at e. (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:44233)
at c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:37171
at Object.next (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:37276)
at c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:36188
at new Promise ()
at a (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:35933)
at e.run (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:43907)
at Object. (c:\Users\user.vscode\extensions\curdeveryday.vscode-m5stack-mpy-1.1.7\dist\extension.js:1:1736)
at m._executeContributedCommand (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:30760)
at m.$executeContributedCommand (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:31302)
at i._doInvokeHandler (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:89:13826)
at i._invokeHandler (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:89:13510)
at i._receiveRequest (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:89:12171)
at i._receiveOneMessage (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:89:10841)
at c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:89:8947
at u.invoke (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:145)
at v.fire (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:1856)
at d.fire (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:19034)
at c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:104:34275
at u.invoke (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:145)
at v.fire (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:1856)
at d.fire (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:19034)
at o._receiveMessage (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:23615)
at c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:21149
at u.invoke (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:145)
at v.fire (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:58:1856)
at v.acceptChunk (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:15865)
at c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:66:14995
at Socket.P (c:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:104:13797)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23) m5stack.itemRun {"value":"curdeveryday.vscode-m5stack-mpy","_lower":"curdeveryday.vscode-m5stack-mpy"}
I'm struggling to get VS Code to work with my M5StickC-Plus. When I select the com port assigned to my device, nothing happens. I am not able to see the M5Sticks File structure. Weirdly enough, I am still able to reset the device in VS Code (by clicking the com port in the left corner and selecting reset), but am unable to read/write code on the device. All drivers have been installed per the FTDI installation guide and appear to be working and up-to-date. Any help is greatly appreciated!
I was wondering can i use this extension to debug my micropython code.
I had already use some connection tools like minicom,ckermit but it's fail.
Can I use this extension to watch the result or error from my micropython code?
Hi
I'm on Windows,
UIFLow: 1.3.2 (but issue was present also on previous version).
I'm able to connect and see device content, but after performing any action (like expanding tree, adding file) - device restarts.
Right now, there's no way to delete directories or rename files/directories. You also can't edit any file other than ending in .py
, it says it's unsupported.
Extension version: 1.0.9
VSCode About Info:
Version: 1.55.2
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:35:57.887Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042
When attempting to do some actions (refresh the file tree listing, upload file, delete file, etc), the following error is presented and the file tree breaks. To fix it, you must deselect the COM and reselect the COM.
Saving a file, reading files, and "Run in M5Stack" all work without the error.
Error: No tree view with id 'm5stack' registered.
at a.$getChildren (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:86:55517)
at u._doInvokeHandler (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:12794)
at u._invokeHandler (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:12478)
at u._receiveRequest (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:11145)
at u._receiveOneMessage (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:10130)
at c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:90:8032
at _.fire (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
at E.fire (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15496)
at c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:29750
at _.fire (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
at E.fire (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15496)
at t._receiveMessage (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:20754)
at c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:17640
at _.fire (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
at acceptChunk (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12861)
at c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12209
at Socket.w (c:\Users\jhollowe\Desktop\VSCode-win32-x64-1.55.2\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:105:13173)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at Socket.Readable.push (_stream_readable.js:212:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:186:23)
I am trying to set M5paper to deep sleep and wake up when I press down buttom (GPIO39 to LOW). It is working with arduino:
#define uS_TO_S_FACTOR 1000000ULL /* Conversion factor for micro seconds to seconds */
#define TIME_TO_WAKE 25 /* Time ESP32 will wake up (in seconds) */
#include <M5EPD.h>
RTC_DATA_ATTR uint bootCount = 0;
gpio_num_t gpio_num = GPIO_NUM_39;
int count_i = 0;
/*
Method to print the reason by which ESP32
has been awaken from sleep
*/
void print_wakeup_reason(){
esp_sleep_wakeup_cause_t wakeup_reason;
wakeup_reason = esp_sleep_get_wakeup_cause();
switch(wakeup_reason)
{
case ESP_SLEEP_WAKEUP_EXT0 : Serial.println("Wakeup caused by external signal using RTC_IO"); break;
case ESP_SLEEP_WAKEUP_EXT1 : Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
case ESP_SLEEP_WAKEUP_TIMER : Serial.println("Wakeup caused by timer"); break;
case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println("Wakeup caused by touchpad"); break;
case ESP_SLEEP_WAKEUP_ULP : Serial.println("Wakeup caused by ULP program"); break;
default : Serial.printf("Wakeup was not caused by deep sleep: %d\n",wakeup_reason); break;
}
}
void setup(){
Serial.begin(115200);
delay(1000); //Take some time to open up the Serial Monitor
//Increment boot number and print it every reboot
++bootCount;
Serial.println("Boot number: " + String(bootCount));
print_wakeup_reason();
esp_sleep_enable_timer_wakeup(TIME_TO_WAKE * uS_TO_S_FACTOR);
gpio_pullup_dis(gpio_num);
gpio_pulldown_en(gpio_num);
gpio_hold_en(GPIO_NUM_2); //M5EPD_MAIN_PWR_PIN
gpio_deep_sleep_hold_en();
esp_sleep_enable_ext0_wakeup(gpio_num,LOW); //1 = High, 0 = Low
}
void loop(){
while(count_i < 3){
delay(1000);
Serial.println(count_i);
count_i++;
}
Serial.println("Going to sleep now");
esp_deep_sleep_start();
}
May I ask if it is possible to do the similar thing from mpy, please? Thank you very much
[2021-08-18 19:00:53.736] [exthost] [error] Activating extension curdeveryday.vscode-m5stack-mpy failed due to an error:
[2021-08-18 19:00:53.736] [exthost] [error] Error: Could not locate the bindings file. Tried:
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/build/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/build/Debug/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/build/Release/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/out/Debug/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/Debug/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/out/Release/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/Release/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/build/default/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/compiled/14.16.0/darwin/arm64/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/addon-build/release/install-root/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/addon-build/debug/install-root/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/addon-build/default/install-root/detection.node
→ /Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/lib/binding/node-v89-darwin-arm64/detection.node
at bindings (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/usb-detection/index.js:13:37)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/node-usb-native/lib/detector.js:6:12)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/node_modules/node-usb-native/lib/index.js:1:82)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/src/serialport.js:9:24)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/src/portlist.js:2:28)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/Users/zachberger/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.11/extension.js:2:18)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.t [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:101)
at v._loadCommonJSModule (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:26057)
at v._doActivateExtension (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:12603)
at v._activateExtension (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:11704)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 2)
at async Promise.all (index 0)
the extension doesn't go with visual code 1.69. after installing the extension I don't see "add m5stack" in the bottom bar. How can I solve it?
I thank you in advance
I can see my device code, but autocompletion is totally missing.
What I'm doing wrong?
Issue Type: Bug
[2022-04-04 10:29:18.810] [renderer1] [error] [Extension Host] (node:5652) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use Code --trace-deprecation ...
to show where the warning was created)
[2022-04-04 10:31:11.662] [renderer1] [info] Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute.
[2022-04-04 10:31:12.181] [renderer1] [info] Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute.
[2022-04-04 10:31:13.812] [renderer1] [error] ENOPRO: No file system provider found for resource 'm5stackfs:/COM7/flash/main.py'
Extension version: 1.1.4
VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:14.623Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (4 x 2492) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: unavailable_off opengl: enabled_on rasterization: unavailable_off raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: unavailable_off |
Load (avg) | undefined |
Memory (System) | 11.88GB (7.84GB free) |
Process Argv | --crash-reporter-id e8a5a4d4-c7b5-4baf-aa15-82bef5649582 |
Screen Reader | no |
VM | 0% |
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
pynewfile477:30463512
Type: Bug
Install the extension and look at the left side of the bar at the bottom of the screen. You should see #errors , # warnings and a button "Add M5Stack" as in the documentation of the extension, see screenshot:
I am working on two machines (Windows 10 and Windows 11). On both machines the option was available, but suddenly disappeared this week. In the screenshot below you can see that the extension is active and that the button is missing:
Extension version: 1.1.9
VS Code version: Code 1.78.1 (6a995c4f4cc2ced6e3237749973982e751cb0bf9, 2023-05-04T09:48:08.683Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes
Item | Value |
---|---|
CPUs | 13th Gen Intel(R) Core(TM) i5-13400 (16 x 2496) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
Load (avg) | undefined |
Memory (System) | 15.70GB (6.73GB free) |
Process Argv | --crash-reporter-id 5623efc6-fd0a-43a4-9f28-e6504dff170e |
Screen Reader | no |
VM | 0% |
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30705553
azdwalk:30721579
pythonms35:30701012
7ij38806:30736111
pythonfmttext:30731395
pythoncmvfstr:30731969
fixshowwlkth:30730052
hidesbindicator:30730055
pythongtdpath:30731978
I was playing with ATOM Lite through VSCode and noticed
The file whose file name length is 33 characters cannot be saved by M5Stack extension.
F23456789012345678901234567890.py <== Save ERROR
F234567890123456789012345678901.c <== Save ERROR
Error message :
"Saved m5stackfs:/COM4/flash/F23456789012345678901234567890.py failed."
All file names listed below were able to be saved from VSCode to ATOM Lite with M5Stack extension.
F2345678901234567890123456789.py <== Save WORKED
F234567890123456789012345678901.py <== Save WORKED
F234567890123456789012345678901234567890.py <== Save WORKED
FYI, F23456789012345678901234567890.py
was able to be created from REPL of the Micropython on ATOM Lite.
Micopython info
MicroPython 3a9581b5a-dirty on 2022-12-08; M5Stack with ESP32
M5Stack etension info
vscode-m5stack-mpy v1.1.9
VSCode info
Version: 1.74.2 (user setup)
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:29:14.590Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No
Hi!
I have opened this issue as I saw that others had issues with the button, just as I have now. Details of my setup:
VS Code:
Version: 1.59.0 (user setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19042
Extension:
vscode-m5stack-mpy v1.0.11
UIFlow 1.8.2 USB mode
Hello @curdeveryday
Do you know if there is anything we can do with the exec command 0x02 when we pass a python script to be executed all the time we receive a crc error2k
, it only works with tiny file.
The python script is really not that big and looks like this one below, I was trying to build something for my daughter so she can brush her teeth :)
I do believe there is something going on with the crc method but I am not sure, if we could get the source code it will help.
from m5stack import *
from m5stack_ui import *
from uiflow import *
import time
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
loop = None
startCount = None
image0 = M5Img("res/brush2.png", x=7, y=0, parent=None)
teeth = M5Label('Teeth Brushing', x=16, y=0, color=0x000, font=FONT_MONT_18, parent=None)
ready_btn = M5Btn(text='Ready', x=16, y=175, w=70, h=50, bg_c=0x79b775, text_c=0x1b1919, font=FONT_MONT_14, parent=None)
Time = M5Label('1', x=146, y=110, color=0x000, font=FONT_MONT_44, parent=None)
back_btn = M5Btn(text='Back', x=242, y=175, w=70, h=50, bg_c=0x202569, text_c=0xf6f1f1, font=FONT_MONT_14, parent=None)
from numbers import Number
import random
# Describe this function...
def startTimer():
global loop, startCount
startCount = 1
loop = 0
Time.set_hidden(False)
back_btn.set_hidden(False)
def back_btn_pressed():
global loop, startCount
ready_btn.set_hidden(False)
back_btn.set_hidden(True)
image0.set_hidden(False)
loop = 0
startCount = 0
pass
back_btn.pressed(back_btn_pressed)
def ready_btn_pressed():
global loop, startCount
teeth.set_hidden(True)
ready_btn.set_hidden(True)
startTimer()
pass
ready_btn.pressed(ready_btn_pressed)
screen.set_screen_bg_color(0xff9966)
startCount = 0
loop = 0
Time.set_hidden(True)
back_btn.set_hidden(True)
while True:
if startCount == 1:
image0.set_hidden(True)
loop = (loop if isinstance(loop, Number) else 0) + 1
wait_ms(1000)
Time.set_text(str(loop))
lcd.circle(50, 50, random.randint(1, 100), color=0x009900)
lcd.circle(80, 110, random.randint(1, 100), color=0xcc0000)
lcd.circle(200, 150, random.randint(1, 100), color=0x3333ff)
lcd.circle(250, 30, random.randint(1, 100), color=0x99ff99)
if loop == 5:
power.setVibrationEnable(False)
power.setVibrationIntensity(10)
else:
Time.set_text(str(loop))
Time.set_hidden(True)
wait_ms(2)
Activating extension curdeveryday.vscode-m5stack-mpy failed due to an error:
[2021-08-19 20:06:27.492] [exthost] [error] Activating extension curdeveryday.vscode-m5stack-mpy failed due to an error:
[2021-08-19 20:06:27.492] [exthost] [error] Error: dlopen(/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/usb-detection/build/Release/detection.node, 1): no suitable image found. Did find:
/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/usb-detection/build/Release/detection.node: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00
/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/usb-detection/build/Release/detection.node: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00
at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1185:18)
at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1846)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at bindings (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/bindings/bindings.js:112:48)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/usb-detection/index.js:13:37)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/node-usb-native/lib/detector.js:6:12)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/node_modules/node-usb-native/lib/index.js:1:82)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/src/serialport.js:9:24)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/src/portlist.js:2:28)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at v (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:698)
at Object. (/Users/dbuch/.vscode/extensions/curdeveryday.vscode-m5stack-mpy-1.0.12/extension.js:2:18)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.n._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:28060)
at Function.P._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:24648)
at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:59608)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at Module.require (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js:1:38760)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.t [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:101)
at v._loadCommonJSModule (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:104:26057)
at v._doActivateExtension (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:12603)
at v._activateExtension (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:11704)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 2)
at async Promise.all (index 0)
Issue Type: Bug
I have Disabled, Uninstall the extention, vscode, the com port - nothing works
if anyone have an idea please let me know
I am new to VSCode but I have been a developer for a long time
Extension version: 1.0.7
VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:48:04.245Z)
OS version: Windows_NT x64 10.0.18363
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz (4 x 2295) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 7.91GB (1.49GB free) |
Process Argv | --crash-reporter-id ece940ff-72b0-43ee-a275-f93dbe2cfefd |
Screen Reader | no |
VM | 0% |
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt617cf:30253240
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244cf:30256637
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589
It would be nice if there was an integrated serial console you could open and get a REPL for.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.