-->
Page 1 of 3

How to re-build Library files at each compilation ?

PostPosted: Sun Nov 05, 2017 4:38 am
by andre_teprom
Hello guys,


I have an application running a Server and a Client together, along with the need to count coins, responding pretty much in real time, which has been a challenge. As we all know the server.handleClient() function is the bottleneck of the system, having to be instantiated very often under risk of resetting the system by watchdog timer.

So, to prevent the system from getting stuck in an overly long loop, I reduced the Timeout of the client function parameter that talks to the cloud, namely the TIMEOUT_MS_SERVERRESPONSE value was reduced from 5,000ms to 1,500ms in the ThingSpeak.h file (C:\Users\<USER>\Documents\Arduino\libraries\ThingSpeak\src).

But this seemed have not being reflected in the actual execution of the program, because when surrounding the function below, sometimes due to network issues, it takes a lot of time to get away, much more than the value that I have modified above.

Code: Select allSerial.println ("Start-Upload");
ThingSpeak.setField (ID_DEVICE, (String) MountString ()); // takes long time between both "Serial Prints"
Serial.println ("Stop-Upload");


I suspect that the file is not being re-compiled, but rather that some object file is being re-used instead, even though in the Arduino IDE I have changed the option of "agressively cache code" or not.

Anyone have any tips on how to solve this?

Re: Library files are not re-built each compilation ?

PostPosted: Mon Nov 06, 2017 1:30 pm
by tele_player
The easy way to verify if a library is being recompiled is to put an error in the library. For instance, add the following line near the top of ThingSpeak.h:

#error YES LIBRARY IS COMPILED

Re: Library files are not re-built each compilation ?

PostPosted: Tue Nov 07, 2017 9:21 am
by andre_teprom
Actually, this question was more rhetorical, so maybe the thread title is not quite appropriate (I'll try editing it).
In fact, I'd like to know HOW to ensure that the libraries will be re-compiled.

Re: How to re-build Library files at each compilation ?

PostPosted: Tue Nov 07, 2017 1:25 pm
by martinayotte
By looking at file timestamp in the /tmp/arduino_build_xxxxxx folder and libraries subfolder.