Hello,
I am trying to set up offline compiling on my machine since Particle cloud compiling is not reliable for larger projects. (see this post for more info).
I have everything setup as per the guide here, and am successfully able to compile/flash test apps.
When I go to try and compile the big main project that I’ve been working on, I hit a plethora of compiler errors:
../../../build/module.mk:223: warning: overriding commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:216: warning: ignoring old commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:232: warning: overriding commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:223: warning: ignoring old commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:256: warning: overriding commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:232: warning: ignoring old commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:261: warning: overriding commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:256: warning: ignoring old commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:277: warning: overriding commands for target `/c/PARTICLE_LOCAL/JazaHub'
../../../build/module.mk:261: warning: ignoring old commands for target `/c/PARTICLE_LOCAL/JazaHub'
build.mk:63: *** "No sources found in ../../JazaHub Controller/mainMash/". Stop.
_
_
My code is split up into several subdirectories as shown in the following screenshot:
_
_
I take it that local compiling doesn’t support subdirectories?
I tested this out by trying to compile the following test file structure:
_
_
Which succeeds as per:
Boompy@TOMS_TOWER /c/PARTICLE_LOCAL/firmware/main
$ make PLATFORM=electron APPDIR="../../TestFlatness" TARGET_DIR="../../TestFlatness" TARGET_FILE="TestFlatness" -s
text data bss dec hex filename
10828 112 1604 12544 3100 c:/PARTICLE_LOCAL/TestFlatness/TestFlatness.elf
_
_
However, if I change the #include
statement in main.cpp to: #include "TestHeader.h"
I get the following when I try to compile:
Boompy@TOMS_TOWER /c/PARTICLE_LOCAL/firmware/main
$ make PLATFORM=electron APPDIR="../../TestFlatness" TARGET_DIR="../../TestFlatness" TARGET_FILE="TestFlatness" -s
../../TestFlatness/main.cpp:2:24: fatal error: TestHeader.h: No such file or directory
#include "TestHeader.h"
^
compilation terminated.
make[2]: *** [../build/target/user/platform-10-m/TestFlatness/main.o] Error 1
make[1]: *** [user] Error 2
make: *** [modules/electron/user-part] Error 2
_
_
So, how do I get local compiling to flatten the file structure? I have tried adding particle.include file to the directory, but I don’t think that works with local compiling based on what I’ve seen. Do I need to make a custom make file? If so, what do I need to put into it?