Pages: [1]   Go Down
Author Topic: [mod]recursive compilation  (Read 2732 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Shannon Member
****
Karma: 131
Posts: 10474
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ever wandered to organize your sketch code into a folder structure?
ever wandered to import complex project from and to other IDE witch use folder organization without have to modify every single include?

if you are lost in your sketch's file, then this the MOD for you! It enable the IDE to copy libraries and sketch sub-folder to be copied in the temporary library where the real compilation happen! everything else is worked out by default by compiler!

Now you can have in your sketch a sub-folder witch contains modded-ad-hoc libraries, sub-folder for every sensor's code, and so on!

And this is actually a pull request, so support this post to see this mod became the standard of the next IDE version!! (https://github.com/arduino/Arduino/pull/116)

NOTE:
sub-folder's code is not displayed in the IDE, I'll fix this when I'll have some more free time.
also some libraries support and use "utility" sub-folder, but the include is not path standard.
so you have to change
Code:
#include "BALABL.h"
into
Code:
#include "utility/BALABL.h"
use "/" as path separator, because it is compatible with all system, while "\" path separator work only with Windows. IDE's library has been already patched
Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 70
Posts: 2172
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm all for it. However does it address the problem of non .h and .cpp files being skipped ( #include "MyPinSet.pins" ), I think it is more important than sub-folders. But together would move the IDE far closer to being a standard conforming system.

I hope this mod gets implemented either way. Breaking the current utility folder functionality is a small price to pay, ( 0023 to 1.0 had more severe changes ).
Logged


0
Offline Offline
Shannon Member
****
Karma: 131
Posts: 10474
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All file are copied into compilation folder, it was and it still is like this. (uhmm bad English but i don't know a better way to say it)
I think your problem derive from the way arduino actually modify the .pde: it translate it in a .cpp before the compilation, but doing so have to move the include, and maybe it will auto-forget about what it thinks to be invalid include. But including your MyPinSet.pins into aother .c or .cpp should work. Can you make a test (i'm at work actually)...
[some time later]
found out, from arduino/app/src/processing/app/preproc/PdePreprocessor.java:
Code:
String importRegexp = "^\\s*#include\\s*[<\"](\\S+)[\">]";

so your problem isn't there.
maybe is with the fact that it compiles onlu .S, .c and .cpp? i don't know, please post your error and let's see what i can get out.

Quote
Breaking the current utility folder functionality is a small price to pay
i agree that the price to pay is small, very small because many external library doesn't use the utility folder.
« Last Edit: September 25, 2012, 03:41:39 am by lesto » Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

Pages: [1]   Go Up
Jump to: