Keep getting error when calling pycom.bootmgr to update to littleFS
-
I have this line inside my boot.py file as the first thing the pycom should do:
pycom.bootmgr(boot_partition=pycom.FACTORY, fs_type=pycom.LittleFS, safeboot=False, reset=False)
when I call it though I get an error saying
safeboot must be True or False
. When do I need to call this function and why would I get this error? Thanks!
-
@lmerza What do you expect as the result? If you just call
pycom.bootmgr()
, the actual boot setting are reported.
-
@robert-hh I also tried
pycom.bootmgr(boot_partition=pycom.FACTORY, fs_type=pycom.LittleFS)
and it did not work. I triedpycom.bootmgr(fs_type=pycom.LittleFS)
and it did not work either. The error doesnt make sense but its what I'm getting no matter what.
-
@lmerza you do not need the safeboot option.
Edit: Looking into the code, the message is just wrong. It is issued if either the value is not True or False, but also if it is the same as already set.
-
@robert-hh It's not called on every boot, I'm trying to call it once to reformat but I cant get it work even once because of this error.
-
@lmerza you have to call bootmgr only once in a while to change settings, not on every boot.
Generally, the bootmgr option get active on the next boot, not the actual one.