I have a question about how SimpleIDE deals with "project libraries". I'm thrilled to see that new version of the Simple-Libraries source code have SimpleIDE project files (.side files) for every library, because I can now provide compiled versions of these libraries with PropWare with a higher level of confidence that they are compatible with the versions provided by SimpleIDE. I get this confidence by parsing the SimpleIDE project files in PropWare's build system and using that to build the libraries, rather than searching for all .c files and then adding a bunch of exceptions and extra rules to try and find the correct files (and now I can use the compilation flags provided by the .side files! even better).
But I ran into a snag: most, if not all, of the project files list a source file with a main function in it. When I open one of these project files in SimpleIDE and click the "Build" button, SimpleIDE is smart enough to ignore that file with the main definition. How does it know to do that? Does it always exclude the first line in the project file? That seems a bit unlikely to me because that would mean SimpleIDE is incapable of having a library-only project, which I didn't think was the case. Is SimpleIDE opening every file and looking for a definition of main, and then excluding any file(s) that have such a definition?
Here's one such project file
>memtype=cmm main ram compact
And here's the output when clicking the "Build" button:
Project Directory: /......./PropellerProjects/PropWare/Simple-Libraries/Learn/Simple Libraries/Utility/libcolormath/
SimpleIDE Version 1.1.0
/home/david/Documents/SimpleIDE/ Updated on: 2017-02-20
propeller-elf-gcc -v GCC 4.6.1 (propellergcc-alpha_v1_9_0_)
propeller-elf-gcc -I . -L . -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 -c compareRRGGBB.c -o cmm/compareRRGGBB.o
propeller-elf-gcc -I . -L . -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 -c get8bitColor.c -o cmm/get8bitColor.o
propeller-elf-gcc -I . -L . -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 -c getColorRRGGBB.c -o cmm/getColorRRGGBB.o
propeller-elf-gcc -I . -L . -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 -c remapColor.c -o cmm/remapColor.o
propeller-elf-ar rs cmm/libcolormath.a cmm/compareRRGGBB.o cmm/get8bitColor.o cmm/getColorRRGGBB.o cmm/remapColor.o
/opt/parallax/bin/propeller-elf-ar: creating cmm/libcolormath.a
propeller-elf-gcc -I . -L . -o libcolormath.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 libcolormath.c cmm/libcolormath.a -lm
propeller-load -s libcolormath.elf
propeller-elf-objdump -h libcolormath.elf
Done. Build Succeeded!
Notice that libcolormath.o is magically excluded from the invocation of propeller-elf-ar
: C++ HAL (H
ayer) for PropGCC; Robust build system using CMake; Integrated Simple Library
, and libPropelleruino
(Arduino port); Instructions for Eclipse and JetBrain's CLion
; Example projects; Doxygen documentation
Tag me with "@DavidZemon" if you have a question for me. I will be checking these forums far less for the forseeable future.