Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload project #242

Closed
pgrenon1 opened this issue May 24, 2022 · 11 comments
Closed

Can't upload project #242

pgrenon1 opened this issue May 24, 2022 · 11 comments

Comments

@pgrenon1
Copy link

pgrenon1 commented May 24, 2022

Board: NodeMCU with ESP-8266 (CH340g)
TLDR: I'm trying to upload scripts from Visual Studio Code to this board using Pymakr and it's not working.

I followed the steps at https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html in order to flash micropython on the board.
Here is what I did, steps by steps:

  • connected the device and loaded micropython on it successfully
  • opened VS code with Pymakr plugin installed and created a pymakr project
    • Note: at this point, I can write python in the console, but when I click the "open device in file explorer" I get this:
      image
  • modified the code inside boot.py to add a connect method, following the tutorial here https://docs.micropython.org/en/latest/esp8266/tutorial/network_basics.html
  • I save the changes and hit this button to upload:
    image
  • but when I click the download button here, my code has disappeared from boot.py
    image

Also, if I add a file main.py to the project and press the "Sync project to device", I can tell that nothing is uploaded because I only see this!
image

Can anyone help me with this please?

Thanks in advance

@nkgiovannivl
Copy link

nkgiovannivl commented May 27, 2022

Same issue for me..but for some reason extesion it's trying to upload to flash folder, but my project is it root folder on my workspace..

image

@jakobrosenberg
Copy link
Contributor

This was answered here: https://forum.pycom.io/topic/7576/esp8266-can-t-upload-project/2?_=1653891246201

Solution:

  1. Open settings and type pymakr
  2. Goto Pymakr > Devices: Config
  3. Update /custom/path to match the root folder of your device. Make sure to also update the match field. You can match against any property here. (for a full list of properties, hit F1 and run the list devices command)

The next patch may auto detect root path so the above steps won't be required.

I'm closing this, but feel free to continue the conversation. 🙂

@DuncanLHS
Copy link

DuncanLHS commented May 31, 2022

@jakobrosenberg Would you please share some screenshots of what you've described with editing the settings?

I'm having the same issue as described but with ESP32 and suspect it's a root folder problem but I can't find Devices: Config in settings.

The only pymakr setting in my JSON is devices.names so I'm not sure what custom path is supposed to look like

@jakobrosenberg
Copy link
Contributor

Sure, here you go.

change-root-path

@DuncanLHS
Copy link

OK, thanks for that @jakobrosenberg that's got me started however I now have VS Code not recognising that as a setting??

image

My settings text is this, I can't see anything wrong with it compared to yours above

"pymakr.devices.config": [ { "match": "manufacturer=Silicon Labs", "field": "rootPath", "value": "/" }, ]

The autocomplete only gives me these options:
image

@pgrenon1
Copy link
Author

pgrenon1 commented Jun 2, 2022

@nkgiovannivl How do I get a stack trace like this to see what happens when uploading? #242 (comment)

Same issue for me..but for some reason extesion it's trying to upload to flash folder, but my project is it root folder on my workspace..

image

@pgrenon1
Copy link
Author

pgrenon1 commented Jun 2, 2022

Also @jakobrosenberg I was told on the Pycom forum that my board (ESP8266) is not supported for pymakr and that was why I couldn't upload. Is that a mistake? https://forum.pycom.io/topic/7576/esp8266-can-t-upload-project/4

@AussieSusan
Copy link

Looking at the screen shots, I can get to the point of selecting the 'Devices' item but there is no 'Edit is settings.json' option.
The options I have are "Auto Connect", "Include", "Names" and "Name Template".
Is there some other version I should be installing???
Susan

@jakobrosenberg
Copy link
Contributor

@AussieSusan If you upgrade to the latest preview, 3rd party devices should now be auto detected.

@pgrenon1 yes and no. Pymakr is for Pycom devices, but we do try to make it work with 3rd party devices. There's a fix in the latest preview version that auto detects the correct root path on 3rd party devices. I don't have any 3rd party devices to test, so would love to hear your experience if you try it.

@pgrenon1
Copy link
Author

pgrenon1 commented Jun 10, 2022

@AussieSusan If you upgrade to the latest preview, 3rd party devices should now be auto detected.

@pgrenon1 yes and no. Pymakr is for Pycom devices, but we do try to make it work with 3rd party devices. There's a fix in the latest preview version that auto detects the correct root path on 3rd party devices. I don't have any 3rd party devices to test, so would love to hear your experience if you try it.

Hey @jakobrosenberg I upgraded to the preview using the link you sent earlier and it did not detect the root path. But I haven't tried doing the whole device setup I just created a new blank pymakr project.

I was however able to go in the settings and change it so it matches my device and now everything seems to work! So thanks a lot!

@grzegorzwozny
Copy link

I had a similar problem with code uploading in Pymakr v2.22.5.

I solved this problem by using the CP2102 USB<->UART adapter instead of the built-in CH340.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants