Hello,
Sometimes after reset my files main.py and boot.py are corrupted and are made of dots only (....).
My board flashes then two LEDs for a while and does not run my files.
I cannot find why and when is it happening. Any ideas?
Thanks in advance
[stm32f4-disco] Problem after reset
Re: [stm32f4-disco] Problem after reset
It turned out that the whole difference is in unmounting the device from my PC with windows7.
After every change in python files, I have to do remove safely.
That way the files will not be corrupted.
After every change in python files, I have to do remove safely.
That way the files will not be corrupted.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: [stm32f4-disco] Problem after reset
The sure way to avoid file corruption with all MicroPython targets is to disable MSC (USB mass storage) mode in boot.py and manage the filesystem using a tool like rshell https://github.com/dhylands/rshell. There is a fundamental problem in that USB mass storage is a single master design that assumes that the USB subsystem is a dumb disk drive which cannot modify the files. Obviously a MicroPython device can. Sooner or later that will jump up and bite you
In my view the official docs should suggest this way of working but I guess MSC mode is simple and intuitive for beginners.
In my view the official docs should suggest this way of working but I guess MSC mode is simple and intuitive for beginners.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.