Naive new user of Photon

Hi @stevech

Welcome! I will take a shot at some of your questions.

The linker output was previously visible in the web IDE but when Photon came with modular build of just the user code, I think they took it out until they could make it right. I am sure it will come back. For now, a local build will tell you with the make target "size".

The stack and heap sizes are baked in but could be changed in a local build.

For a multi-file project in the web IDE, look for the small "circle-plus" in the upper right hand corner. Clicking this add a pair of new tabs (.h and .cpp) to your project where you can paste in code. The assumption is that your main file (.ino or sketch in Arduino-speak) gets a preprocessor applied to it to make writing C easier. This preprocessor is not robust against C++ currently and so the assumption is that you put your C++ headers and code in these tabs and the preprocessor is not applied. There has been a persistent web IDE bug with duplicated tabs that the team has been fighting, but I believe it is currently in remission.

I am sure you could hook up stdio if you built locally, but code size might swell. Arduino has a different way of handling printing and input which is easy to learn if you choose to.

I don't know much about installing the CLI on a PC--the Mac instructions worked OK for me.

The current web IDE uses arm-none-eabi-gcc 4.8.4 20140526. They tried 4.9.3 last week but it had a strong negative impact on binary size when compiling for the Particle Core (previous product) and so they reverted. You could start by reading here

2 Likes