Converting a Unique ID Into .bin File For Production

Okay Arduino Community. I am at my whits end with this dilemma and I'm sure many of you can point me in the right direction.

I have a program developed in Arduino that I want to upload to custom built PCB's with ESP32's at production capacity. This is not a major issue and I've addressed this is in the past by generating a .bin file from Arduino IDE and using that .bin file on ESP's flash download tool. Easy peasy.

However, this particular program I developed uses a unique ID (serial number) and also an X.509 certificate of authority to authenticate itself when connecting to a server. Each device will have its own certificate and its own unique ID. At the moment, I have two separate header files that I generate, one for the certificate and one for the unique ID. How do I avoid compiling this code in Arduino for each device to create the .bin file that I need?

What I would like to do is create both header files and somehow convert them to .bin files to be used in the ESP flash tool, but I don't even know if that's possible. What do people typically do in this situation?

Thanks,
Trent

What I would consider (as a non-ESP32 user):

After uploading your code (the "easy peasy" part), connect the board to a PC and have a means to upload certificate and ID via serial to e.g. LittleFS.

It would not be that much of a hassle as it can be the first step of a test procedure of the board.

I would also use LittleFS to read a file, but it would probably be easier to use the ESP filesystem uploader plugin so you could do it all from inside the IDE.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.