Bummer! Your firmware could not be created. The platform id in the binary must match the product platform id

Hello everyone,
I just created a product by typing in

  1. Product Name
  2. Brief Description
  3. Particle Device Type - Photon(P0)
  4. Hardware Version - Not sure what to enter in here, I entered 1 as default
  5. Product Type - Consumer

This created a product. Now I clicked ADD DEVICES->Add One Device and entered my Device ID

Under my APPROVED DEVICES, I can see my device. The Firmware Version is none. Let’s add some firmware to it. I opened the particle IDE and typed in the following code in and downloaded the binary.

PRODUCT_ID(xxxx); //xxxx is my product ID as displayed on my window
PRODUCT_VERSION(1); //I am not sure what this is so I entered 1 here

int led = D7; // You’ll need to wire an LED to this one to see it blink.

void setup() {
pinMode(led, OUTPUT);

void loop() {
digitalWrite(led, HIGH); // Turn ON the LED pins
delay(300); // Wait for 1000mS = 1 second
digitalWrite(led, LOW); // Turn OFF the LED pins
delay(300); // Wait for 1 second in off mode

I clicked the firmware icon->UPLOAD PRODUCT FIRMWARE
Entered Version Number as 1
Gave it a tile and description and chose my .bin file

When I click Upload I get

Bummer! Your firmware could not be created. The platform id in the binary must match the product platform id

I am not sure where am I going wrong. Instead of a sarcastic bummer message, it would be nice to display the conflict. Like the id in the bin file is this and you have entered this!

Any ideas where am I going wrong? Thanks for your time.

Be sure to :star: the correct device before downloading a binary of the firmware.

Eg. you added a Photon so in the Web IDE, you need to :star: a Photon in the devices tab before compilation.

1 Like

Thanks! This fixed the problem. Why do I need to star the device first? I am being denied on the fact that the product id is a mismatch. Staring the device is selecting the device name I guess.

The point is not the actual device but the correct platform has to be selected (Core, Photon/P0, Electron, RasPi, ReadBear Duo, Bluz, …) and that’s done via selecting any device of that platform.
If you have any other Photon/P0 you can just star that one as target platform and flash it to any other Photon/P0, but you won’t be able to build for Electron on flash to a Photon/P0.

Actually not. If you read carefully

1 Like

I have already selected the correct platform in step 3, which is the particle device type. By product id I meant Id’s i.e. a number mismatch. The platform id in the binary(assuming this is the platform id for Photon) must match the product platform id(this is the platform id I selected in step 3- which is Photon).

My understanding is since I have selected the device as Photon in step 3, it set the product platform id to Photon. To set the product id in the binary, to the binary that, this is for photon, I need to click that start I guess.(because that worked)

The error message should be like click the star or something relevant. I didn’t find this information in the official documentation either.

The selected platform ID in Step 3 has nothing to do with the building process of your binary.
It’s only a filter which kind of binary to accept but doesn’t influence the building process in any way.

The build farm does and can not know what product you will be uploading a requested binary for before it knows the platform, since the PRODUCT_ID() itself may be depending on the target platform id (not the other way round).
You can have one code base with something like that

// not a product