Problem after overwriting MicroPython with CircuitPython

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
retiredwizard
 
Posts: 49
Joined: Wed Sep 28, 2016 9:06 pm

Problem after overwriting MicroPython with CircuitPython

Post by retiredwizard »

I have been using MicroPython on my Pico for a couple months and recently decided to give CircuitPython a try. CircuitPython loaded onto the Pico fine and I did my testing without any issues. However, when I then tried to put MicroPython back on the device, I ran into some problems.

After copying the MicroPython UF2 file the Pico reboots but is no longer recognized as a USB drive on either my Windows PC or my Raspberry Pi. When I start Thonny the shell window displays two error messages "Warning: Could not sync device's clock: can't import name RTC" and "Warning: Could not validate time: can't import name RTC". The Thonny shell then shows the REPL prompt and appears to work fine. I can even paste code into a new Thonny window and save it to the device. The code still seems to run fine and will turn the LED on and off for instance.

I have also tried connecting over the /dev/ttyACM0 serial port using dhylands/RSHELL and that no longer works, it simply hangs on the "Trying to connect to REPL" line until ctrl-C is pressed.

I have tried using the flash_nuke UF2 file which did erase all my data but didn't change anything regarding the MicroPython reinstallation.

If I reload the CircuitPython UF2, the Pico once again behaves normally, showing up as a USB drive when attached to either my Windows PC or the Raspberry PI and Thonny's shell connects without any errors.

I did see an earlier post which indicated there shouldn't be any issues going back and forth between MicroPython and CircuitPython so I'm hoping this is an issue with a recent CircuitPython build and can be resolved.

Thanks!

User avatar
tannewt
 
Posts: 3304
Joined: Thu Oct 06, 2016 8:48 pm

Re: Problem after overwriting MicroPython with CircuitPython

Post by tannewt »

This sounds like a MicroPython and/or tooling issue. There shouldn't be any remnants of CircuitPython after the nuke UF2.

So, I'd suggest checking that Thonny ends up back in MicroPython mode. The RTC thonny errors sound like those that happen with CircuitPython.

Also note that MicroPython on the Pico does not show up as a USB drive. That is by design so it's not an error. The Raspberry Pi folks support using Thonny for code editing and file transfer.

User avatar
retiredwizard
 
Posts: 49
Joined: Wed Sep 28, 2016 9:06 pm

Re: Problem after overwriting MicroPython with CircuitPython

Post by retiredwizard »

Well don't I feel foolish :)

Thank you, thank you. You were absolutely right on all counts. I guess I was working too late :/.

The Thonny RTC issue was resolved by selecting MicroPython again instead of CircuitPython. I also uninstalled all my virtual environment apps and reinstalled RSHELL and that's working again (I had installed the adafruit python shell and ampy while testing CircuitPython) .

User avatar
tannewt
 
Posts: 3304
Joined: Thu Oct 06, 2016 8:48 pm

Re: Problem after overwriting MicroPython with CircuitPython

Post by tannewt »

No problem! Glad you got MicroPython going again.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”