I’m trying to build a project outside particle source for photon with a custom makefile following the instructions here, but it doesn’t seem to compile any of my application source, and fails when it can’t find the resulting object files.
Here’s my makefile, named build.mk in the APPDIR I pass to make
# location of the QP/C framework (if not provided in an environemnt var.) ifeq ($(QPC),) QPC := ../../../../.. endif # QP port used in this project QP_PORT_DIR := $(QPC)/ports/arm-cm/qv/gnu # list of all source directories used by this project VPATH = \ .. \ ../.. \ $(QPC)/source \ $(QP_PORT_DIR) \ $(QPC)/3rd_party/stm32f2 \ $(QPC)/3rd_party/stm32f2/gcc # list of all include directories needed by this project INCLUDE_DIRS += \ -I../.. \ -I$(QPC)/include \ -I$(QPC)/source \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/stm32f2 # C source files MY_SRCS := \ bsp.c \ main.c \ philo.c \ table.c \ system_stm32f2xx.c \ startup_stm32f2xx.c QP_SRCS := \ qep_hsm.c \ qep_msm.c \ qf_act.c \ qf_actq.c \ qf_defer.c \ qf_dyn.c \ qf_mem.c \ qf_ps.c \ qf_qact.c \ qf_qeq.c \ qf_qmact.c \ qf_time.c \ qv.c CSRC += $(MY_SRCS) $(QP_SRCS)
My understanding of how this works is I just need to append sources/libraries/include_directories to the variables listed in the documentation and the particle build tree will do the rest, but am I missing something? Do I need to specificy a target in this makefile? Error message given below.
all' does not exist. File…/build/target/user/platform-6-m//libuser.a’ does not exist.
../build/target/user/platform-6-m//bsp.o' does not exist. Must remake target…/build/target/user/platform-6-m//bsp.o’.
make: Entering directory
/vagrant/firmware/user' make: *** No rule to make target…/build/target/user/platform-6-m//bsp.o’, needed by
../build/target/user/platform-6-m//libuser.a'. Stop. make: Leaving directory/vagrant/firmware/user’
make1: *** [user] Error 2
make1: Leaving directory `/vagrant/firmware/modules/photon/user-part’
make: *** [modules/photon/user-part] Error 2