- I’ve followed: https://docs.particle.io/faq/particle-tools/local-build/photon/
- I can build “hello world” firmware locally.
When I try to add a library that has some silly requirements on header paths (all files in the lib refer to sibling directories via an #include "foo.h"
), the build predictably fails not being able to find foo.h
.
So I read: https://github.com/kbowerma/particle/blob/master/photon_firmware/firmware/docs/build.md
Learned a lot, but I can not for the life of me get a build.mk
file to be considered by a local build.
Tried:
appdir
library.properties
src
build.mk
lib
lib_with_subdirs
src
a/
b/
appdir
library.properties
src
lib
lib_with_subdirs
build.mk
src
a/
b/
appdir
library.properties
src
lib
lib_with_subdirs
src
build.mk
a/
b/
appdir
library.properties
src
build.mk
lib
lib_with_subdirs
src
a/
b/
build.mk
appdir
library.properties
src
lib
lib_with_subdirs
src
a/
b/
- Swearing also has not been effective.
- In addition to these permutations I attempted moving all the headers into an
inc
dir as I’ve seen in a couple examples.
Setup:
- Windows 10
- MinGW
- gcc-arm-none-eabi-5_3-2016q1-20160330-win32.exe as recommended
- On branch release/stable
I’ve placed echos in the build.mk
to see it getting considered, it does not print. In all cases I get an output d:/code/photon/application/lib/eve/src/FT_Esd_Framework/FT_Esd_Dl.c:2:25: fatal error: FT_Platform.h: No such file or directory
. How do I get a makefile in my application source tree get used with a local build?
# From https://docs.particle.io/faq/particle-tools/local-build/photon/#including-additional-header-directories
# Standard behavior must be included here
INCLUDE_DIRS += $(SOURCE_PATH)/$(USRSRC) # add user sources to include path
CPPSRC += $(call target_files,$(USRSRC_SLASH),*.cpp)
CSRC += $(call target_files,$(USRSRC_SLASH),*.c)
APPSOURCES=$(call target_files,$(USRSRC_SLASH),*.cpp)
APPSOURCES+=$(call target_files,$(USRSRC_SLASH),*.c)
# Custom stuff can be added here
INCLUDE_DIRS += $(SOURCE_PATH)/$(USRSRC)/FT_Eve_Hal
all:
@echo "+++++++++++++Including dirs: $INCLUDE_DIRS"