Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First shot towards a separate HITL target (#2062)
* First shot towards a separate HITL target * Changes in HITL - still doesn't compile * Added makefile selection * HITL target works for fixedwing and rotorcraft - still needs cleanup and TLC * Removed info messages from compilation process
- Loading branch information
Showing
43 changed files
with
163 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$(TARGET).CFLAGS += $(nps.CFLAGS) | ||
$(TARGET).srcs += $(nps.srcs) | ||
$(TARGET).LDFLAGS += $(nps.LDFLAGS) | ||
include $(PAPARAZZI_SRC)/conf/Makefile.nps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ | |
# | ||
# This is the common Makefile for the nps target. | ||
# | ||
|
||
SRC_ARCH = arch/sim | ||
|
||
OPT ?= 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,11 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
|
||
# | ||
# NPS Simulator | ||
# NPS SITL Simulator | ||
# | ||
# Common makefile for both SITL/HITL simulation | ||
# SITL specific makefile | ||
# | ||
# still needs a FDM backend to be specified, e.g. | ||
# <subsystem name="fdm" type="jsbsim"/> | ||
# | ||
|
||
USE_HITL ?= 0 | ||
|
||
nps.ARCHDIR = sim | ||
|
||
# include Makefile.nps instead of Makefile.sim | ||
nps.MAKEFILE = nps | ||
|
||
nps.CFLAGS += -DSITL -DUSE_NPS | ||
nps.LDFLAGS += -lm -livy $(shell pcre-config --libs) -lgsl -lgslcblas | ||
|
||
# detect system arch and include rt and pthread library only on linux | ||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Linux) | ||
nps.LDFLAGS += -lrt -pthread | ||
endif | ||
|
||
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps | ||
|
||
# sdl needed for joystick input | ||
nps.LDFLAGS += $(shell sdl-config --libs) | ||
|
||
|
||
# | ||
# add the simulator directory to the make searchpath | ||
# | ||
VPATH += $(PAPARAZZI_SRC)/sw/simulator | ||
|
||
NPSDIR = nps | ||
nps.srcs += \ | ||
$(NPSDIR)/nps_random.c \ | ||
$(NPSDIR)/nps_sensors.c \ | ||
$(NPSDIR)/nps_sensors_utils.c \ | ||
$(NPSDIR)/nps_sensor_gyro.c \ | ||
$(NPSDIR)/nps_sensor_accel.c \ | ||
$(NPSDIR)/nps_sensor_mag.c \ | ||
$(NPSDIR)/nps_sensor_baro.c \ | ||
$(NPSDIR)/nps_sensor_sonar.c \ | ||
$(NPSDIR)/nps_sensor_gps.c \ | ||
$(NPSDIR)/nps_sensor_airspeed.c \ | ||
$(NPSDIR)/nps_sensor_temperature.c \ | ||
$(NPSDIR)/nps_sensor_aoa.c \ | ||
$(NPSDIR)/nps_sensor_sideslip.c \ | ||
$(NPSDIR)/nps_electrical.c \ | ||
$(NPSDIR)/nps_atmosphere.c \ | ||
$(NPSDIR)/nps_ivy.c \ | ||
$(NPSDIR)/nps_flightgear.c \ | ||
$(NPSDIR)/nps_radio_control.c \ | ||
$(NPSDIR)/nps_radio_control_joystick.c \ | ||
$(NPSDIR)/nps_radio_control_spektrum.c \ | ||
$(NPSDIR)/nps_main_common.c | ||
|
||
ifeq ($(USE_HITL),1) | ||
include $(CFG_SHARED)/nps_hitl.makefile | ||
else | ||
include $(CFG_SHARED)/nps_sitl.makefile | ||
endif | ||
|
||
# for geo mag calculation | ||
nps.srcs += math/pprz_geodetic_wmm2015.c | ||
|
||
include $(CFG_SHARED)/nps_common.makefile | ||
nps.srcs += $(NPSDIR)/nps_main_sitl.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
|
||
# | ||
# NPS Simulator | ||
# | ||
# Common makefile for both SITL/HITL simulation | ||
# | ||
# still needs a FDM backend to be specified, e.g. | ||
# <subsystem name="fdm" type="jsbsim"/> | ||
# | ||
|
||
nps.ARCHDIR = sim | ||
|
||
nps.CFLAGS += -DSITL -DUSE_NPS | ||
nps.LDFLAGS += -lm -livy $(shell pcre-config --libs) -lgsl -lgslcblas | ||
|
||
# detect system arch and include rt and pthread library only on linux | ||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Linux) | ||
nps.LDFLAGS += -lrt -pthread | ||
endif | ||
|
||
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps | ||
|
||
# sdl needed for joystick input | ||
nps.LDFLAGS += $(shell sdl-config --libs) | ||
|
||
# glib is still needed for some components (such as radio input) | ||
nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags) | ||
nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) | ||
|
||
# | ||
# add the simulator directory to the make searchpath | ||
# | ||
VPATH += $(PAPARAZZI_SRC)/sw/simulator | ||
|
||
NPSDIR = nps | ||
nps.srcs += \ | ||
$(NPSDIR)/nps_random.c \ | ||
$(NPSDIR)/nps_sensors.c \ | ||
$(NPSDIR)/nps_sensors_utils.c \ | ||
$(NPSDIR)/nps_sensor_gyro.c \ | ||
$(NPSDIR)/nps_sensor_accel.c \ | ||
$(NPSDIR)/nps_sensor_mag.c \ | ||
$(NPSDIR)/nps_sensor_baro.c \ | ||
$(NPSDIR)/nps_sensor_sonar.c \ | ||
$(NPSDIR)/nps_sensor_gps.c \ | ||
$(NPSDIR)/nps_sensor_airspeed.c \ | ||
$(NPSDIR)/nps_sensor_temperature.c \ | ||
$(NPSDIR)/nps_sensor_aoa.c \ | ||
$(NPSDIR)/nps_sensor_sideslip.c \ | ||
$(NPSDIR)/nps_electrical.c \ | ||
$(NPSDIR)/nps_atmosphere.c \ | ||
$(NPSDIR)/nps_ivy.c \ | ||
$(NPSDIR)/nps_flightgear.c \ | ||
$(NPSDIR)/nps_radio_control.c \ | ||
$(NPSDIR)/nps_radio_control_joystick.c \ | ||
$(NPSDIR)/nps_radio_control_spektrum.c \ | ||
$(NPSDIR)/nps_main_common.c | ||
|
||
# for geo mag calculation | ||
nps.srcs += math/pprz_geodetic_wmm2015.c | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.