Frozen code images change version on esp8266

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
thetreerat
Posts: 15
Joined: Thu Apr 27, 2017 6:40 pm

Frozen code images change version on esp8266

Post by thetreerat » Tue May 02, 2017 2:23 pm

as a systems admin kind of guy. when I create a firmware with frozen code I get the boot text with the build number that I built my code from so I can't tell after it loaded on a board that it contains my frozen code without doing an import.

So my questions are
1. Is bad form for me to change the boot text before I build the bin file?
2. if not where is that text stored in the git repo that gets baked into the bin?

Thanks
Hal

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

Re: Frozen code images change version on esp8266

Post by pythoncoder » Tue May 02, 2017 4:00 pm

I appreciate this doesn't actually answer your question, but issuing help('modules') will list your frozen modules along with others which are available.
Peter Hinch
Index to my micropython libraries.

thetreerat
Posts: 15
Joined: Thu Apr 27, 2017 6:40 pm

Re: Frozen code images change version on esp8266

Post by thetreerat » Tue May 02, 2017 6:12 pm

no that was not the question but very helpful.

thanks.
Hal

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

Re: Frozen code images change version on esp8266

Post by Roberthh » Wed May 03, 2017 5:43 am

help('modules') will list your frozen modules
Indeed, very interesting.

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

Re: Frozen code images change version on esp8266

Post by pythoncoder » Wed May 03, 2017 6:39 am

At risk of stating the obvious (and again failing to answer the question ;)) a solution to the problem in the OP might be as follows. For each project put a file "project_list.py" in the project's frozen modules directory. This would simply contain print statements describing the build. On all boards main.py would then do something like

Code: Select all

try:
    import project_list
except ImportError:
    print('Standard build.')
Peter Hinch
Index to my micropython libraries.

Post Reply