Memory corrupted after micropython firmware programming Arduino OPTA
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
File Encoding / SyntaxError Problem with Arduino Opta and MicroPython
Port, board and/or hardware
OPTA RS485
MicroPython version
Device: Arduino Opta RS485
MicroPython version: v1.26.1 (2025-09-11)
Flashed file: ARDUINO_OPTA-20250911-v1.26.1.dfu
Tools used: Thonny and mpremote
Installation method:Dfu-utils and Arduino’s official MicroPython installer (same result)
Reproduction
-
Reset the Opta’s memory using the example sketch QSPIFormat from the Arduino IDE.
-
Flash the latest .dfu file:
ARDUINO_OPTA-20250911-v1.26.1.dfu
- Disconnect and connect Usb cable
- Connect using Thonny or mpremote.
Every time I connect, I immediately see this error:
Traceback (most recent call last):
File "boot.py", line 3
SyntaxError: invalid syntax
MicroPython v1.26.1 on 2025-09-11; Arduino OPTA with STM32H747
Type "help()" for more information.
Expected behaviour
No response
Observed behaviour
I noticed that boot.py and main.py are always corrupted or encoded incorrectly after flashing.
Example of what boot.py looks like:
boot.py -- run on boot to configure USB and filesystem
Put app code in main®xù
ŠÂ^MŠéÃøïúü¨Ãéëè...
I tried manually reformatting the flash memory:
import os, vfs, pyb
vfs.umount('/flash')
vfs.VfsFat.mkfs(pyb.Flash(start=0))
vfs.mount(pyb.Flash(start=0), '/flash')
os.chdir('/flash')
Then recreated a simple boot.py:
simple boot
print("BOOT OK")
After reset, this works fine:
BOOT OK
MicroPython v1.26.1 on 2025-09-11; Arduino OPTA with STM32H747
But when I upload a new main.py (even a simple one):
import time
print("start program")for i in range(1, 100):
print(f"N Message: {i}")
time.sleep(1)print("End program")
…the file becomes corrupted and unreadable:
import time
print("start pzográm"©ŠŠëïýîüÃú¨½¨...
Then after reset:
BOOT OK
Traceback (most recent call last):
File "main.py", line 2
SyntaxError: invalid syntax
Additional Information
-
The issue seems to be related to filesystem encoding or corruption after writing .py files.
-
It happens both with Thonny and mpremote.
-
I’ve confirmed the .dfu flash completes successfully each time.
Code of Conduct
Yes, I agree