0

QT Py boards only going to bootloader mode
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: QT Py boards only going to bootloader mode

by j_tinker on Mon May 24, 2021 10:48 am

Just a dumb question based off of something I thought I saw. I had similar trouble a flurry of fixes I'm not sure what worked.

If Circuit Python is crashed by the code.py program, do we drop back into bootloader mode? Seems my difficulty stopped when I renamed the code.py file. But I also did a bunch of things just before. I don't quite recall how I got he CP drive to come up either to make the edit.

j_tinker
 
Posts: 19
Joined: Sat Aug 18, 2012 10:18 pm

Re: QT Py boards only going to bootloader mode

by danhalbert on Mon May 24, 2021 11:01 am

You would usually drop into safe mode. When you're in safe mode, boot.py and code.py don't run. If you go to the REPL you will see a safe mode reason printed out.

danhalbert
 
Posts: 2445
Joined: Tue Aug 08, 2017 12:37 pm

Re: QT Py boards only going to bootloader mode

by ovin08 on Mon May 24, 2021 2:40 pm

It looks like dropping in the circuitpython uf2 fixed one board since I was able to interact with the board with Mu Editor.
But what about the other boards if I wanted to use arduino IDE for those? Could I somehow drop in a uf2 file again to get those to boot back up?
Or what if I wanted to move from circuitpython back to arduino IDE?

Side question: I got the circuitpython library bundle to use for an i2c LED screen which I got working, but I would have to manually copy the mpy file to the /lib/ directory on the Py to get them to be picked up. Is there a way to have that done automatically just from the imports you add at the top of the code.py file? So far I haven't been able to find what I'm looking for to fix that part(that's why I mentioned maybe wanting to switch from circuitpython back to arduino IDE)

ovin08
 
Posts: 18
Joined: Fri Apr 16, 2021 2:14 pm

Re: QT Py boards only going to bootloader mode

by danhalbert on Mon May 24, 2021 2:58 pm

But what about the other boards if I wanted to use arduino IDE for those?

The Arduino BSP will need a patch to allow more time for the crystal oscillator startup. We will be working on that.

For your other question, check out circup. It's not completely automatic but makes library loading much easier: https://learn.adafruit.com/keep-your-ci ... ith-circup. If you have more questions about that, could you start a new thread?

danhalbert
 
Posts: 2445
Joined: Tue Aug 08, 2017 12:37 pm

Re: QT Py boards only going to bootloader mode

by ovin08 on Mon May 24, 2021 8:46 pm

You mentioned that your team is working on getting arduino IDE working correctly with the QT Py? Is that what you mean?
I was able to upload sketches to the boards I have with the starting bootloader even though they always started in bootloader mode. I still have to double tap the reset button before I upload a sketch though. Why do the boards seem to function differently than when I first connected them to a USB cable and the neopixel lights faded different colors and in and out slowly? Is double tapping reset every time the intended use?
I also found the the github repo with an updated qtpy bootloader of 3.13.0 but that doesn't seem to have changed anything really.

And shouldn't a plain Serial.print statement work with the qt py based on https://learn.adafruit.com/adafruit-qt-py/adapting-sketches-to-m0-m4
I'm getting an error undefined reference to 'Serial'. Even using #define Serial SERIAL_PORT_USBVIRTUAL at the top(Without the surrounding IF statement) it still complains about Serial not being defined. And just messing around, SerialUSB gives the error
Code: Select all | TOGGLE FULL SIZE
'SerialUSB' was not declared in this scope; did you mean 'Serial'?

ovin08
 
Posts: 18
Joined: Fri Apr 16, 2021 2:14 pm

Re: QT Py boards only going to bootloader mode

by danhalbert on Mon May 24, 2021 9:19 pm

In this particular case, we are talking about a hw-based problem that we have a workaround for in CircuitPython, but not in Arduino (yet). This is a rare problem.

Yes, the best way to upload is to double-click reset, then make sure the proper port is select in the Port menu, and then upload. Otherwise Arduino can get confused about which serial port(s) to try to upload to.

danhalbert
 
Posts: 2445
Joined: Tue Aug 08, 2017 12:37 pm

Re: QT Py boards only going to bootloader mode

by danhalbert on Mon May 24, 2021 9:20 pm

I am not sure about the Serial problem, but if you see this problem, please start a new thread -- thanks.

danhalbert
 
Posts: 2445
Joined: Tue Aug 08, 2017 12:37 pm

Re: QT Py boards only going to bootloader mode

by ovin08 on Tue May 25, 2021 6:43 am

Ok, I'll start a new thread about the Serial output problem, thanks!
Will there be any posting on the main adafruit site about a possible fix for using arduino IDE? I'm just wondering if there's an easy place for me to check to see if there's been updates for me to test out :D

ovin08
 
Posts: 18
Joined: Fri Apr 16, 2021 2:14 pm

Re: QT Py boards only going to bootloader mode

by danhalbert on Tue May 25, 2021 10:22 am

We will reply here when it's updated. There would also be an update noted as available in the Arduino IDE.

danhalbert
 
Posts: 2445
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.