Hello,
I want to compile a program that is all written and ready to go, i just need to make an edit to a spark-core library (default buffer size for tcp). I am not sure i understand what this entails.
Can I just go to to the build directory of the respective repository folder, run “make clean all” in cmd terminal, then compile my code normally in particle dev and flash it to the photon?
I know particle dev compiles based on all the files i have in the current directory Im working in, i.e. my .ino, .cpps, .h etc. but what is the default it is doing to compile the rest, i.e. the photon firmware etc
My understanding of how it all works is as follows. User firmware (when using Dev or Build) is compiled against a dynamically linked library in the cloud (that is the system firmware) and a stand-alone binary is created and transferred to the Photon and written to the user firmware space in flash. If you are using Build, the cloud will also handle updating system firmware when an update is available.
To compile your own version of the system firmware, you have to use the CLI tools, as you noted. From there, however, you’d (if I understand this correctly) have to compile your user firmware using the CLI to compile against your system firmware. Although, the change you’re making may not really make a difference as you aren’t changing any APIs, so you can probably get away with compiling it normally.
I’m sure the Elites will correct any misunderstanding I may have bestowed. lol
Thanks for the reply, I’m not sure I understand “have to compile your user firmware using the CLI to compile against your system firmware.” but like you said maybe an elite will clear it up.
It would also be good to clarify one thing: do all .cpp files and the .ino go in core-firmware/src and all headers in core-firmware/inc ?
EDIT: I am now encountering problems with PIN_MODE i believe, trying to learn how to “make clean all” with develop branch, no luck yet
If you are building the develop branch you need to be aware that this might be in an unstable state at any given time, hence you have to signal this understanding by setting the compiler flag PARTICLE_DEVELOP=1
The thing about building with CLI against private firmware is new to me. CLI currently always builds against latest, but if your private system is compatible, it could well work (as would the other way of building).
But could you not just alter the app code to use the “buffered” versions of client.read()/client.write() which act upon a user buffer?
It might be “superstition” but even while blanks are allowed in directory/file names, I try to avoid them wherever possible
Some programs don’t wrap the path in double quotes and hence might see multiple parameters where it only is one “blank-broken” path.
when trying make clean all PARTICLE_DEVELOP=1 PLATFORM=photon , the command line paused a second, then started printing the line over and over that its trying to access the directory or whatever =*( . I tried both with the file named makefile as well as Makefile (which i thought it looked for)
Thanks a bundle, now wanna make sure what I was really tryign to do is correct if you dont mind:
I want to change something in the firmwares file spark_wiring_tcpclient.cpp , all i do is change it, put my .ino’s in src and .h’s in inc, and do a make clean all on the module folder and it should compile with my change?