I would like to organize my code into folders, but the Arduino IDE seems to ignore any sub-folders of the sketch folder at compile time. Is there a way around this?
jnmacdnld:
I would like to organize my code into folders, but the Arduino IDE seems to ignore any sub-folders of the sketch folder at compile time. Is there a way around this?
Yes, don't use the Arduino IDE.
If your project is so complex that you need to start using sub-folders, then you'd be much better off using a proper IDE, like Eclipse.
If you have sketches in a subdirectory (other than the libraries subdirectory) it works fine for me (linux, Arduino 1.0.3 and 1.0.5)
Works for me on Windoze too, Arduino 1.0.x.
majenko:
jnmacdnld:
I would like to organize my code into folders, but the Arduino IDE seems to ignore any sub-folders of the sketch folder at compile time. Is there a way around this?Yes, don't use the Arduino IDE.
If your project is so complex that you need to start using sub-folders, then you'd be much better off using a proper IDE, like Eclipse.
That's a very good point. I'm on Windows with a Due board, so the option that stands out is Atmel Studio/Visualmicro.
Huh. I'm using Arduino 1.0.5 with a Due board. Maybe the build process for Due is different? I'll try again.
For anyone who's interested, I also found this: GitHub - sudar/Arduino-Makefile: Makefile for Arduino sketches. It defines the workflows for compiling code, flashing it to Arduino and even communicating through Serial., which seems like a great option for someone like me who's familiar with the command line and already has a preferred text editor (for me, Sublime Text).
I was about to say, Sublime Text is the bomb and then just makefiles, ironic you thought the same thing, but that's just the good stuff man.
jnmacdnld:
I would like to organize my code into folders, but the Arduino IDE seems to ignore any sub-folders of the sketch folder at compile time. Is there a way around this?
What is it that you want to put in sub folders ?
Getting an Arduino Due makefile working on Windows seems to be more trouble than it's worth.
UKHeliBob:
jnmacdnld:
I would like to organize my code into folders, but the Arduino IDE seems to ignore any sub-folders of the sketch folder at compile time. Is there a way around this?What is it that you want to put in sub folders ?
I want to put C++ source files in subfolders. For example, I have unit tests and I would like to put these in a separate folder called "tests" in order to make my sketch directory more organized
EDIT: I was able to get a Due makefile working on Windows 64-bit. Details are here for those interested.
EDIT:
cypherrage:
I was about to say, Sublime Text is the bomb and then just makefiles, ironic you thought the same thing, but that's just the good stuff man.
Haha yea it is pretty sweet, and hey great minds think alike!
Thanks to all who helped me!