Hi everyone,
It's me again, Huy.
Currently, our team is working on a project:writing Python on STM32L4R9I DISCOVERY (MicroPython).
The situation of our team team is: we could write MicroPython on the board ( but only command lines in terminal of ubuntu). Also, we could connect the OTG USB and as we type in "lsusb" in Ubuntu as well as in Device Manager of Window we could see the OTG. In addition, we could write MicroPython via OTG.
However, as we connect the board to Ubuntu, there is no disk appearing. (In Window also). By which i mean, there is no main.py and boot.py appearing for us to write.
As in Device Manager, the "Mass Storage Device" appears in USB Controller, but we cannot see anything in COM PORT. The computer of a friend of mine could display COM PORT (PyBoard Comm Port) but no disk.
So I need help to display the Disk (display files mentioned above).
Thank you very much,
Nguyen Duc Huy
[Solved]Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
[Solved]Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
- Attachments
-
- Device Manager when connecting the BOARD
- Screenshot (312).png (39.25 KiB) Viewed 3462 times
Last edited by ndhuy on Thu Dec 05, 2019 1:33 am, edited 1 time in total.
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
I'm not an expert at all, but I thought I'd ask.
Are you able to see the micropython interpreter (REPL) with screen or picocom or whatever you use? If so, what happens when you:
import os
os.listdir()
Sent from my Pixel 2 XL using Tapatalk
Are you able to see the micropython interpreter (REPL) with screen or picocom or whatever you use? If so, what happens when you:
import os
os.listdir()
Sent from my Pixel 2 XL using Tapatalk
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
Hi Kip,
For the first question, when i type in screen /dev/ttyACM0 115200 (I learn this trick from Jimmo), i can write MicroPython. The picture below may tell you. So i would say yes for the first question.
For the second one, as I type in the "os" command. The second picture is what it displayed.
- Attachments
-
- os.listdir()
- 2019-11-28-2.png (101.88 KiB) Viewed 3433 times
-
- REPL
- 2019-11-28.png (26.65 KiB) Viewed 3433 times
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
Weird... you are getting a list of something that's there. What happens when you:
f = open("main.py", "w")
f.close()
Then re-run:
import os
os.listdir()
Perhaps this convo will help someone with more knowledge troubleshoot.
Sent from my Pixel 2 XL using Tapatalk
f = open("main.py", "w")
f.close()
Then re-run:
import os
os.listdir()
Perhaps this convo will help someone with more knowledge troubleshoot.
Sent from my Pixel 2 XL using Tapatalk
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
If you had non-micropython firmware flashed on the board before flashing micropython, then you should do a mass erase and then flash micropython.
Or factory reset the filesystem as documented here: http://docs.micropython.org/en/latest/w ... filesystem
Whwn you flash micropython, it only flashes the firmware portion of the flash and not the filesystem portion, so it's possible that whatever happens to be in the flash where the filesystem lives looks enough like a filesystem to fool micropython into using it rather than thinking its invalid and erasing it.
Or factory reset the filesystem as documented here: http://docs.micropython.org/en/latest/w ... filesystem
Whwn you flash micropython, it only flashes the firmware portion of the flash and not the filesystem portion, so it's possible that whatever happens to be in the flash where the filesystem lives looks enough like a filesystem to fool micropython into using it rather than thinking its invalid and erasing it.
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
Hi dhylands,dhylands wrote: ↑Fri Nov 29, 2019 7:06 amIf you had non-micropython firmware flashed on the board before flashing micropython, then you should do a mass erase and then flash micropython.
Or factory reset the filesystem as documented here: http://docs.micropython.org/en/latest/w ... filesystem
Whwn you flash micropython, it only flashes the firmware portion of the flash and not the filesystem portion, so it's possible that whatever happens to be in the flash where the filesystem lives looks enough like a filesystem to fool micropython into using it rather than thinking its invalid and erasing it.
my problem is quite related as I am working with STM32L4R9I-DISC. when I check in the device manager on Windows, the USB OTG FS appears as USB serial device instead of Pyboard Comm Port in FS mode (as it appears on Ubuntu). Therefore, there is no Pyflash disk appears.
And also, the connection between the board and my laptop is unstable.
Are there any problems related to USB config? what should I do to config the USB to be appear as Pyboard Port?
Thank you,
- Attachments
-
- Screenshot (314).png (24.71 KiB) Viewed 3367 times
-
- Screenshot (313).png (39.45 KiB) Viewed 3367 times
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Display PYFLASH of STM32L4R9IDISC in Ubuntu/Window
Delete ST device in device manager first, then search new device. ST drive may conflict with pyboard drive.