Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
blakev
Posts: 3
Joined: Fri Aug 10, 2018 1:51 am

Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by blakev » Fri Aug 10, 2018 1:55 am

I was running into some memory issues so I added a couple of my modules to `/modules` before creating a custom firmware.

Flashing and running into the REPL via serial works just fine. However, I'm no longer able to run a `boot.py` or a `main.py`

My custom modules are there, and they work as expected, but those files are ignored and it always dumps right into the REPL.

[code]
PYB: soft reboot
Activated UART(0) for REPL
MicroPython v1.9.4-443-gc1c798f on 2018-08-10; ESP module with ESP8266
Type "help()" for more information.
>>>
[/code]

Help?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

A couple of tests

Post by pythoncoder » Sat Aug 11, 2018 3:37 am

If you enter

Code: Select all

>>> help('modules')
are your frozen modules listed? If so, they have been compiled into the build.

What happens if you edit main.py to read

Code: Select all

print('In main.py')
and issue ctrl-D to soft-reboot?
Peter Hinch
Index to my micropython libraries.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by Roberthh » Sat Aug 11, 2018 8:58 am

Did you place boot.py and main.py into frozen bytecode too, or did you leave it in the flash file system?

blakev
Posts: 3
Joined: Fri Aug 10, 2018 1:51 am

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by blakev » Sat Aug 11, 2018 9:11 pm

I didn't freeze them, and I did change them to minimal print statements only....they're just never picked up and ran.

krekos
Posts: 9
Joined: Tue Oct 30, 2018 4:34 pm

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by krekos » Tue Oct 30, 2018 4:39 pm

Hello. I'm starting with micropython and i have same problem. When iwas using firmware downloaded directly from Site i have no problem with runing boot.py after restarting board. But when i compile firmware with added modules, ESP start to ignore boot.py which is in flash ...

Please can somebody tell me how to fix it?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by Roberthh » Tue Oct 30, 2018 6:47 pm

boot.py and main.py have to reside in the file system.

blakev
Posts: 3
Joined: Fri Aug 10, 2018 1:51 am

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by blakev » Tue Oct 30, 2018 7:22 pm

They're just never "picked up" if you create your own firmware build.

They're on the file system but never ran.

krekos
Posts: 9
Joined: Tue Oct 30, 2018 4:34 pm

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by krekos » Tue Oct 30, 2018 7:26 pm

File system? what you mean by that?? boot.py and main.py must be "fozen" in firmware??

When i was trying "Hello word" app, with orginal firmware from Site, i upload boot.py to board using mfpshell. And everything was Ok. but now with my own compiled firmware, boot.py don't run.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by Roberthh » Tue Oct 30, 2018 7:56 pm

boot.py and main.py must not be frozen. The ESP8266 has a small FAT file system, which can be used to store data files and scripts.

krekos
Posts: 9
Joined: Tue Oct 30, 2018 4:34 pm

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Post by krekos » Tue Oct 30, 2018 8:19 pm

I have boot.py in FS but ESP always boot to REPL and my boot.py is not started.

Post Reply