@alexpul But if it's only about not executing boot.py and main.py on boot, you can do similar with python scripts: from machine import reset def safe_boot.py() # create a special main.py and reset f= open("no_main.py", "w") f.write('''import os\nos.remove("no_main.py")\n''') f.close() reset() and then a specific boot.py, which checks for that special main.py: import machine import os try: f = open("no_main.py") f.close() machine.main("no_main.py") except OSError: # do the previous boot.py stuff here Or something similar in you regular boot.py and main.py, which just checks for the existence of a flag for bypassing.