Your firmware could not be created. The product id in the binary must match the provided product id

Hello Particle Community. I hope all are well.

I'm trying to move from single devices to products. This seems to require me to move from the Web IDE to Particle Workbench in VS Code. Particle Workbench compiles and makes the binary file that can then be uploaded to a product's firmware. However, whenever I try to upload a product's firmware, I get the error message: Your firmware could not be created. The product id in the binary must match the provided product id. How do I set the product id? Please advise. Thank you.

What device and Device OS version are you targeting? This should not be required for current versions of Device OS for Gen 3 and Gen 4 devices.

Make sure you use Particle: Configure Project for Device in Workbench to make sure the right platform and Device OS version is selected. Each product can only have one device platform, and it must match what you've targeted.

You must also make sure you've set the product version in your main source file:

PRODUCT_VERSION(1);

Hello @rickkas7. Thank you for your quick reply. It's worth mentioning that I am able to flash a single device through Particle Workbench (as well as the Web IDE). The microcontroller is an Argon (all the devices in this product are Argons), which is a Gen 3 device. I was using the latest Device OS when compiling, at least the latest one in the dropdown menu, deviceOS@6.2.1. I have used the command: Particle: Configure Project for Device in Particle Workbench.

When I try to add PRODUCT_VERSION(1); to the top of my source code, I get a compile error: expected constructor, destructor, or type conversion before '(' token.

You only need the PRODUCT_VERSION(1) when uploading the the console, so that behavior is expected.

Make sure it's declared like you would a global variable, not inside a function. Also after #include "Particle.h" if you are using a .cpp file.

Hello @rickkas7! If I put "Product_Version(1)" below "#include particle.h", I am able to upload my firmware successfully. Thank you. What a strange way to present that error: "The product id in the binary must match the product id." Who knew.

1 Like