mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
OP-500: fix PyMite dependencies on autogenerated files
This is done by separating PyMite-dependent sources and making them dependent on autogenerated python code. This was tested with make -j on Windows and worked fine. It failed with errors otherwise: In file included from ../Libraries/PyMite/vm/class.c:28: ../Libraries/PyMite/vm/pm.h:198: fatal error: pmfeatures.h: No such file or directory
This commit is contained in:
parent
a38fbe6cea
commit
0005729056
@ -52,14 +52,13 @@ endif
|
|||||||
FLASH_TOOL = OPENOCD
|
FLASH_TOOL = OPENOCD
|
||||||
|
|
||||||
# List of modules to include
|
# List of modules to include
|
||||||
MODULES = Actuator Telemetry GPS ManualControl Altitude AHRSComms Stabilization Guidance FirmwareIAP FlightPlan
|
MODULES = Actuator Telemetry GPS ManualControl Altitude AHRSComms Stabilization Guidance FirmwareIAP
|
||||||
|
PYMODULES = FlightPlan
|
||||||
#MODULES = Telemetry Example
|
#MODULES = Telemetry Example
|
||||||
#MODULES = Telemetry MK/MKSerial
|
#MODULES = Telemetry MK/MKSerial
|
||||||
#MODULES = Telemetry
|
#MODULES = Telemetry
|
||||||
#MODULES += Osd/OsdEtStd
|
#MODULES += Osd/OsdEtStd
|
||||||
|
|
||||||
|
|
||||||
# MCU name, submodel and board
|
# MCU name, submodel and board
|
||||||
# - MCU used for compiler-option (-mcpu)
|
# - MCU used for compiler-option (-mcpu)
|
||||||
# - MODEL used for linker-script name (-T) and passed as define
|
# - MODEL used for linker-script name (-T) and passed as define
|
||||||
@ -124,17 +123,19 @@ UAVOBJSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
|
|||||||
# List C source files here. (C dependencies are automatically generated.)
|
# List C source files here. (C dependencies are automatically generated.)
|
||||||
# use file-extension c for "c-only"-files
|
# use file-extension c for "c-only"-files
|
||||||
|
|
||||||
MODNAMES = $(notdir ${MODULES})
|
MODNAMES = $(notdir ${MODULES} ${PYMODULES})
|
||||||
|
|
||||||
ifndef TESTAPP
|
ifndef TESTAPP
|
||||||
|
|
||||||
## PyMite files
|
## PyMite files and modules
|
||||||
SRC += $(OUTDIR)/pmlib_img.c
|
SRC += $(OUTDIR)/pmlib_img.c
|
||||||
SRC += $(OUTDIR)/pmlib_nat.c
|
SRC += $(OUTDIR)/pmlib_nat.c
|
||||||
SRC += $(OUTDIR)/pmlibusr_img.c
|
SRC += $(OUTDIR)/pmlibusr_img.c
|
||||||
SRC += $(OUTDIR)/pmlibusr_nat.c
|
SRC += $(OUTDIR)/pmlibusr_nat.c
|
||||||
SRC += $(wildcard ${PYMITEVM}/*.c)
|
PYSRC += $(wildcard ${PYMITEVM}/*.c)
|
||||||
SRC += $(wildcard ${PYMITEPLAT}/*.c)
|
PYSRC += $(wildcard ${PYMITEPLAT}/*.c)
|
||||||
|
PYSRC += ${foreach MOD, ${PYMODULES}, ${wildcard ${OPMODULEDIR}/${MOD}/*.c}}
|
||||||
|
SRC += $(PYSRC)
|
||||||
|
|
||||||
## MODULES
|
## MODULES
|
||||||
SRC += ${foreach MOD, ${MODULES}, ${wildcard ${OPMODULEDIR}/${MOD}/*.c}}
|
SRC += ${foreach MOD, ${MODULES}, ${wildcard ${OPMODULEDIR}/${MOD}/*.c}}
|
||||||
@ -317,7 +318,7 @@ EXTRAINCDIRS += $(RTOSSRCDIR)/portable/GCC/ARM_CM3
|
|||||||
EXTRAINCDIRS += $(AHRSBOOTLOADERINC)
|
EXTRAINCDIRS += $(AHRSBOOTLOADERINC)
|
||||||
EXTRAINCDIRS += $(PYMITEINC)
|
EXTRAINCDIRS += $(PYMITEINC)
|
||||||
|
|
||||||
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, $(OPMODULEDIR)/${MOD}/inc} ${OPMODULEDIR}/System/inc
|
EXTRAINCDIRS += ${foreach MOD, ${MODULES} ${PYMODULES}, $(OPMODULEDIR)/${MOD}/inc} ${OPMODULEDIR}/System/inc
|
||||||
|
|
||||||
|
|
||||||
# List any extra directories to look for library files here.
|
# List any extra directories to look for library files here.
|
||||||
@ -481,7 +482,7 @@ LSTFILES = $(addprefix $(OUTDIR)/, $(addsuffix .lst, $(ALLSRCBASE)))
|
|||||||
DEPFILES = $(addprefix $(OUTDIR)/dep/, $(addsuffix .o.d, $(ALLSRCBASE)))
|
DEPFILES = $(addprefix $(OUTDIR)/dep/, $(addsuffix .o.d, $(ALLSRCBASE)))
|
||||||
|
|
||||||
# Default target.
|
# Default target.
|
||||||
all: gencode gccversion build
|
all: gccversion build
|
||||||
|
|
||||||
ifeq ($(LOADFORMAT),ihex)
|
ifeq ($(LOADFORMAT),ihex)
|
||||||
build: elf hex lss sym
|
build: elf hex lss sym
|
||||||
@ -500,6 +501,8 @@ endif
|
|||||||
# Generate intermediate code
|
# Generate intermediate code
|
||||||
gencode: ${OUTDIR}/InitMods.c ${OUTDIR}/pmlib_img.c ${OUTDIR}/pmlib_nat.c ${OUTDIR}/pmlibusr_img.c ${OUTDIR}/pmlibusr_nat.c ${OUTDIR}/pmfeatures.h
|
gencode: ${OUTDIR}/InitMods.c ${OUTDIR}/pmlib_img.c ${OUTDIR}/pmlib_nat.c ${OUTDIR}/pmlibusr_img.c ${OUTDIR}/pmlibusr_nat.c ${OUTDIR}/pmfeatures.h
|
||||||
|
|
||||||
|
$(PYSRC): gencode
|
||||||
|
|
||||||
# Generate code for module initialization
|
# Generate code for module initialization
|
||||||
${OUTDIR}/InitMods.c: Makefile
|
${OUTDIR}/InitMods.c: Makefile
|
||||||
@echo $(MSG_MODINIT) $(call toprel, $@)
|
@echo $(MSG_MODINIT) $(call toprel, $@)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user