(resolved) questions about manufacturing utility

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

(resolved) questions about manufacturing utility

Postby mzimmers » Thu Nov 01, 2018 6:59 pm

https://docs.espressif.com/projects/esp ... ng-utility

I've gone ahead and cloned the latest IDF so I have access to the python script now.

This looks like it might be just what I need, though I'm still trying to fully understand it. I have a couple questions:

1. If I understand correctly, this utility generates a .bin file that I can load into a partition on an ESP32. But...how do I perform that load?
2. Is this .bin file (and the partition that it creates) compatible with the NVS library? By this I mean, can I generate key/value pairs that can be programmatically accessed using nvs_get_u8() (or whatever)?
3. I'm currently storing in NVS a C struct that looks something like this:

Code: Select all

struct DeviceDetails
{
    uint8_t macAddr[6];
    char serialNbr[NBR_CHARS_SER_NBR];
    char devName[25];
    uint8_t version[4];
...
Can I create a template of this struct and pre-populate it with some defaults, so it's already available when my app starts for the first time?

Thanks...
Last edited by mzimmers on Tue May 28, 2019 2:12 pm, edited 1 time in total.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: questions about manufacturing utility

Postby mzimmers » Fri Feb 08, 2019 11:19 pm

I'm going to bump this topic...partly because I still don't know the answer to #3, and also because my version of the IDF doesn't have the mfg_gen.py tool.

Is the information on this page still valid?

https://docs.espressif.com/projects/esp ... alues-file

I'd like to get a handle on this, as we may enter manufacturing as early as this month.

Thanks...

EDIT: I pulled the mfg_gen.py tool from version 3.2, but it doesn't accept a --size argument per the web page, and also doesn't seem to honor the REPEAT keyword. Any information would be appreciated.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: questions about manufacturing utility

Postby ESP_Sprite » Sat Feb 09, 2019 10:33 am

The docs link you have points to the latest (github master) version of the documentation; perhaps you're better off pulling the tool from that instead of 3.2.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: questions about manufacturing utility

Postby mzimmers » Sat Feb 09, 2019 6:22 pm

Hi Sprite - yeah, that's probably good advice. What is the latest version with release status? Should I be upgrading my entire IDF from 3.1.1 yet?

EDIT: I read the news forum, and saw that the latest release is 3.1.2. As there's no mass-mfg directory in that release, I grabbed the mfg_gen.py file from master. The --size command works, but it still doesn't seem to perform the REPEAT command. Has anyone got this to work?

EDIT AGAIN: I skipped trying to use the REPEAT command, and am now getting another size option error related to nvs_partition_gen.py. I imagine this is due to trying to use the newer mass-mfg tool with 3.1.1.

So, is it safe to use a newer partition generator with 3.1.1, or am I inviting problems? This is kind of an important question, as it has implications for how we're going to do our manufacturing.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: questions about manufacturing utility

Postby ESP_Sprite » Tue Feb 12, 2019 1:28 am

I think the 3.1 branch is at 3.1.2 now, and we should be releasing both 3.1.3 and 3.2 soon-ish.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: questions about manufacturing utility

Postby mzimmers » Tue Feb 12, 2019 3:46 pm

Thanks, Sprite. I'm still struggling with this utility -- I cloned esp-idf master and am using that now. When I run this command:

Code: Select all

$ mfg_gen.py --size 4096 --conf config.csv --values master_csv_values.csv --prefix wifibutton
I get this error: nvs_part_gen() got an unexpected keyword argument 'input_size'

Seems like I'm going backwards in my progress with this. Any suggestions? Thanks.

EDIT: I looked at nvs_partition_gen.py, and found this:

Code: Select all

def nvs_part_gen(input_filename=None, output_filename=None, input_part_size=None, is_key_gen=None, encrypt_mode=None, key_file=None, version_no=None):
On a hunch, I changed "input_part_size" to "input_size" and now I get a different error: global name 'key_gen' is not defined.

So, with respect to the manufacturing utility:

- I can't use 3.1.2 because it doesn't have this feature.
- 3.2 isn't stable.
- master seems to have some bugs.

Any suggestions on where I go from here?

User avatar
ESP_Roland
Posts: 237
Joined: Tue Oct 09, 2018 10:28 am

Re: questions about manufacturing utility

Postby ESP_Roland » Wed Feb 13, 2019 8:12 am

I'm afraid that the manufacturing utility is currently broken. The fix is under development. It will be fixed first in master then in v3.1 and v3.2. But sorry, I cannot tell when.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: questions about manufacturing utility

Postby mzimmers » Wed Feb 13, 2019 2:51 pm

Hi Roland - thanks for the update on that. From what I could see, the script needed a change to a couple of variable names, but perhaps there's more than that going on. But at least it's good to know that I don't need to keep trying to make it work.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: questions about manufacturing utility

Postby mzimmers » Thu May 16, 2019 3:55 pm

Hi -

Any updates on this?

User avatar
ESP_Roland
Posts: 237
Joined: Tue Oct 09, 2018 10:28 am

Re: questions about manufacturing utility

Postby ESP_Roland » Fri May 17, 2019 7:58 am

Hi mzimmers!

currently I don't see any work-in-progress tasks regarding this. The branches with the fixes to which I was referring before were already merged. Therefore, the manufacturing utility should work now.

Please try it again and if you experience any issues then please open a bug report here:
https://github.com/espressif/esp-idf/issues

Who is online

Users browsing this forum: No registered users and 121 guests