How to flash .h and .cpp files to a device?

In the Web IDE, click on the “Devices” menu and change the “System Firmware Target:” for your device to 0.6.3:


1 Like

For some more reading on the Web IDE, here are the references:

A while back I’ve seen a similar report and here is Rick’s response back then

1 Like

I changed the firmware target to 0.6.3 and it verified. However, when i go to flash it, it is giving “You are not including led.h log_backup.h rest_client.h wifi_login.h even though they are a part of this app. Are you sure you want to continue? To include these files, please hit cancel and add include lines to the top of the
to the top of the main app file”. Should i proceed?

That’s just an ignorant warning from the Web IDE which expects you to include these headers in your .ino file since it doesn’t know that you’ll be indirectly including it anyhow.
This doesn’t harm the program at all, but if you want, you can add the include statements to remove that message.

ok. i will try again this evening. thanks again everyone for your help.


update… i had to login with a different laptop at home. i was getting several more error messages. i removed the MACS app and readded them back in with the instructions from above. I copied the contents of the main.cpp into the macs.ino, added the #pragma once into the .h files (first line), set the rom level to 0.6.3 now i am getting one error message. undefined reference to “wlan_select_antenna”. i tried to bring back the app link that i sent out in this message, however, all i get is a blank screen when i click on the link. i have been working on this for hours and trying not to bother you…

Once you remove the base project from your account all shared revisions get invalidated too.
This is the version I’ve still got stored
This builds for me with 0.6.3 (as does yours)

1 Like

Having trouble opening shared files… When i click on your link (or any other shared app links), it opens up the Particle Web IDE page and I do not get anything else? Do i add it thru the libraries? I have tried copying the link directly into Chrome, Firefox, Internet Explorer and… (father forgive me… Edge).

I’m using Chrome and just clicking on the link should suffice.
However, when you copy/past the link make sure you are not also copying the view count that’s automatically appended to the link.
My link ends on 118 but when copy/paste it I get 1182 (currently two views have been registered).

I was able to bring in your saved files. Thanks for the link. I am still getting "undefined reference to “wlan_select_antenna” when i verify. This is so strange. It was working… Grrr…

Are you sure you are targeting a Photon and have set the build target to 0.6.3?

Yes, it is showing the Photon connected. I am set to build 0.6.3.

can u see if it that link will compile for you? This is bizarre.

You have not selected the Photon as target - it needs to have the yellow star activated to actually become the desired target.


That was it!!! I thought if i was connected to it (i was flashing the lights) that is all i needed to to do. Good catch! i owe you lunch … thanks again!

1 Like

Then how would it know which device to flash :wink: ?

Very true… now i know that method! I was able to flash 3 of the modules! Strange thing, it does not like my work laptop for some reason. They may have some jacked up USB drivers they are using on the image. Again, i really appreciate the help! This community is really great!


You may want to ready the changelog for v1.0.0 (which your screen capture shows is currently on the device).

or specifically:

Note: Downgrading [Electron/Photon/P1] OTA or YModem transfer:
If you need to downgrade, you must downgrade to 0.7.0 and then 0.6.3(Photon/P1), 0.6.4(Electron) to ensure that the bootloader downgrades automatically. When downgrading to older versions, downgrade to 0.7.0 first, then 0.6.3(Photon/P1), 0.6.4(Electron), then to an older version such as 0.5.5.

1 Like

The problem is not the installed device OS version but the build target.
You can run applications that are targeted at previous versions, so that’s not the issue.
The issue is that the respective commands where made “private” in versions following 0.6.3 so you can’t access them in code anymore, but they are still present to be called (when your code has the privilege).

1 Like