← index #17020Issue #15779
Off-topic · high · value 2.672
QUERY · ISSUE

Memory corrupted after micropython firmware programming Arduino OPTA

openby panther50500opened 2025-03-27updated 2026-03-25
bugport-stm32

Port, board and/or hardware

Arduino OPTA

MicroPython version

I'm using Arduino Opta with MicroPython and two of them work fine. However, I ordered one online and encountered a problem after programming the firmware. Files in file explorers (Linux or Windows) are corrupted (special characters displayed and undefined files created). If I try to program it with Arduino, it seems to work fine.
I returned it to the reseller who sent me another one but it has the same problem.
Someone else have this problem ?
Thanks
Frédéric

Reproduction

try with :

ARDUINO_OPTA-20241129-v1.24.1.dfu (which works with another boards)
ARDUINO_OPTA-20250326-v1.25.0-preview.410.gdd7a950bb.dfu (which works with at least one other board)

Expected behaviour

No response

Observed behaviour

try with :

ARDUINO_OPTA-20241129-v1.24.1.dfu (which works with another boards)
ARDUINO_OPTA-20250326-v1.25.0-preview.410.gdd7a950bb.dfu (which works with at least one other board)

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

rp2: FatFS filesystem is not recreated after erasing the flash.

closedby iabdalkaderopened 2024-09-03updated 2024-09-19
bugport-rp2

Port, board and/or hardware

rp2 port, Arduino Nano-RP2040

MicroPython version

MicroPython v1.24.0-preview.260.g09d070aa5

Reproduction

This particular board has a 16MBytes flash, 2MBytes of which are reserved for the firmware, the rest is for the filesystem. A write of about ~3MBs should be enough to erase the firmware + the filesystem's partition table, but I tested with 16MBytes:

dd if=/dev/zero of=flash.bin bs=1M count=16

Get the board in bootloader mode, with double tap (on Arduino board) or jumper on other boards etc.. then write the binary to flash (erasing everything):

picotool load flash.bin

After it's done, and reset, the ROM bootloader runs. Load MicroPython, for example:

picotool load -x ARDUINO_NANO_RP2040_CONNECT.uf2

Try to use the filesystem:

>>> import os
>>> os.stat(".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV

Expected behaviour

I expected it to detect that there's no valid filesystem and re-create it.

Observed behaviour

The board boots MicroPython, the storage device is mounted, however it doesn't have a valid filesystem now:

>>> import os
>>> os.stat(".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV

>>> import vfs
>>> import machine, rp2
>>> bdev = rp2.Flash()
>>> fs = vfs.VfsFat(bdev)
>>> vfs.mount(fs, "/")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied