WiringProject / Wiring

Wiring Framework
http://wiring.org.co/
Other
217 stars 168 forks source link

No working Makefiles #4

Open lschneiderbauer opened 12 years ago

lschneiderbauer commented 12 years ago

Hi,

i tried to compile Wiring's Libraries myself.

First the core: After the initial failing of the make-command, I tried to fix obvious problems in the makefile, but after a while I came to the conclusion, that this makefile is not usable at all. (e.g. it tries to use files, which don't even exist; and there are no rules for the .c/.cpp files itself, just links to it.) And by the way: the makefile is marked as executable, which does not make sense either.

Secondly: There are no makefiles (or at least I didn't find any) for the non-core libs (like LED).

So.. how do you people compile your libs? (Nevertheless, I'd like to thank you for contributing to this great open source project. I appreciate the effort.)

Thank you! Lukas Schneiderbauer

dbarragan commented 12 years ago

hi Lukas, yes the makefiles in the libraries folders are not really working as you expected, the libraries are compiles from the Wiring environment when they are included on a program. User's Libraries could be located in the sketchbook folder (Documents/Wiring/libraries or My Documents/Wiring/libraries) and will be automatically added to the Sketch - > Import Library menu under the User contributed section, common are located within the application folder, as well as core libraries which are inside the core/libraries folder and dare dynamically selected when a board selected uses a different core. Please let me know what are you trying to do se we can collaborate better. Thank you, Hernando.

lschneiderbauer commented 12 years ago

Hi Hernando, thank you for your quick response!

Okay, I'll try to give you an overview of my intentions. I attend a class, where we do microcontroller-programming among other things (actually we have not started yet). The decision was made to use your Wiring-IDE. It turns out, that it is not working very well on my system (Gentoo Linux). I would spend some time to fix this if I actually were interested in using it, but to be honest, I don't like this kind of IDE and I absolutely want to avoid java. :) ). Since the API provided by Wiring seems pretty reasonable to me and of course my code should not diverge too much from my colleges' ones I intend to use this API. Plus I can use any IDE I want. (Wonder of open source, hurray!) I already have a working compiler and a nice makefile for my future projects. Because of this I tried to compile the API (to provide the object files needed for my code).

In the meantime I tried to hack a little dirty makefile to get the object files. It turns out, that the Wiring.h header wants to include a file named "WConstants.h", which doesn't exist. So I begin to wonder, if the code-base is somehow broken. ? Do you have any recommendations for me?

Lukas

dbarragan commented 12 years ago

hi Lukas, great, yes the file is here: https://github.com/WiringProject/Wiring/tree/master/framework/cores/Common all common files for all cores are in there. Let me know.

lschneiderbauer commented 12 years ago

Status report: okay, I finally managed to get some results. I made one makefile for the whole project which just compiles every c/cpp file, that it can get in its hands. Additionally I could link a program with a main() function initializing the LED-Class in it and I even got a hex-file out of it, which is supposed to land on the microcontroller. :) What bothers me now is the size of the hex file. 63 kB .. is a bit big for my taste, isn't it?

dbarragan commented 12 years ago

well yes, that includes the whole thing on a file : ) Internally the compiling process only includes needed files for a sketch (used libraries etc)

rei-vilo commented 12 years ago

I'm presently expanding my embedXcode project to Wiring.

embedXcode uses Xcode to program Arduino and chipKIT boards. Due to its modular design based on makefiles, adding a new platform only requires writing the specific makefile for this platform, provided the IDE is based on Processing.

Even if embedXcode is primarily aimed at Xcode and thus on Mac OS X, the makefiles are standard enough to be used with other standard IDEs like Eclipse, NetBeans et al in other OSes.