Shop OBEX P1 Docs P2 Docs Learn Events
Can’t access filesystem/run scripts in MicroPython on P2-EC32MB (works in REPL, but Mu shows error) — Parallax Forums

Can’t access filesystem/run scripts in MicroPython on P2-EC32MB (works in REPL, but Mu shows error)

Hi everyone,

I’m trying to run MicroPython on a Parallax P2-EC32MB Edge Module using a Mini Breakout Board and a Prop Plug
. The device connects fine, and I can access the REPL using the Mu Editor (v1.2.0), but I can’t run scripts or access the filesystem.

Setup:
1. Board: P2-EC32MB Edge Module (32 MB PSRAM + 16 MB SPI Flash)
2. Breakout: Parallax Mini Breakout Board
3. Connection: Prop Plug (USB-Serial)
4. Firmware: MicroPython v1.13-8-g4b51b34d8-dirty (2020-10-28, P2 BOARD with Propeller2 P2X8C4M64P)
5. Editor: Mu 1.2.0 (ESP MicroPython mode, COM port detected)
6. Host OS: Windows 11.

I tried following the instructions on this site "https://www.parallax.com/propeller-2/get-started/micropython"

What works:

The board connects and shows the REPL prompt. I can type commands interactively, e.g.:

print("Hello world")

Hello world
The REPL also reports the correct MicroPython version for the Propeller 2.

What doesn’t work:

When I click on “Files” in Mu, I get this popup:

Running a script gives this error:

where the REPL becomes locked and I have to restart it.

In the REPL, importing the os results in:

So it seems there’s no filesystem detected by MicroPython.

I'm using the ESP mode in Mu editor

From what I can tell, the version of MicroPython I have might not include the flash storage utilities (OzFFS) or SPI flash driver for the EC32MB module. The EC board has 16 MB SPI flash and 32 MB PSRAM, but perhaps MicroPython isn’t set up to mount that flash as a filesystem.

Questions:

  1. Does the standard P2 MicroPython build support the P2-EC32MB’s SPI flash for filesystem operations (os.listdir(), save, etc.)?
  2. If not, is there a special MicroPython build or a driver (like the “Flash File System Driver” demo) that I need to flash?
  3. Has anyone successfully used Mu’s “Files” feature or run uploaded scripts on the P2-EC32MB?

Thank you in advance

Comments

  • RaymanRayman Posts: 15,804

    Well, it's been a minute, but looks like was using the other version of Micropython with Mu:
    https://forums.parallax.com/discussion/169862/micropython-for-p2/p21

    This was the P2-RiscV version. Think there should be executables and source here somewhere...

  • TubularTubular Posts: 4,756

    Hi Rivergood,

    The P2 Native Micropython build goes back 13 or 14 versions now, to a time before littlefs being implemented. We put OzFFS in there to plug the gap but this was something fairly minimal to plug a need at the time. It just resided in the standard 128Mb flash common to all boards (P2Edge-32MB included).

    I don't recall trying Mu's 'files feature', I think this likely makes use of the ability of RP2040 to emulate a flash drive, which we never did with the P2 native Micropython, it was also prior to tinyusb being folded into Micropython.

    None of this probably helps you much, sorry. Is Mu required for what you need to do? A lot of the MP work we did was actually with a keyboard and monitor attached to the P2, I think some features were only available this way. If you can tell us a bit more about what you're hoping to do we can at least comment on whether there's a way.

  • Hi @Rayman,
    thank you for the response, I'll be sure to check it out.

  • Hi @Tubular ,

    I’m currently working on implementing a neural network on the Propeller 2. I’ve trained my models in Python, and my goal is to train the network on my PC, then deploy the trained structure — including all weights and biases — to run on the Propeller 2.

    Right now, I’m using FlexProp and building the network architecture in C, but I find that approach a bit cumbersome. I’d much prefer to use MicroPython for this if possible.

  • RivergoodRivergood Posts: 6
    edited 2025-11-05 17:44

    Hi Tubular,

  • evanhevanh Posts: 16,897

    All three posts at once?

  • roglohrogloh Posts: 6,124

    @Rivergood, depending on what you need you might be able to use a filesystem read from SD card (not flash). The native Micropython version did support SD IIRC, however I think you needed to do a couple of extra commands prior to make use of the SD like enable the SPI port and mount it. The long Micropython thread would contain that sequence but this thread post below (and entire thread) may be helpful to find it too. At some point we added softI2C and softSPI as well but I'm not sure if that affected the SD card init sequence required. @Tubular or @ozpropdev may recall how to do SD card better with native MP as they made far more use of this image than I did.

    https://forums.parallax.com/discussion/comment/1555210/#Comment_1555210

Sign In or Register to comment.