I'm trying to make some changes to a library but none of the changes I make have any effect.
I've edited (and deliberately broken a function I use) the file UIPClient.cpp from within the UIPEthernet library (~/Documents/Arduino/libraries/UIPEthernet/UIPClient.cpp) but my sketch still compiles fine.
Before trying this I had made some changes to timeouts, but these had no affect, which was what lead me to trying to see if my changes did anything at all. They appear not to make it into what's sent to the board.
I think it's because the library is already compiled and the IDE is just using the existing cache.
I'm on a Mac by the way, which I'm not as proficient with in terms of the file system (vs Windows), which isn't helping!
Things I've tried...
Looked for .o files to delete in the library, but can't see any.
Deleted temp files in /var/folders/67/ which was where AVR Dude said the files were when I enabled verbose logging
Switching boards between one and another
I'm sure I'm missing something silly, but I'm a bit stuck!
When I next compile, I get the error 'Build folder disappeared or could not be written' (so I'm pretty sure I deleted the right one).
Now if I close the IDE and open it again, then compile it works, but I don't think it should work... I messed with the code. There's no way that should compile.
unsigned long starttime = millis();
if (conn)
{ ERRORS ERRORS ERRORS ;{errors}
while((conn->tcpstateflags & UIP_TS_MASK) != UIP_CLOSED and 1==2)
{;
I think it would probably be easier on Windows, unfortunately I'm working on a Mac for this.
Surely there's something simple I am missing? It can't be this hard, developing a library would be a nightmare otherwise, you'd only get to test it once.
Sam2D:
I think it would probably be easier on Windows, unfortunately I'm working on a Mac for this.
Surely there's something simple I am missing? It can't be this hard, developing a library would be a nightmare otherwise, you'd only get to test it once.
In MacOS, I would think the files are in "/tmp" since MacOS is actually BSD Linux.... (Leopard 10.5 and above)
If you find the files, try this command line in the "build.........." folder of the project you are trying to compile.
WARNING THE FOLLOWING COMMAND DELETES FILES - TEST IT IN A TEMPORARY DIRECTORY FIRST!
find -name '*.[d|o]' -exec rm {} ;
Not sure if the syntax is exactly right for BSD.... but the idea is "find all files ending in .o or .d in this directory and all below and delete them".
Thanks for the tip, I'll try this soon, the only thing is I have already deleted all the temp files and it's still using a cached/compiled version of the library without my changes... so not sure this would really help.
Also, again surely I am missing something silly here. There must be a way to just tell the IDE 'recompile everything' or recompile the library I've just edited.
Have you tried selecting a different board (say a Mega if you are programming for an Uno) and clicking verify. Don't worry if there are errors. Then change the board back to Uno.
The IDE seems to do a full when the board is changed - maybe it will solve your problem.