Closed SpoofEx closed 4 years ago
I have a similar issue on MacOS where I can't upload changes.
I have to reset the flash and do a full load, which is quite annoying.
Hi @SpoofEx are you on the latest firmware? There have been a bunch of stability improvements between the firmware and pymakr in the last versions. Going back to 1.1.0 indeed also doesn't work for all firmware versions. Let me know if updating helps.
@bjoernbusch this happens on older boards that have less RAM. The current way of uploading takes a bit of memory, so if you are already using some memory it will run out. It will be solved in the next upcoming Atom + firmware release, where we'll put the board in safe boot automatically for each sync, if there is not enough memory available.
@RalphHogenbirk isn't pymakr 1.2.7 the latest version? At least that is the one I find as the most actual in my atom installation if not how do I find the latest version?
Thanks for the clarification. How can I tell whether the board is older? Version, SerialNumber, etc?
@SpoofEx I'm talking about the firmware on the board itself. You can see the version using 'more -> get firmware version'. Update it using the firmware updater tool from https://pycom.io/downloads/. Firmware updates are coming rapidly and sometimes with important fixes, so it's a good thing to keep up to date :)
@bjoernbusch It's complicated, since all boards got an upgrade at some point. But you can see how much ram is avialable with os.getfree('/flash') (it returns Kb's). Try it after a safe boot or when you have no code running. If you get close to 4000Kb, it's a new board. Old boards should have about 96Kb available.
@RalphHogenbirk I am using this ESP32 Board and flashed the firmware with the latest micropython firmware using the esptool.
@SpoofEx Aha, so not a Pycom board. The code we are using for the upload feature is partly dependent on the Pycom specific firmware, and will probably not work on just bare micropython. We're planning to rebuild the upload feature in Pymakr, after which it will likely also work on your board, but until then you'll have to revert to other upload methods like FTP or rshell.
EDIT You could even run our micropython fork on your board, but that doesn't work without some customisations on all hardware. Not my specialty though, and off topic here, but if you want to do that there is always someone on the pycom forum or github that could help out.
I'm currently using Windows 10, and I can upload just fine to my PyTrack. But when I want to switch to PySense I encounter the same error as @SpoofEx. Anyone know why this is the case for only PySense and not for PyTrack? Could it be the pymakr 1.2.7 that cause the error? Everything is updated and am using the lastest versions. I've been able to upload before to both devices, this error happend just recently.
Guys, we've just released pymakr 1.2.8 that might be of use to some of you. First of all, it has a few bugfixes concerning the 'upload failed' error. For people having memory allocation issues when uploading code, it has a new option in the settings called 'safe boot before upload', which prevents this error. Only works with the latest firmware though, so be sure to upgrade.
Let me know if it helps any of you.
I just updated to the latest plugin and the latest FW (17), but when I enable the option in the global settings in only get: Safe boot not available for this version ()
Any hints?
@bjoernbusch I had the same issue with uploading my code to my LoPy device. What I needed to do was manually doing a safe boot in order to be able to upload. The annoying thing is that if you decide to switch device, you'd have to do the manuall safe boot again... Have not yet found out why that's the case for me, nor how to fix it completely
Looking at the output you get @bjoernbusch, this must be a bug in Pymakr. Are you both on windows and using a LoPy1?
No, I'm on a Mac, but yes, it's a LoPy1.
Thanks. My suspicion is that this happens when asking for the version number already throws a memory exception. In any case, the error handling is not good at that point in the code. I'll come back to you on this after the weekend.
ok, so I updated to the latest version of everything and I still have the same issue. I could narrow it down to a file which is apparently causing the issue. In that file, I have a class defined, without any imports. When I add an import (I tried both pycom and struct), the file is uploaded properly. Is that a known issue / limitation?
@bjoernbusch still the "Safe boot not available for this version ()"? What error message does it throw when that one file fails to upload?
Hi @bjoernbusch 👋 , could you update the issue? Are you still having problems? Note: the latest version of Atom is 1.28.1
and pymakr 1.4.0
having the same issue. ATOM+pymkr suck or i have no idea what i'm doing. COM connects but timeout when trying to upload a simple file. (LoPy Lora). after flashing with pycom firmware all is fine again for the first time....after that no upload at all.....
solving this issue would be highly appreciated! Thanks Norbert
@njordan77 Very likely a different issue than what's going on above. Can you create a new issue with some more information on which versions of pymakr, Atom and firmware you are using. A screenshot of the terminal this error happens would also help. We'll try to help you solve the issue asap!
I'm having this issue as well in VSCode. I don't think it's Atom-specific.
It seems whatever program is uploaded first stays on the board and can't be interrupted for subsequent uploads.
Hi @pirate, in your case it looks like the safe boot doesn't work properly. Can you double check that by pressing ctrl-f before using the upload button? Ctrl-f should safe boot the device and the gps script you seem to be running should not start. If that doesn't happen, let me know what firmware version and hardware you are using. Worst case you might need to safe boot manually (connecting P12 to 3.3v and rebooting)
Thanks, I just managed to get it working by pressing the reset button for 12s, apologies if this was unrelated to the main issue.
@SpoofEx if you get a REPL prompt in Putty and can enter commands,. You have to disable flow control in the Putty serial interface settings. Try something like Ctrl-D, which should reboot the device. Then tyr Ctrl-B should show the firmware revision. Once >>> you get this option try entering any Python statement, like: print("Hello World") It worked for me
It seems I have a similar issue as discussed in with uploading the simplest project with only a main.py file containing print("Hello World"): Current configuration: windows 10 1709 16299.125 atom 1.23.3 Pymakr 1.2.7
I moved back to Pymaker 1.1.0 as Smeedy suggested, but the communication via COM6 with the ESP directly hangs: clicking on 'more' > 'Get serial ports' results in:
However using ampy works fine to get things transported to the board and vice versa, but it would be much nicer if pymkr would work so that my workflow gets integrated.