-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Describe the bug
Short code (e.g. 4813 bytes after complied) are correctly stored on hub. But writing long code (e.g. 168002 bytes after complied) to Prime Hub (run code and switch off hub) in some way locks flash access - after power on hub can't run saved program and can't save (or maybe can't read) any other program or user data (via system.storage) to flash.
Hub still can running programs. Flashing by old original Lego firmware, make update from Lego Spike App and flash by pybricks unlocks flash again.
To reproduce
Steps to reproduce the behavior:
- write long program (see attachment)
- run it on Prime Hub with
pybricksdev run ble hello-big.py - power off hub
- power on hub
- program is missing
- run some simple (short) program with
pybricksdev run ble hello-small.py - power off hub
- power on hub
- this program is missing too
Expected behavior
Do not lock writes (or reads?) to "user" flash by write long piece of code.
This can be some hardware issue (i don't have second hub to check), but even in this case should be option to force erase "user" flash to restore writing short programs (and user data) without multistep firmware reflashing.
Attachment
hello.py.txt - sample program, without changes is 4813 binary size and works OK, after add more random text causes flash access problem.