diff --git a/.gitignore b/.gitignore index d5bba5a95a..da442c20b7 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ /sw/ground_segment/cockpit/gtk_save_settings.ml /sw/ground_segment/cockpit/gtk_setting_time.ml /sw/ground_segment/cockpit/gcs +/sw/ground_segment/cockpit/gcs.opt /sw/ground_segment/cockpit/gtk_strip.ml /sw/ground_segment/cockpit/ant_track /sw/ground_segment/cockpit/compass @@ -80,6 +81,7 @@ /sw/ground_segment/tmtc/dia /sw/ground_segment/tmtc/ivy2udp /sw/ground_segment/tmtc/server +/sw/ground_segment/tmtc/server.opt /sw/ground_segment/tmtc/diadec /sw/ground_segment/tmtc/ivy_serial_bridge /sw/ground_segment/tmtc/GSM/SMS_GS diff --git a/CHANGELOG.md b/CHANGELOG.md index 97e05bc455..59d90f1ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,86 @@ -Paparazzi 4.9 - development branch -================================== +Paparazzi 5.0.0_stable +====================== + +Stable version release + +General +------- - STM libs completely replaced by libopencm3 +- [gcc-arm-embedded] (https://launchpad.net/gcc-arm-embedded) is the new recommended toolchain +- Use findlib (ocamlfind) for ocaml packages. Faster build. + [#274] (https://github.com/paparazzi/paparazzi/pull/274) +- Building/Running the groundsegment on an ARM (e.g. RaspberryPi). - Input2ivy uses SDL for joysticks (cross-platform, works on OSX as well now) [#220] (https://github.com/paparazzi/paparazzi/pull/220) - Option to change text papget color using a combobox [#194] (https://github.com/paparazzi/paparazzi/pull/194) +- Redundant communications + [#429] (https://github.com/paparazzi/paparazzi/pull/429) +- Log also contains includes like procedures now, so replay if these missions is possible. + [#227] (https://github.com/paparazzi/paparazzi/issues/227) +- Paparazzi Center + - New simulation launcher with dialog and detection of available ones. + [#354] (https://github.com/paparazzi/paparazzi/pull/354) + - Checkbox to print extra configuration information during build. +- GCS: + - Fix panning with mouse if there are no background tiles. + [#9] (https://github.com/paparazzi/paparazzi/issues/9) + - Higher zoom level for maps. + [#277] (https://github.com/paparazzi/paparazzi/issues/277) + +Hardware support +---------------- + +- initial support for STM32F4 + - Apogee autopilot + - KroozSD autopilot +- Parrot AR Drone 2 support: raw and sdk versions +- CH Robotics UM6 IMU/AHRS +- GPS/INS XSens Mti-G support +- GPS Sirf support +- GPS Skytraq now usable for fixedwings as well + [#167] (https://github.com/paparazzi/paparazzi/issues/167) +- Mikrokopter V2 BLDC + [#377] (https://github.com/paparazzi/paparazzi/pull/377) +- PX4Flow sensor + [#379] (https://github.com/paparazzi/paparazzi/pull/379) +- Dropped AVR support + +Airborne +-------- + +- State interface with automatic coordinate transformations + [#237] (https://github.com/paparazzi/paparazzi/pull/237) +- New AHRS filter: Multiplicative quaternion linearized Kalman Filter +- New SPI driver with transaction queues. + - Fix transactions with zero length input. + [#348] (https://github.com/paparazzi/paparazzi/issues/348) +- Peripherals: Cleanup and refactoring. + - MPU60x0 peripheral supporting SPI and I2C with slave. +- UDP datalink. +- Magnetometer current offset calibration. + [#346] (https://github.com/paparazzi/paparazzi/pull/346) +- Gain scheduling module. + [#335] (https://github.com/paparazzi/paparazzi/pull/335) + +Rotorcraft firmware specific +---------------------------- + +- Quadshot transitioning vehicle support. +- Care Free Mode + + +Paparazzi 4.2.1_stable +====================== + +Maintenance release + +- fix elf PT_LOAD type in lpc21iap LPC USB download +- fix electrical.current estimate in sim +- fix LPC+xbee_api in rotorcraft +- fix conversion of vsupply to decivolts if offset is used +- more robust dfu flash script, only upload to Lisa/M Paparazzi 4.2.0_stable diff --git a/Makefile b/Makefile index 398ae45943..39e02ab114 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ PAPARAZZI_SRC=$(shell pwd) empty= space=$(empty) $(empty) ifneq ($(findstring $(space),$(PAPARAZZI_SRC)),) - $(error No fucking spaces allowed in the current directory name) + $(error No spaces allowed in the current directory name) endif ifeq ($(PAPARAZZI_HOME),) PAPARAZZI_HOME=$(PAPARAZZI_SRC) @@ -118,6 +118,7 @@ conf/%.xml :conf/%.xml.example ground_segment: print_build_version update_google_version conf libpprz subdirs commands static +ground_segment.opt: ground_segment cockpit.opt tmtc.opt static: cockpit tmtc tools sim_static joystick static_h @@ -130,9 +131,15 @@ multimon: cockpit: libpprz $(MAKE) -C $(COCKPIT) +cockpit.opt: libpprz + $(MAKE) -C $(COCKPIT) opt + tmtc: libpprz cockpit multimon $(MAKE) -C $(TMTC) +tmtc.opt: libpprz cockpit.opt multimon + $(MAKE) -C $(TMTC) opt + tools: libpprz $(MAKE) -C $(TOOLS) @@ -289,8 +296,8 @@ run_tests: test: all replace_current_conf_xml run_tests restore_conf_xml -.PHONY: all print_build_version update_google_version ground_segment \ -subdirs $(SUBDIRS) conf ext libpprz multimon cockpit tmtc tools\ +.PHONY: all print_build_version update_google_version ground_segment ground_segment.opt \ +subdirs $(SUBDIRS) conf ext libpprz multimon cockpit cockpit.opt tmtc tmtc.opt tools\ static sim_static lpctools commands \ clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \ test replace_current_conf_xml run_tests restore_conf_xml diff --git a/conf/Makefile.arm-common b/conf/Makefile.arm-common index bced43ce9c..9059041e76 100644 --- a/conf/Makefile.arm-common +++ b/conf/Makefile.arm-common @@ -23,8 +23,6 @@ # This is the common Makefile for finding the arm compiler and OpenOcd # -include $(PAPARAZZI_SRC)/conf/Makefile.arm-toolchain - # # some generic and informative targets # @@ -40,51 +38,6 @@ printcommands: @$(CC) --version | head -1 @echo "" -# Display size of file. -HEXSIZE = $(SIZE) --target=$(FORMAT) $(OBJDIR)/$(TARGET).hex -ELFSIZE = $(SIZE) -A -x $(OBJDIR)/$(TARGET).elf -sizebefore: - @if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Previous size:"; $(ELFSIZE); fi -sizeafter: - @if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Current size:"; $(ELFSIZE); fi +.PHONY : printcommands -# Target: clean project. -clean: clean_list - -clean_list : - @echo - $(RM) $(OBJDIR)/$(TARGET).hex - $(RM) $(OBJDIR)/$(TARGET).obj - $(RM) $(OBJDIR)/$(TARGET).elf - $(RM) $(OBJDIR)/$(TARGET).map - $(RM) $(OBJDIR)/$(TARGET).obj - $(RM) $(OBJDIR)/$(TARGET).a90 - $(RM) $(OBJDIR)/$(TARGET).sym - $(RM) $(OBJDIR)/$(TARGET).lnk - $(RM) $(OBJDIR)/$(TARGET).lss - $(RM) $(COBJ) - $(RM) $(AOBJ) - $(RM) $(COBJARM) - $(RM) $(AOBJARM) - $(RM) $(LST) - $(RM) $(SRC:.c=.s) - $(RM) $(SRC:.c=.d) - $(RM) $(SRCARM:.c=.s) - $(RM) $(SRCARM:.c=.d) - $(RM) .dep/* - $(RM) *~ - -.PHONY : printcommands sizebefore sizeafter clean clean_list - -# -# Find OpenOCD -# -# first try in the path -OOCD = $(shell which openocd) -#if OpenOCD could not be found in the path, try the toolchain dir (for backwards compatibility) -ifeq ($(OOCD),) -ifneq ($(TOOLCHAIN),) -OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_DIR)/bin/openocd ; else echo "Warning: OpenOCD not found"; fi) -endif -endif diff --git a/conf/Makefile.arm-embedded b/conf/Makefile.arm-embedded new file mode 100644 index 0000000000..d66abd01db --- /dev/null +++ b/conf/Makefile.arm-embedded @@ -0,0 +1,61 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Copyright (C) 2012 Felix Ruess + + +# +# This is the common Makefile for finding the arm compiler and OpenOcd +# for bare metal systems like on the ARM7TDMI, cortex M3/4 + +# include the common ARM makefiles to print the commands and find the toolchain +include $(PAPARAZZI_SRC)/conf/Makefile.arm-common +include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain + +# Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) $(OBJDIR)/$(TARGET).hex +ELFSIZE = $(SIZE) -A -x $(OBJDIR)/$(TARGET).elf +sizebefore: + @if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Previous size:"; $(ELFSIZE); fi + +sizeafter: + @if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Current size:"; $(ELFSIZE); fi + +# Target: clean project. +clean: clean_list + +clean_list : + @echo + $(RM) $(OBJDIR)/$(TARGET).hex + $(RM) $(OBJDIR)/$(TARGET).obj + $(RM) $(OBJDIR)/$(TARGET).elf + $(RM) $(OBJDIR)/$(TARGET).map + $(RM) $(OBJDIR)/$(TARGET).obj + $(RM) $(OBJDIR)/$(TARGET).a90 + $(RM) $(OBJDIR)/$(TARGET).sym + $(RM) $(OBJDIR)/$(TARGET).lnk + $(RM) $(OBJDIR)/$(TARGET).lss + $(RM) $(COBJ) + $(RM) $(AOBJ) + $(RM) $(COBJARM) + $(RM) $(AOBJARM) + $(RM) $(LST) + $(RM) $(SRC:.c=.s) + $(RM) $(SRC:.c=.d) + $(RM) $(SRCARM:.c=.s) + $(RM) $(SRCARM:.c=.d) + $(RM) .dep/* + $(RM) *~ + +.PHONY : sizebefore sizeafter clean clean_list + +# +# Find OpenOCD +# +# first try in the path +OOCD = $(shell which openocd) +#if OpenOCD could not be found in the path, try the toolchain dir (for backwards compatibility) +ifeq ($(OOCD),) +ifneq ($(TOOLCHAIN),) +OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_DIR)/bin/openocd ; else echo "Warning: OpenOCD not found"; fi) +endif +endif diff --git a/conf/Makefile.arm-toolchain b/conf/Makefile.arm-embedded-toolchain similarity index 87% rename from conf/Makefile.arm-toolchain rename to conf/Makefile.arm-embedded-toolchain index 91fe17aa3f..7a9b0f2cc2 100644 --- a/conf/Makefile.arm-toolchain +++ b/conf/Makefile.arm-embedded-toolchain @@ -1,8 +1,11 @@ # Hey Emacs, this is a -*- makefile -*- +# +# Copyright (C) 2012 Felix Ruess + # -# This is the common Makefile for finding the arm compiler -# +# This is the common Makefile for finding the arm compiler and OpenOcd +# for bare metal systems like on the ARM7TDMI, cortex M3/4 # # try to pick up the compiler from the path diff --git a/conf/Makefile.arm-linux b/conf/Makefile.arm-linux new file mode 100644 index 0000000000..c5994d10c0 --- /dev/null +++ b/conf/Makefile.arm-linux @@ -0,0 +1,59 @@ +# Hey Emacs, this is a -*- makefile -*- + +# +# Copyright (C) 2012 - TU Delft Robotics Minor - Dino Hensen and Freek van Tienen +# +# Minimal makefile for arm-linux-gnueabi or arm-none-linux-gnueabi toolchain. +# Assuming installed in default location. + + +# +# try to pick up the compiler from the path +# +CC = $(shell which arm-linux-gnueabi-gcc) +LD = $(shell which arm-linux-gnueabi-gcc) +AR = $(shell which arm-linux-gnueabi-ar) +CP = $(shell which arm-linux-gnueabi-objcopy) +DMP = $(shell which arm-linux-gnueabi-objdump) +NM = $(shell which arm-linux-gnueabi-nm) +SIZE = $(shell which arm-linux-gnueabi-size) +GDB = $(shell which arm-linux-gnueabi-gdb) +TOOLCHAIN_DIR=$(shell dirname `which arm-linux-gnueabi`) +GCC_LIB_DIR=$(TOOLCHAIN_DIR)/../arm-linux-gnueabi/lib + +# if the above toolchain is used add the include folder +CFLAGS += -I/usr/arm-linux-gnueabi/include + +# +# if not found in path, try the codesourcery toolchain in /usr/local/codesourcery +# +ifeq ($(CC),) +TOOLCHAIN=$(shell find -L /usr/local/codesourcery -maxdepth 2 -type d -name arm-none-linux-gnueabi 2>/dev/null | head -n 1) +ifneq ($(TOOLCHAIN),) +TOOLCHAIN_DIR=$(shell dirname $(TOOLCHAIN)) +GCC_BIN_DIR=$(TOOLCHAIN_DIR)/bin +GCC_LIB_DIR=$(TOOLCHAIN_DIR)/arm-none-linux-gnueabi/lib + +# Define programs and commands. +GCC_BIN_PREFIX=$(GCC_BIN_DIR)/arm-none-linux-gnueabi +CC = $(GCC_BIN_PREFIX)-gcc +LD = $(GCC_BIN_PREFIX)-gcc +AR = $(GCC_BIN_PREFIX)-ar +CP = $(GCC_BIN_PREFIX)-objcopy +DMP = $(GCC_BIN_PREFIX)-objdump +NM = $(GCC_BIN_PREFIX)-nm +SIZE = $(GCC_BIN_PREFIX)-size +GDB = $(GCC_BIN_PREFIX)-gdb +else +# toolchain not found... +endif +endif + +# checking if gcc has thumb2 instruction +MULTILIB = $(shell if $(CC) --print-multi-lib | grep thumb2 > /dev/null ; then echo "yes"; else echo "no"; fi) + +# some general commands +RM = rm + + +include $(PAPARAZZI_SRC)/conf/Makefile.arm-common diff --git a/conf/Makefile.lpc21 b/conf/Makefile.lpc21 index 1b7572a066..b2fb117e9d 100644 --- a/conf/Makefile.lpc21 +++ b/conf/Makefile.lpc21 @@ -37,7 +37,7 @@ Q=@ # # find compiler toolchain # -include $(PAPARAZZI_SRC)/conf/Makefile.arm-common +include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded # # if the new arm-none-eabi multilib compiler was not found try the old arm-elf one diff --git a/conf/Makefile.omap b/conf/Makefile.omap index 64bd69e55a..f53a726bc0 100644 --- a/conf/Makefile.omap +++ b/conf/Makefile.omap @@ -1,6 +1,6 @@ # Hey Emacs, this is a -*- makefile -*- # -# Copyright (C) 2009-2010 The Paparazzi Team +# Copyright (C) 2009-2013 The Paparazzi Team # # This file is part of paparazzi. # @@ -20,22 +20,14 @@ # Boston, MA 02111-1307, USA. # + +# +# find compiler toolchain +# +include $(PAPARAZZI_SRC)/conf/Makefile.arm-linux + # Define programs and commands. -# Look for an open embedded directory -OVERO_OE := $(shell find -L /opt/paparazzi/omap ~ / -maxdepth 1 -type d -name overo-oe 2>/dev/null | head -n 1) - -# Multiple places to look for compiler within oe directory structure -CC_NAME = arm-angstrom-linux-gnueabi-gcc -CCPATH1 = $(OVERO_OE)/tmp/cross/armv7a/bin -CCPATH2 = $(OVERO_OE)/tmp/sysroots/i686-linux/usr/armv7a/bin -CCPATH3 = $(OVERO_OE)/tmp/sysroots/x86_64-linux/usr/armv7a/bin -CC := $(shell find -L $(CCPATH1) $(CCPATH2) $(CCPATH3) -name $(CC_NAME) -type f 2>/dev/null | head -n 1) -LD = $(CC) - -GLIB_INC = $(OVERO_OE)/tmp/work/armv7a-angstrom-linux-gnueabi/glib-2.0-2.22.4-r1/staging-pkg/staging/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0 -GLIB_LIB = $(OVERO_OE)/tmp/work/armv7a-angstrom-linux-gnueabi/glib-2.0-2.22.4-r1/staging-pkg/staging/armv7a-angstrom-linux-gnueabi/usr/lib/ - # Launch with "make Q=''" to get full command display Q=@ @@ -46,28 +38,31 @@ CINCS = $(INCLUDES) -I$(PAPARAZZI_SRC)/sw/include # Compiler flags. CFLAGS += $(CINCS) CFLAGS += -O$(OPT) -mfloat-abi=softfp -mtune=cortex-a8 -mfpu=vfp -march=armv7-a +CFLAGS += -fno-short-enums # CFLAGS += -malignment-traps CFLAGS += -Wall -Wcast-qual -Wimplicit -Wcast-align CFLAGS += -Wpointer-arith -Wswitch -CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused +CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused +#-Wno-unused-result #CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<)) #CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +CFLAGS += -lm + # flags only for C -CFLAGS + = -Wstrict-prototypes -Wmissing-declarations +CFLAGS += -Wstrict-prototypes -Wmissing-declarations CFLAGS += -Wmissing-prototypes -Wnested-externs CFLAGS += $(CSTANDARD) CFLAGS += $($(TARGET).CFLAGS) +LDFLAGS += -lm -CXX = /opt/paparazzi/omap/overo-oe/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++ CXXFLAGS = -pipe -O3 -fshow-column -ffast-math -fPIC CXXFLAGS += -g -ffunction-sections -fdata-sections CXXFLAGS += -mfloat-abi=softfp -mtune=cortex-a8 -mfpu=vfp -march=armv7-a CXXFLAGS += -Wall -Wextra CXXFLAGS += $($(TARGET).CXXFLAGS) - SRC_C_OMAP = $($(TARGET).srcs) OBJ_C_OMAP = $(SRC_C_OMAP:%.c=$(OBJDIR)/%.o) @@ -80,9 +75,38 @@ build: elf elf: $(OBJDIR)/$(TARGET).elf -# Program the device. +# Program the device and start it. load upload program: $(OBJDIR)/$(TARGET).elf - scp $(OBJDIR)/$(TARGET).elf $(USER)@$(HOST):$(TARGET_DIR) + +# If it is not the SDK version, then kill program.elf +ifneq ($(BOARD_TYPE), sdk) + -echo "killall -9 program.elf" | telnet $(HOST) +endif + + # Kill the application + -echo "killall -9 $(TARGET).elf" | telnet $(HOST) + + # Upload the modules and start the application + -{ \ + echo "mkdir -p $(TARGET_DIR)"; \ + } | telnet $(HOST) + + # Upload the drivers and new application + { \ + echo "binary"; \ + echo "put $(PAPARAZZI_SRC)/sw/ext/ardrone2_drivers/cdc-acm.ko /$(SUB_DIR)/cdc-acm.ko"; \ + echo "put $(OBJDIR)/$(TARGET).elf /$(SUB_DIR)/$(TARGET).elf"; \ + echo "quit"; \ + } | ftp -n $(HOST) + + # Upload the modules and start the application + -{ \ + echo "cd $(TARGET_DIR)"; \ + echo "insmod cdc-acm.ko"; \ + echo "chmod 777 $(TARGET).elf"; \ + echo "./$(TARGET).elf > /dev/null 2>&1 &"; \ + } | telnet $(HOST) + # Link: create ELF output file from object files. .SECONDARY : $(OBJDIR)/$(TARGET).elf @@ -118,5 +142,7 @@ $(OBJDIR)/.depend: $(Q)$(CC) -MM -MG $(CFLAGS) $($(TARGET).CFLAGS) $($(TARGET).srcs) | sed 's|\([^\.]*\.o\)|$(OBJDIR)/\1|' > $@ ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),erase) -include $(OBJDIR)/.depend endif +endif diff --git a/conf/Makefile.sim b/conf/Makefile.sim index 6e892e09e3..40657cc54b 100644 --- a/conf/Makefile.sim +++ b/conf/Makefile.sim @@ -45,26 +45,35 @@ Q=@ # End of configuration part. # -LBITS := $(shell getconf LONG_BIT) -ifeq ($(LBITS),64) - FPIC = -fPIC -else - FPIC = -endif - -INCLUDES += -I `ocamlc -where` +INCLUDES += -I $(shell $(OCAMLC) -where) CFLAGS = -W -Wall CFLAGS += $(INCLUDES) CFLAGS += $($(TARGET).CFLAGS) CFLAGS += $(LOCAL_CFLAGS) -CFLAGS += $(FPIC) +CFLAGS += -fPIC CFLAGS += -O2 CFLAGS += -g CFLAGS += -std=gnu99 LDFLAGS = -lm +# build sim in custom mode for Darwin and ARM systems for now... +UNAME = $(shell uname -s) +ifeq ($(UNAME),Darwin) +SIMSITLCUSTOM=TRUE +endif + +MNAME = $(shell uname -m) +ifneq (,$(findstring arm,$(MNAME))) +SIMSITLCUSTOM=TRUE +endif + +ifdef SIMSITLCUSTOM + CAMLINCLUDES += $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format glibivy) + CAMLCMAS = unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma +endif + # # General rules @@ -81,9 +90,15 @@ autopilot.so : $($(TARGET).objs) @echo BUILD $@ $(Q)$(CC) -shared -o $(OBJDIR)/$@ $^ +ifdef SIMSITLCUSTOM +$(OBJDIR)/simsitl : $($(TARGET).objs) $(SITLCMA) $(SIMSITLML) + @echo LD $@ + $(Q)$(OCAMLC) -g -custom $(CAMLINCLUDES) -o $@ $(CAMLCMAS) $(MYGTKINITCMO) $^ +else $(OBJDIR)/simsitl : autopilot.so $(SITLCMA) $(SIMSITLML) @echo LD $@ $(Q)$(OCAMLC) -g $(CAMLINCLUDES) -o $@ $(LINKPKG) $(MYGTKINITCMO) $^ -dllpath $(OBJDIR) -dllpath $(SIMDIR) +endif # The id of the A/C is hardcoded in the code (to be improved with dynlink ?) diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index dbaa295925..8aaaeddef4 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -34,10 +34,14 @@ Q=@ # # find compiler toolchain # -include $(PAPARAZZI_SRC)/conf/Makefile.arm-common +include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded +ifeq ($(ARCH_L),f4) +MCU = cortex-m4 +else MCU = cortex-m3 +endif #DEBUG = dwarf-2 OPT = s #OPT = 2 @@ -98,7 +102,17 @@ $(info Using "$($(TARGET).LDSCRIPT)" as ldscript for target "$(TARGET)".) endif endif -CFLAGS = -I. -I./$(ARCH) -I../ext/libopencm3/include $(INCLUDES) -D__thumb2__ -msoft-float -O$(OPT) +CFLAGS = -I. -I./$(ARCH) -I../ext/libopencm3/include $(INCLUDES) +CFLAGS += -D__thumb2__ -Wall -O$(OPT) +ifeq ($(ARCH_L), ) +CFLAGS += -msoft-float +else ifeq ($(ARCH_L),f4) +ifndef HARD_FLOAT +CFLAGS += -msoft-float +else +CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 +endif +endif CFLAGS += -Wl,--gc-sections CFLAGS += -mfix-cortex-m3-ldrd CFLAGS += -mcpu=$(MCU) -mthumb -ansi @@ -107,33 +121,51 @@ CFLAGS += -std=gnu99 CFLAGS += -fno-common CFLAGS += -g$(DEBUG) CFLAGS += -ffunction-sections -fdata-sections - -# flags for warnings -CFLAGS += -Wall -Wextra CFLAGS += -Wimplicit CFLAGS += -Wcast-align CFLAGS += -Wpointer-arith -Wswitch CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused +CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<)) CFLAGS += -Wnested-externs CFLAGS += -Wmissing-prototypes CFLAGS += -Wstrict-prototypes CFLAGS += -Wmissing-declarations CFLAGS += -Wswitch-default - -CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<)) +ifneq ($(ARCH_L), ) +ifeq ($(ARCH_L),f4) +CFLAGS += -DSTM32F4 +endif +else CFLAGS += -DSTM32F1 +endif CFLAGS += $($(TARGET).CFLAGS) -AFLAGS = -ahls +AFLAGS = -ahls -mapcs-32 AFLAGS += -mcpu=$(MCU) -mthumb AFLAGS += -x assembler-with-cpp -Wa,-adhlns=$(OBJDIR)/$(<:.S=.lst),--g$(DEBUG) -LDFLAGS = -L../ext/libopencm3/lib -LDFLAGS += -T$(LDSCRIPT) -nostartfiles -O$(OPT) -LDFLAGS += -mthumb -mcpu=$(MCU) -msoft-float -mfix-cortex-m3-ldrd +LDFLAGS += -L../ext/libopencm3/lib +LDFLAGS += -T$(LDSCRIPT) -nostartfiles -O$(OPT) -mthumb -mcpu=$(MCU) + +ifeq ($(ARCH_L), ) +LDFLAGS += -mfix-cortex-m3-ldrd -msoft-float +else ifeq ($(ARCH_L),f4) +ifndef HARD_FLOAT +LDFLAGS += -mfix-cortex-m3-ldrd -msoft-float +else +LDFLAGS += -lnosys -D__thumb2__\ + -mfloat-abi=hard -mfpu=fpv4-sp-d16 +endif +endif + LDFLAGS += -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref,--gc-sections -LDLIBS += -lc -lm -lgcc -lopencm3_stm32f1 +ifneq ($(ARCH_L), ) +LDLIBS += -lopencm3_stm32$(ARCH_L) +else +LDLIBS += -lopencm3_stm32f1 +endif +LDLIBS += -lc -lm -lgcc CPFLAGS = -j .isr_vector -j .text -j .data CPFLAGS_BIN = -Obinary @@ -199,11 +231,27 @@ $(AOBJ) : $(OBJDIR)/%.o : %.S # check which flash mode is configured # ifeq ($(FLASH_MODE),DFU) +ifeq ($(DFU_UTIL),y) # -# DFU flash mode +# DFU flash mode using dfu-util +DFU_ADDR ?= 0x08000000 +upload: $(OBJDIR)/$(TARGET).bin + @echo "Using dfu-util at $(DFU_ADDR)" + $(Q)dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s $(DFU_ADDR) -D $^ +else +# +# DFU flash mode paparazzi stm32_mem +ifdef DFU_ADDR +DFU_ADDR_CMD = --addr=$(DFU_ADDR) +endif +ifdef DFU_PRODUCT +DFU_PRODUCT_CMD = --product=$(DFU_PRODUCT) +endif upload: $(OBJDIR)/$(TARGET).bin @echo "Using stm32 mem dfu loader" - $(PYTHON) $(PAPARAZZI_SRC)/sw/tools/dfu/stm32_mem.py $^ + $(PYTHON) $(PAPARAZZI_SRC)/sw/tools/dfu/stm32_mem.py $(DFU_PRODUCT_CMD) $(DFU_ADDR_CMD) $^ +endif + # # serial flash mode else ifeq ($(FLASH_MODE),SERIAL) @@ -246,6 +294,12 @@ endif # SWD flash mode else ifeq ($(FLASH_MODE),SWD) # only works if BMP_PORT is defined +ifeq ($(STLINK),y) +STLINK_ADDR ?= 0x08000000 +upload: $(OBJDIR)/$(TARGET).bin + @echo "Using ST-LINK with SWD at $(STLINK_ADDR)" + $(Q)st-flash write $^ $(STLINK_ADDR) +else BMP_PORT ?= /dev/ttyACM0 BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/sw/tools/flash_scripts/bmp_swd_flash.scr upload: $(OBJDIR)/$(TARGET).elf @@ -257,6 +311,7 @@ upload: $(OBJDIR)/$(TARGET).elf -ex 'target extended-remote $(BMP_PORT)' \ -x $(BMP_UPLOAD_SCRIPT) \ $< +endif # # no known flash mode else diff --git a/conf/airframes/CDW/DualBoardApFbw.xml b/conf/airframes/CDW/DualBoardApFbw.xml index d04473b19e..8a6369ae3c 100644 --- a/conf/airframes/CDW/DualBoardApFbw.xml +++ b/conf/airframes/CDW/DualBoardApFbw.xml @@ -123,9 +123,9 @@
- - - + + +
diff --git a/conf/airframes/CDW/asctec_cdw.xml b/conf/airframes/CDW/asctec_cdw.xml new file mode 100644 index 0000000000..300eb6eb11 --- /dev/null +++ b/conf/airframes/CDW/asctec_cdw.xml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + +
+ +
+ + + +
+ + + + + +
+ + +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
diff --git a/conf/airframes/CDW/tricopter_cdw.xml b/conf/airframes/CDW/tricopter_cdw.xml new file mode 100644 index 0000000000..00d9368d88 --- /dev/null +++ b/conf/airframes/CDW/tricopter_cdw.xml @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + +
+ + + +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ + + +
+ +
diff --git a/conf/airframes/ENAC/fixed-wing/apogee.xml b/conf/airframes/ENAC/fixed-wing/apogee.xml new file mode 100644 index 0000000000..5c62d51f53 --- /dev/null +++ b/conf/airframes/ENAC/fixed-wing/apogee.xml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + +
+ +
+ + + + + + +
+ +
diff --git a/conf/airframes/ENAC/fixed-wing/eternity1.xml b/conf/airframes/ENAC/fixed-wing/eternity1.xml index 6a9595967d..06bd7fc9d1 100644 --- a/conf/airframes/ENAC/fixed-wing/eternity1.xml +++ b/conf/airframes/ENAC/fixed-wing/eternity1.xml @@ -26,9 +26,7 @@ - - - + diff --git a/conf/airframes/ENAC/fixed-wing/firestorm.xml b/conf/airframes/ENAC/fixed-wing/firestorm.xml index 584e3fb3a9..222712c259 100644 --- a/conf/airframes/ENAC/fixed-wing/firestorm.xml +++ b/conf/airframes/ENAC/fixed-wing/firestorm.xml @@ -32,9 +32,7 @@ - - - + diff --git a/conf/airframes/ENAC/fixed-wing/funjet2.xml b/conf/airframes/ENAC/fixed-wing/funjet2.xml index bd474733af..56455152a5 100644 --- a/conf/airframes/ENAC/fixed-wing/funjet2.xml +++ b/conf/airframes/ENAC/fixed-wing/funjet2.xml @@ -39,9 +39,7 @@ - - - + diff --git a/conf/airframes/ENAC/fixed-wing/mythe.xml b/conf/airframes/ENAC/fixed-wing/mythe.xml index fb04ac94e3..f6c226b11b 100644 --- a/conf/airframes/ENAC/fixed-wing/mythe.xml +++ b/conf/airframes/ENAC/fixed-wing/mythe.xml @@ -66,9 +66,7 @@ - - - + @@ -157,8 +155,8 @@
- - + +
diff --git a/conf/airframes/ENAC/fixed-wing/quark1.xml b/conf/airframes/ENAC/fixed-wing/quark1.xml new file mode 100644 index 0000000000..10dfc81fe2 --- /dev/null +++ b/conf/airframes/ENAC/fixed-wing/quark1.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + +
+ +
+ + + +
+ +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
diff --git a/conf/airframes/ENAC/fixed-wing/weasel.xml b/conf/airframes/ENAC/fixed-wing/weasel.xml index 744c25880c..f15a4b5c41 100644 --- a/conf/airframes/ENAC/fixed-wing/weasel.xml +++ b/conf/airframes/ENAC/fixed-wing/weasel.xml @@ -20,26 +20,27 @@ - + - - - + - + + + + + + - - - - + + @@ -49,17 +50,11 @@ - - - - - - - - + + @@ -83,13 +78,13 @@ - - + +
- - + +
@@ -123,8 +118,8 @@
- - + +
@@ -161,15 +156,15 @@ - - - + + + - - - + + + @@ -206,8 +201,8 @@ - - + + @@ -234,7 +229,7 @@ - +
diff --git a/conf/airframes/ENAC/quadrotor/blender.xml b/conf/airframes/ENAC/quadrotor/blender.xml index b5efec74a6..2dce3cc671 100644 --- a/conf/airframes/ENAC/quadrotor/blender.xml +++ b/conf/airframes/ENAC/quadrotor/blender.xml @@ -37,7 +37,7 @@ - + @@ -133,7 +133,6 @@
- diff --git a/conf/airframes/ENAC/quadrotor/booz2_g1.xml b/conf/airframes/ENAC/quadrotor/booz2_g1.xml index 0604b4a152..ae5f73a8eb 100644 --- a/conf/airframes/ENAC/quadrotor/booz2_g1.xml +++ b/conf/airframes/ENAC/quadrotor/booz2_g1.xml @@ -47,7 +47,7 @@ - + @@ -102,13 +102,13 @@ - - - + + + - - - + + + @@ -206,13 +206,14 @@
+ - - + + - +
diff --git a/conf/airframes/ENAC/quadrotor/hen1.xml b/conf/airframes/ENAC/quadrotor/hen1.xml index 78b81b8e0b..2c0bdb49ae 100644 --- a/conf/airframes/ENAC/quadrotor/hen1.xml +++ b/conf/airframes/ENAC/quadrotor/hen1.xml @@ -3,11 +3,11 @@ - + @@ -23,23 +23,23 @@ - + - + - + - - - - - + + + +
@@ -48,9 +48,9 @@ - - - + + +
@@ -62,25 +62,25 @@ - - - - + + + + - - - + + + - - - - + + + +
@@ -110,9 +110,9 @@ - + - +
@@ -146,76 +146,77 @@
- - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - +
-
+
- - - - - - - - - - - - + + + + + + + + + + + + - + - +
+ - - - + + + @@ -227,9 +228,8 @@
- - - + +
diff --git a/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_rc.xml b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_rc.xml index 557d03acb9..87f9e38388 100644 --- a/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_rc.xml +++ b/conf/airframes/TestHardware/LisaL_v1.1_aspirin_v1.5_rc.xml @@ -30,7 +30,7 @@ - + diff --git a/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml index bdafdab212..f9d1c22a70 100644 --- a/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml +++ b/conf/airframes/TestHardware/LisaL_v1.1_b2_v1.2_rc.xml @@ -30,7 +30,7 @@ - + diff --git a/conf/airframes/ardrone2_raw.xml b/conf/airframes/ardrone2_raw.xml new file mode 100644 index 0000000000..0b6eb33d18 --- /dev/null +++ b/conf/airframes/ardrone2_raw.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + + + +
+ +
diff --git a/conf/airframes/ardrone2_sdk.xml b/conf/airframes/ardrone2_sdk.xml new file mode 100644 index 0000000000..154b0126fb --- /dev/null +++ b/conf/airframes/ardrone2_sdk.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/conf/airframes/booz2_flixr.xml b/conf/airframes/booz2_flixr.xml index 009f4312f1..d7467c3203 100644 --- a/conf/airframes/booz2_flixr.xml +++ b/conf/airframes/booz2_flixr.xml @@ -19,7 +19,7 @@ - + diff --git a/conf/airframes/booz2_ppzuav.xml b/conf/airframes/booz2_ppzuav.xml index 7e7320f043..af532c20f2 100644 --- a/conf/airframes/booz2_ppzuav.xml +++ b/conf/airframes/booz2_ppzuav.xml @@ -204,7 +204,7 @@ - + diff --git a/conf/airframes/esden/calib/asp22-019.xml b/conf/airframes/esden/calib/asp22-019.xml new file mode 100644 index 0000000000..c3eb571d5b --- /dev/null +++ b/conf/airframes/esden/calib/asp22-019.xml @@ -0,0 +1,17 @@ + +
+ + + + + + + + + + + + + +
+
diff --git a/conf/airframes/esden/cocto_lm2a2.xml b/conf/airframes/esden/cocto_lm2a2.xml index e035a7b5c7..6d77ad1dcb 100644 --- a/conf/airframes/esden/cocto_lm2a2.xml +++ b/conf/airframes/esden/cocto_lm2a2.xml @@ -223,12 +223,10 @@ B2L -> CW - - - + + + - - @@ -249,7 +247,7 @@ B2L -> CW - diff --git a/conf/airframes/esden/gain_scheduling_example.xml b/conf/airframes/esden/gain_scheduling_example.xml index a6e726365b..b38357f11f 100644 --- a/conf/airframes/esden/gain_scheduling_example.xml +++ b/conf/airframes/esden/gain_scheduling_example.xml @@ -51,7 +51,7 @@
- +
@@ -65,7 +65,6 @@ -
@@ -186,7 +185,6 @@
-
@@ -210,6 +208,7 @@ + @@ -234,7 +233,7 @@ - diff --git a/conf/airframes/esden/hexy_ll11a2pwm.xml b/conf/airframes/esden/hexy_ll11a2pwm.xml index 6ae1d2b368..55412a313b 100644 --- a/conf/airframes/esden/hexy_ll11a2pwm.xml +++ b/conf/airframes/esden/hexy_ll11a2pwm.xml @@ -215,16 +215,14 @@ - - - - - - - - - - + + + + + + + + @@ -244,7 +242,7 @@ - diff --git a/conf/airframes/esden/hexy_lm2a2pwm.xml b/conf/airframes/esden/hexy_lm2a2pwm.xml index 00cf6e1bcc..53292099a9 100644 --- a/conf/airframes/esden/hexy_lm2a2pwm.xml +++ b/conf/airframes/esden/hexy_lm2a2pwm.xml @@ -178,12 +178,10 @@ - - - + + + - - @@ -205,7 +203,7 @@ - diff --git a/conf/airframes/esden/lisa2_hex.xml b/conf/airframes/esden/lisa2_hex.xml index 41d1d67104..ce6a348d5f 100644 --- a/conf/airframes/esden/lisa2_hex.xml +++ b/conf/airframes/esden/lisa2_hex.xml @@ -195,8 +195,6 @@ - - @@ -220,7 +218,7 @@ - diff --git a/conf/airframes/esden/qs_asp22.xml b/conf/airframes/esden/qs_asp22.xml new file mode 100644 index 0000000000..f47a8715d1 --- /dev/null +++ b/conf/airframes/esden/qs_asp22.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + +
+ + + +
+ +
+ + + + + +
+ +
+ + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + +
+ +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/airframes/esden/quady_ll11a2pwm.xml b/conf/airframes/esden/quady_ll11a2pwm.xml index 368bdb9a9e..876ee4a2c3 100644 --- a/conf/airframes/esden/quady_ll11a2pwm.xml +++ b/conf/airframes/esden/quady_ll11a2pwm.xml @@ -213,12 +213,10 @@ - - - + + + - - @@ -239,7 +237,7 @@ - diff --git a/conf/airframes/esden/quady_lm1a1pwm.xml b/conf/airframes/esden/quady_lm1a1pwm.xml index 3ce579cf50..e94f7008ae 100644 --- a/conf/airframes/esden/quady_lm1a1pwm.xml +++ b/conf/airframes/esden/quady_lm1a1pwm.xml @@ -174,12 +174,10 @@ - - - + + + - - @@ -200,7 +198,7 @@ - diff --git a/conf/airframes/esden/quady_lm2a2pwm.xml b/conf/airframes/esden/quady_lm2a2pwm.xml index 6be1758980..6b8b5da46d 100644 --- a/conf/airframes/esden/quady_lm2a2pwm.xml +++ b/conf/airframes/esden/quady_lm2a2pwm.xml @@ -180,12 +180,10 @@ - - - + + + - - @@ -207,7 +205,7 @@ - diff --git a/conf/airframes/esden/quady_lm2a2pwmppm.xml b/conf/airframes/esden/quady_lm2a2pwmppm.xml index 298bcc8244..f33377fe79 100644 --- a/conf/airframes/esden/quady_lm2a2pwmppm.xml +++ b/conf/airframes/esden/quady_lm2a2pwmppm.xml @@ -178,10 +178,8 @@ - + - - @@ -202,7 +200,7 @@ - diff --git a/conf/airframes/examples/MentorEnergy.xml b/conf/airframes/examples/MentorEnergy.xml index e9ab62887e..9416ac28b8 100644 --- a/conf/airframes/examples/MentorEnergy.xml +++ b/conf/airframes/examples/MentorEnergy.xml @@ -9,7 +9,6 @@ - @@ -27,7 +26,6 @@ - + + @@ -199,7 +201,14 @@ - + + + + + + + + - + @@ -156,7 +156,7 @@ twog_1.0 + aspirin + ETS baro + ETS speed - + @@ -170,8 +170,8 @@ twog_1.0 + aspirin + ETS baro + ETS speed
- - + +
@@ -183,6 +183,7 @@ twog_1.0 + aspirin + ETS baro + ETS speed + diff --git a/conf/airframes/examples/booz2.xml b/conf/airframes/examples/booz2.xml index 36ceee5817..dca8389581 100644 --- a/conf/airframes/examples/booz2.xml +++ b/conf/airframes/examples/booz2.xml @@ -210,7 +210,7 @@ - +
diff --git a/conf/airframes/examples/h_hex.xml b/conf/airframes/examples/h_hex.xml index ca779e54ce..5faaedebe3 100644 --- a/conf/airframes/examples/h_hex.xml +++ b/conf/airframes/examples/h_hex.xml @@ -189,7 +189,7 @@ - + diff --git a/conf/airframes/examples/krooz_sd/fixedwing/krooz_sd_fw.xml b/conf/airframes/examples/krooz_sd/fixedwing/krooz_sd_fw.xml new file mode 100644 index 0000000000..7c0ab8835c --- /dev/null +++ b/conf/airframes/examples/krooz_sd/fixedwing/krooz_sd_fw.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ +
diff --git a/conf/airframes/examples/krooz_sd/krooz_sd_hexa_mkk.xml b/conf/airframes/examples/krooz_sd/krooz_sd_hexa_mkk.xml new file mode 100644 index 0000000000..428fa2fe44 --- /dev/null +++ b/conf/airframes/examples/krooz_sd/krooz_sd_hexa_mkk.xml @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
diff --git a/conf/airframes/examples/krooz_sd/krooz_sd_okto_mkk.xml b/conf/airframes/examples/krooz_sd/krooz_sd_okto_mkk.xml new file mode 100644 index 0000000000..ff2a2c3510 --- /dev/null +++ b/conf/airframes/examples/krooz_sd/krooz_sd_okto_mkk.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
diff --git a/conf/airframes/examples/krooz_sd/krooz_sd_quad_mkk.xml b/conf/airframes/examples/krooz_sd/krooz_sd_quad_mkk.xml new file mode 100644 index 0000000000..9166f503b2 --- /dev/null +++ b/conf/airframes/examples/krooz_sd/krooz_sd_quad_mkk.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
diff --git a/conf/airframes/examples/krooz_sd/krooz_sd_quad_pwm.xml b/conf/airframes/examples/krooz_sd/krooz_sd_quad_pwm.xml new file mode 100644 index 0000000000..df4334d751 --- /dev/null +++ b/conf/airframes/examples/krooz_sd/krooz_sd_quad_pwm.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
diff --git a/conf/airframes/examples/lisa_asctec.xml b/conf/airframes/examples/lisa_asctec.xml index 8b72be5c70..4deef180d9 100644 --- a/conf/airframes/examples/lisa_asctec.xml +++ b/conf/airframes/examples/lisa_asctec.xml @@ -163,6 +163,7 @@ +
@@ -207,7 +208,7 @@ - + diff --git a/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum.xml b/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum.xml index c587c55cb6..8881af6298 100644 --- a/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum.xml +++ b/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum.xml @@ -16,9 +16,7 @@ - - - + @@ -26,9 +24,6 @@ - - - @@ -191,8 +186,8 @@ - - + +
@@ -207,6 +202,8 @@ + +
diff --git a/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum_geo_mag.xml b/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum_geo_mag.xml index 3511bb9772..90932d24e5 100644 --- a/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum_geo_mag.xml +++ b/conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum_geo_mag.xml @@ -16,8 +16,6 @@ - - diff --git a/conf/airframes/examples/quadrotor_lisa_m_mkk.xml b/conf/airframes/examples/quadrotor_lisa_m_mkk.xml index 42fcb6b0d0..4a20c2b893 100644 --- a/conf/airframes/examples/quadrotor_lisa_m_mkk.xml +++ b/conf/airframes/examples/quadrotor_lisa_m_mkk.xml @@ -180,8 +180,8 @@ - - + +
diff --git a/conf/airframes/examples/quadrotor_mlkf.xml b/conf/airframes/examples/quadrotor_mlkf.xml new file mode 100644 index 0000000000..151464b016 --- /dev/null +++ b/conf/airframes/examples/quadrotor_mlkf.xml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ +
+ + + + +
+ +
diff --git a/conf/airframes/examples/quadrotor_navgo.xml b/conf/airframes/examples/quadrotor_navgo.xml index fe108b4d6f..143f5fb701 100644 --- a/conf/airframes/examples/quadrotor_navgo.xml +++ b/conf/airframes/examples/quadrotor_navgo.xml @@ -33,7 +33,7 @@ - + diff --git a/conf/airframes/examples/quadshot_asp21_spektrum.xml b/conf/airframes/examples/quadshot_asp21_spektrum.xml new file mode 100644 index 0000000000..771f4082c8 --- /dev/null +++ b/conf/airframes/examples/quadshot_asp21_spektrum.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + + +
+ +
+ + +
+ +
+ + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + +
+ + + + + + + + + + + + +
+ +
+ + + + +
+ + +
+ + + +
+ +
+ + + + + + + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/airframes/examples/separate_fbw_ap.xml b/conf/airframes/examples/separate_fbw_ap.xml index e4cf762944..be66561fd3 100644 --- a/conf/airframes/examples/separate_fbw_ap.xml +++ b/conf/airframes/examples/separate_fbw_ap.xml @@ -124,9 +124,9 @@
- - - + + +
diff --git a/conf/airframes/examples/stm32f4_discovery_test.xml b/conf/airframes/examples/stm32f4_discovery_test.xml new file mode 100644 index 0000000000..2f10e1c38b --- /dev/null +++ b/conf/airframes/examples/stm32f4_discovery_test.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ +
+ + + + +
+ +
diff --git a/conf/airframes/flixr_discovery.xml b/conf/airframes/flixr_discovery.xml index c19b65dddd..84cc1f6305 100644 --- a/conf/airframes/flixr_discovery.xml +++ b/conf/airframes/flixr_discovery.xml @@ -67,7 +67,7 @@ diff --git a/conf/airframes/fraser_lisa_m_rotorcraft.xml b/conf/airframes/fraser_lisa_m_rotorcraft.xml index a232a41767..d57a70036b 100644 --- a/conf/airframes/fraser_lisa_m_rotorcraft.xml +++ b/conf/airframes/fraser_lisa_m_rotorcraft.xml @@ -8,14 +8,18 @@ - + + + + + + - @@ -28,12 +32,13 @@ - + - + + @@ -64,6 +69,7 @@ + @@ -163,8 +169,8 @@
- - + + @@ -211,19 +217,20 @@ - - + + - + +
- + @@ -233,6 +240,7 @@ +
diff --git a/conf/airframes/obsolete/ENAC/mkk1.xml b/conf/airframes/obsolete/ENAC/mkk1.xml index 9633595152..18a9742bc7 100644 --- a/conf/airframes/obsolete/ENAC/mkk1.xml +++ b/conf/airframes/obsolete/ENAC/mkk1.xml @@ -16,7 +16,7 @@ - + diff --git a/conf/airframes/obsolete/ENAC/nova1.xml b/conf/airframes/obsolete/ENAC/nova1.xml index f3a066a809..0ef106ba39 100644 --- a/conf/airframes/obsolete/ENAC/nova1.xml +++ b/conf/airframes/obsolete/ENAC/nova1.xml @@ -15,7 +15,7 @@ - + diff --git a/conf/airframes/obsolete/Poine/booz2_a1.xml b/conf/airframes/obsolete/Poine/booz2_a1.xml index 269bd6da8d..8d66978f1b 100644 --- a/conf/airframes/obsolete/Poine/booz2_a1.xml +++ b/conf/airframes/obsolete/Poine/booz2_a1.xml @@ -204,7 +204,7 @@ - + diff --git a/conf/airframes/obsolete/Poine/booz2_a7.xml b/conf/airframes/obsolete/Poine/booz2_a7.xml index 905a6d4d2a..59f3bb2082 100644 --- a/conf/airframes/obsolete/Poine/booz2_a7.xml +++ b/conf/airframes/obsolete/Poine/booz2_a7.xml @@ -231,7 +231,7 @@ - + diff --git a/conf/airframes/obsolete/Poine/h_hex.xml b/conf/airframes/obsolete/Poine/h_hex.xml index b76881c9fa..252cdacf33 100644 --- a/conf/airframes/obsolete/Poine/h_hex.xml +++ b/conf/airframes/obsolete/Poine/h_hex.xml @@ -168,7 +168,7 @@ - + diff --git a/conf/airframes/obsolete/Poine/test_libeknav.xml b/conf/airframes/obsolete/Poine/test_libeknav.xml index 59ec1b8ac7..344e8db8b3 100644 --- a/conf/airframes/obsolete/Poine/test_libeknav.xml +++ b/conf/airframes/obsolete/Poine/test_libeknav.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/airframes/obsolete/UofAdelaide/A1000_BOOZ.xml b/conf/airframes/obsolete/UofAdelaide/A1000_BOOZ.xml index a79cea2d5c..4061167138 100644 --- a/conf/airframes/obsolete/UofAdelaide/A1000_BOOZ.xml +++ b/conf/airframes/obsolete/UofAdelaide/A1000_BOOZ.xml @@ -291,7 +291,7 @@ second attempt - + diff --git a/conf/airframes/obsolete/UofAdelaide/A1000_LISA.xml b/conf/airframes/obsolete/UofAdelaide/A1000_LISA.xml index ebd6bd5bbe..5f3ee2a945 100644 --- a/conf/airframes/obsolete/UofAdelaide/A1000_LISA.xml +++ b/conf/airframes/obsolete/UofAdelaide/A1000_LISA.xml @@ -200,7 +200,7 @@ - + diff --git a/conf/airframes/obsolete/UofAdelaide/A1000_NOVA.xml b/conf/airframes/obsolete/UofAdelaide/A1000_NOVA.xml index 5d38914b96..564e7dbcc4 100644 --- a/conf/airframes/obsolete/UofAdelaide/A1000_NOVA.xml +++ b/conf/airframes/obsolete/UofAdelaide/A1000_NOVA.xml @@ -249,7 +249,7 @@ - + diff --git a/conf/airframes/obsolete/example_heli_lisam.xml b/conf/airframes/obsolete/example_heli_lisam.xml index 6ed0bf3d66..e3dbdfd842 100644 --- a/conf/airframes/obsolete/example_heli_lisam.xml +++ b/conf/airframes/obsolete/example_heli_lisam.xml @@ -252,7 +252,7 @@ AP_MODE_NAV - + diff --git a/conf/airframes/obsolete/mm/extra/logger_sd_adc.xml b/conf/airframes/obsolete/mm/extra/logger_sd_adc.xml index 817515c109..b68667ad32 100644 --- a/conf/airframes/obsolete/mm/extra/logger_sd_adc.xml +++ b/conf/airframes/obsolete/mm/extra/logger_sd_adc.xml @@ -68,8 +68,8 @@ ap.CFLAGS += -DLOG_XBEE #ap.CFLAGS += -DLOG_PPRZ #set the speed -ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_RX_ONLY -ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_RX_ONLY +ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_TX=FALSE +ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_TX=FALSE ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c #set SPI interface for SD card (0 or 1) diff --git a/conf/airframes/obsolete/mm/extra/quiet.xml b/conf/airframes/obsolete/mm/extra/quiet.xml index c1465c0da0..7c71a31966 100644 --- a/conf/airframes/obsolete/mm/extra/quiet.xml +++ b/conf/airframes/obsolete/mm/extra/quiet.xml @@ -21,8 +21,8 @@ ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_logger. ap.CFLAGS += -DLOG_XBEE #set the speed -ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_RX_ONLY -ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_RX_ONLY +ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B57600 -DUSE_UART0_TX=FALSE +ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DUSE_UART1_TX=FALSE ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c diff --git a/conf/airframes/obsolete/mm/fixed-wing/slowfast2.xml b/conf/airframes/obsolete/mm/fixed-wing/slowfast2.xml index ce6d0b7f49..8a0c6e8042 100644 --- a/conf/airframes/obsolete/mm/fixed-wing/slowfast2.xml +++ b/conf/airframes/obsolete/mm/fixed-wing/slowfast2.xml @@ -36,7 +36,7 @@ - + diff --git a/conf/airframes/obsolete/mm/rotor/qmk1.xml b/conf/airframes/obsolete/mm/rotor/qmk1.xml index 7d561384d0..8066ee667d 100644 --- a/conf/airframes/obsolete/mm/rotor/qmk1.xml +++ b/conf/airframes/obsolete/mm/rotor/qmk1.xml @@ -200,7 +200,7 @@ - + diff --git a/conf/boards/apogee_0.99.makefile b/conf/boards/apogee_0.99.makefile new file mode 100644 index 0000000000..14006c6d4e --- /dev/null +++ b/conf/boards/apogee_0.99.makefile @@ -0,0 +1,57 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# apogee_0.99.makefile +# +# + +BOARD=apogee +BOARD_VERSION=0.99 +BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" + +ARCH=stm32 +ARCH_L=f4 +ARCH_DIR=stm32 +SRC_ARCH=arch/$(ARCH_DIR) +$(TARGET).ARCHDIR = $(ARCH) +$(TARGET).LDSCRIPT=$(SRC_ARCH)/apogee.ld + +HARD_FLOAT=yes + +# default flash mode is via usb dfu bootloader +# possibilities: DFU, SWD +FLASH_MODE ?= DFU +STLINK ?= y +DFU_UTIL ?= y + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= none +BARO_LED ?= none +AHRS_ALIGNER_LED ?= 2 +GPS_LED ?= none +SYS_TIME_LED ?= 1 + +# +# default UART configuration (modem, gps, spektrum) +# + +MODEM_PORT ?= UART1 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART4 +GPS_BAUD ?= B38400 + +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART2 + + +# +# default actuator configuration +# +# you can use different actuators by adding a configure option to your firmware section +# e.g. +# +ACTUATORS ?= actuators_pwm + diff --git a/conf/boards/apogee_1.0.makefile b/conf/boards/apogee_1.0.makefile new file mode 100644 index 0000000000..07639c1ccf --- /dev/null +++ b/conf/boards/apogee_1.0.makefile @@ -0,0 +1,58 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# apogee_1.0.makefile +# +# + +BOARD=apogee +BOARD_VERSION=1.0 +BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" + +ARCH=stm32 +ARCH_L=f4 +ARCH_DIR=stm32 +SRC_ARCH=arch/$(ARCH_DIR) +$(TARGET).ARCHDIR = $(ARCH) +$(TARGET).LDSCRIPT=$(SRC_ARCH)/apogee.ld + +HARD_FLOAT=yes + +# default flash mode is via usb dfu bootloader +# possibilities: DFU, SWD +FLASH_MODE ?= DFU +STLINK ?= y +DFU_UTIL ?= y + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= 4 +BARO_LED ?= none +AHRS_ALIGNER_LED ?= 2 +GPS_LED ?= 3 +SYS_TIME_LED ?= 1 + +# +# default UART configuration (modem, gps, spektrum) +# + +MODEM_PORT ?= UART1 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART4 +GPS_BAUD ?= B38400 + +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART2 + +SBUS_PORT ?= UART2 + +# +# default actuator configuration +# +# you can use different actuators by adding a configure option to your firmware section +# e.g. +# +ACTUATORS ?= actuators_pwm + diff --git a/conf/boards/ardrone2_raw.makefile b/conf/boards/ardrone2_raw.makefile new file mode 100644 index 0000000000..5ab2d5f7cc --- /dev/null +++ b/conf/boards/ardrone2_raw.makefile @@ -0,0 +1,42 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# ardrone2_raw.makefile +# +# http://paparazzi.enac.fr/wiki/AR.Drone_2_-_Specifications +# + +BOARD=ardrone +BOARD_VERSION=2 +BOARD_TYPE=raw +BOARD_CFG=\"boards/$(BOARD)$(BOARD_VERSION)_$(BOARD_TYPE).h\" + +ARCH=omap +$(TARGET).ARCHDIR = $(ARCH) + +# ----------------------------------------------------------------------- +USER=foobar +HOST=192.168.1.1 +SUB_DIR=raw +FTP_DIR=/data/video +TARGET_DIR=$(FTP_DIR)/$(SUB_DIR) +# ----------------------------------------------------------------------- + +# The GPS sensor is connected trough USB so we have to define the device +GPS_PORT ?= UART1 +GPS_BAUD ?= B57600 + +# Here we define what the UART1_DEV device mapping +$(TARGET).CFLAGS += -DUART1_DEV=\"/dev/ttyUSB0\" +#$(TARGET).CFLAGS += -DUART0_DEV=\"/dev/ttyO3\" + +# for distinction between RAW and SDK version +$(TARGET).CFLAGS +=-DARDRONE2_RAW + +# ----------------------------------------------------------------------- + +# default LED configuration +RADIO_CONTROL_LED ?= none +BARO_LED ?= none +AHRS_ALIGNER_LED ?= none +GPS_LED ?= none +SYS_TIME_LED ?= none diff --git a/conf/boards/ardrone2_sdk.makefile b/conf/boards/ardrone2_sdk.makefile new file mode 100644 index 0000000000..46ba01c8c9 --- /dev/null +++ b/conf/boards/ardrone2_sdk.makefile @@ -0,0 +1,34 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# ardrone2_sdk.makefile +# +# http://paparazzi.enac.fr/wiki/AR.Drone_2_-_Specifications +# + +BOARD=ardrone +BOARD_VERSION=2 +BOARD_TYPE=sdk +BOARD_CFG=\"boards/$(BOARD)$(BOARD_VERSION)_$(BOARD_TYPE).h\" + +ARCH=omap +$(TARGET).ARCHDIR = $(ARCH) + +# ----------------------------------------------------------------------- +USER=foobar +HOST=192.168.1.1 +SUB_DIR=sdk +FTP_DIR=/data/video +TARGET_DIR=$(FTP_DIR)/$(SUB_DIR) +# ----------------------------------------------------------------------- + +# The GPS sensor is connected trough USB so we have to define the device +GPS_PORT ?= UART1 +GPS_BAUD ?= B57600 + +# Here we define what the UART1_DEV device mapping +$(TARGET).CFLAGS += -DUART1_DEV=\"/dev/ttyUSB0\" + +# for distinction between SDK and RAW version +ap.CFLAGS +=-DARDRONE2_SDK + +# ----------------------------------------------------------------------- diff --git a/conf/boards/krooz_sd.makefile b/conf/boards/krooz_sd.makefile new file mode 100644 index 0000000000..d5679f8539 --- /dev/null +++ b/conf/boards/krooz_sd.makefile @@ -0,0 +1,58 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# krooz_sd.makefile +# +# +# + +BOARD=krooz +BOARD_VERSION=sd +BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" + +ARCH=stm32 +ARCH_L=f4 +HARD_FLOAT=yes +ARCH_DIR=stm32 +SRC_ARCH=arch/$(ARCH_DIR) +$(TARGET).ARCHDIR = $(ARCH) +# not needed? +$(TARGET).OOCD_INTERFACE=flossjtag +#$(TARGET).OOCD_INTERFACE=jtagkey-tiny +$(TARGET).LDSCRIPT=$(SRC_ARCH)/krooz.ld + +# ----------------------------------------------------------------------- + +ifndef FLASH_MODE +FLASH_MODE = DFU +#FLASH_MODE = JTAG +#FLASH_MODE = SERIAL +endif + +DFU_ADDR = 0x8004000 +DFU_PRODUCT = any + +# +# +# some default values shared between different firmwares +# +# + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= none +BARO_LED ?= none +AHRS_ALIGNER_LED ?= 2 +GPS_LED ?= none +SYS_TIME_LED ?= 1 + +# +# default uart configuration +# +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 + +MODEM_PORT ?= UART5 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART3 +GPS_BAUD ?= B38400 diff --git a/conf/boards/stm32f4_discovery.makefile b/conf/boards/stm32f4_discovery.makefile new file mode 100644 index 0000000000..f00700c783 --- /dev/null +++ b/conf/boards/stm32f4_discovery.makefile @@ -0,0 +1,57 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# stm32f4_discovery.makefile +# +# + +BOARD=stm32f4_discovery +BOARD_VERSION= +BOARD_CFG=\"boards/$(BOARD).h\" + +ARCH=stm32 +ARCH_L=f4 +ARCH_DIR=stm32 +SRC_ARCH=arch/$(ARCH_DIR) +$(TARGET).ARCHDIR = $(ARCH) +$(TARGET).LDSCRIPT=$(SRC_ARCH)/apogee.ld + +HARD_FLOAT=yes + +# default flash mode is via usb dfu bootloader +# possibilities: DFU, SWD +FLASH_MODE ?= DFU +STLINK ?= n +DFU_UTIL ?= y + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= 4 +BARO_LED ?= none +AHRS_ALIGNER_LED ?= none +GPS_LED ?= none +SYS_TIME_LED ?= 3 + +# +# default UART configuration (modem, gps, spektrum) +# + +MODEM_PORT ?= UART6 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART4 +GPS_BAUD ?= B38400 + +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART2 + + +# +# default actuator configuration +# +# you can use different actuators by adding a configure option to your firmware section +# e.g. +# +ACTUATORS ?= actuators_pwm + diff --git a/conf/conf.xml.example b/conf/conf.xml.example index be94bcea2a..dbe5408feb 100644 --- a/conf/conf.xml.example +++ b/conf/conf.xml.example @@ -125,6 +125,26 @@ settings=" settings/test_fixedwing_actuators.xml" gui_color="blue" /> + + + diff --git a/conf/control_panel.xml.example b/conf/control_panel.xml.example index ac01febe42..0c69ef79c8 100644 --- a/conf/control_panel.xml.example +++ b/conf/control_panel.xml.example @@ -20,6 +20,8 @@ + + @@ -81,6 +83,14 @@
+ + + + + + + + @@ -121,6 +131,23 @@ + + + + + + + + + + + + + + + + +
diff --git a/conf/firmwares/lisa_test_progs.makefile b/conf/firmwares/lisa_test_progs.makefile index 4d57ba3bd6..5a18345359 100644 --- a/conf/firmwares/lisa_test_progs.makefile +++ b/conf/firmwares/lisa_test_progs.makefile @@ -63,10 +63,11 @@ SRC_AIRBORNE=. # PERIODIC_FREQUENCY = 512 -COMMON_TEST_CFLAGS = -I$(SRC_FIRMWARE) -I$(ARCH) -DPERIPHERALS_AUTO_INIT +COMMON_TEST_CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -DPERIPHERALS_AUTO_INIT COMMON_TEST_CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) COMMON_TEST_SRCS = $(SRC_AIRBORNE)/mcu.c \ $(SRC_ARCH)/mcu_arch.c +COMMON_TEST_SRCS += $(SRC_ARCH)/mcu_periph/gpio_arch.c COMMON_TEST_CFLAGS += -DUSE_SYS_TIME ifneq ($(SYS_TIME_LED),none) COMMON_TEST_CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) @@ -187,7 +188,7 @@ test_baro.srcs = $(COMMON_TEST_SRCS) test_baro.CFLAGS += $(COMMON_TELEMETRY_CFLAGS) test_baro.srcs += $(COMMON_TELEMETRY_SRCS) -test_baro.CFLAGS += -I$(SRC_LISA) -I$(SRC_BOARD) +test_baro.CFLAGS += -I$(SRC_LISA) ifeq ($(BOARD), lisa_l) test_baro.CFLAGS += -DUSE_I2C2 @@ -202,16 +203,21 @@ LISA_M_BARO ?= BARO_BOARD_BMP085 ifeq ($(LISA_M_BARO), BARO_MS5611_SPI) include $(CFG_SHARED)/spi_master.makefile test_baro.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3 - test_baro.srcs += $(SRC_BOARD)/baro_ms5611_spi.c + test_baro.srcs += peripherals/ms5611.c + test_baro.srcs += peripherals/ms5611_spi.c + test_baro.srcs += subsystems/sensors/baro_ms5611_spi.c test_baro.srcs += $(SRC_LISA)/test_baro_spi.c else ifeq ($(LISA_M_BARO), BARO_MS5611_I2C) test_baro.CFLAGS += -DUSE_I2C2 test_baro.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c - test_baro.srcs += $(SRC_BOARD)/baro_ms5611_i2c.c + test_baro.srcs += peripherals/ms5611.c + test_baro.srcs += peripherals/ms5611_i2c.c + test_baro.srcs += subsystems/sensors/baro_ms5611_i2c.c test_baro.srcs += $(SRC_LISA)/test_baro_i2c.c else ifeq ($(LISA_M_BARO), BARO_BOARD_BMP085) test_baro.CFLAGS += -DUSE_I2C2 test_baro.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c + test_baro.srcs += peripherals/bmp085.c test_baro.srcs += $(SRC_BOARD)/baro_board.c test_baro.srcs += $(SRC_LISA)/test_baro_i2c.c endif @@ -243,9 +249,9 @@ ifneq ($(RADIO_CONTROL_LED),none) endif test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\" -test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) -test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT) -test_rc_spektrum.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER -DUSE_TIM6_IRQ +test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) +test_rc_spektrum.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT) +test_rc_spektrum.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER test_rc_spektrum.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)_IRQ_HANDLER test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control/spektrum.c @@ -655,7 +661,7 @@ test_can.CFLAGS = $(COMMON_TEST_CFLAGS) test_can.srcs = $(COMMON_TEST_SRCS) test_can.CFLAGS += $(COMMON_TELEMETRY_CFLAGS) test_can.srcs += $(COMMON_TELEMETRY_SRCS) -test_can.CFLAGS += -I$(SRC_LISA) -I$(SRC_BOARD) +test_can.CFLAGS += -I$(SRC_LISA) test_can.CFLAGS += -I$(SRC_LISA) test_can.srcs += lisa/test_can.c diff --git a/conf/firmwares/logger.makefile b/conf/firmwares/logger.makefile index b9d9df514b..13d73eec69 100644 --- a/conf/firmwares/logger.makefile +++ b/conf/firmwares/logger.makefile @@ -44,8 +44,8 @@ LOG_MSG_FMT = LOG_PPRZ endif #set the speed -ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=$(UART0_BAUD) -DUSE_UART0_RX_ONLY -DPERIPHERALS_AUTO_INIT -ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=$(UART1_BAUD) -DUSE_UART1_RX_ONLY +ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=$(UART0_BAUD) -DUSE_UART0_TX=FALSE -DPERIPHERALS_AUTO_INIT +ap.CFLAGS += -DUSE_UART1 -DUART1_BAUD=$(UART1_BAUD) -DUSE_UART1_TX=FALSE ap.CFLAGS += -DLOG_STOP_KEY=$(LOG_STOP_KEY) ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c ap.srcs += mcu_periph/uart.c diff --git a/conf/firmwares/rotorcraft.makefile b/conf/firmwares/rotorcraft.makefile index 9dce60427f..b5cd13d64e 100644 --- a/conf/firmwares/rotorcraft.makefile +++ b/conf/firmwares/rotorcraft.makefile @@ -64,6 +64,10 @@ ifeq ($(ARCH), lpc21) ap.srcs += $(SRC_ARCH)/armVIC.c endif +ifeq ($(ARCH), stm32) +ap.srcs += $(SRC_ARCH)/mcu_periph/gpio_arch.c +endif + # # LEDs # @@ -72,10 +76,17 @@ ifeq ($(ARCH), stm32) ap.srcs += $(SRC_ARCH)/led_hw.c endif +ifeq ($(BOARD)$(BOARD_TYPE), ardroneraw) +ap.srcs += $(SRC_BOARD)/gpio_ardrone.c +endif + # frequency of main periodic PERIODIC_FREQUENCY ?= 512 ap.CFLAGS += -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) +TELEMETRY_FREQUENCY ?= 60 +ap.CFLAGS += -DTELEMETRY_FREQUENCY=$(TELEMETRY_FREQUENCY) + # # Systime # @@ -97,6 +108,9 @@ ap.srcs += $(SRC_ARCH)/subsystems/settings_arch.c ap.srcs += mcu_periph/uart.c ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c +ifeq ($(ARCH), omap) +ap.srcs += $(SRC_ARCH)/serial_port.c +endif # I2C is needed for speed controllers and barometers on lisa ifeq ($(TARGET), ap) @@ -145,6 +159,12 @@ else ifeq ($(BOARD), lisa_l) ap.CFLAGS += -DUSE_I2C2 ap.srcs += $(SRC_BOARD)/baro_board.c +# Ardrone baro +else ifeq ($(BOARD)$(BOARD_TYPE), ardroneraw) +ap.srcs += $(SRC_BOARD)/baro_board.c +else ifeq ($(BOARD)$(BOARD_TYPE), ardronesdk) +ap.srcs += $(SRC_BOARD)/baro_board_dummy.c + # Lisa/M baro else ifeq ($(BOARD), lisa_m) # defaults to i2c baro bmp085 on the board @@ -152,13 +172,18 @@ LISA_M_BARO ?= BARO_BOARD_BMP085 ifeq ($(LISA_M_BARO), BARO_MS5611_SPI) include $(CFG_SHARED)/spi_master.makefile ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3 - ap.srcs += $(SRC_BOARD)/baro_ms5611_spi.c + ap.srcs += peripherals/ms5611.c + ap.srcs += peripherals/ms5611_spi.c + ap.srcs += subsystems/sensors/baro_ms5611_spi.c else ifeq ($(LISA_M_BARO), BARO_MS5611_I2C) ap.CFLAGS += -DUSE_I2C2 - ap.srcs += $(SRC_BOARD)/baro_ms5611_i2c.c + ap.srcs += peripherals/ms5611.c + ap.srcs += peripherals/ms5611_i2c.c + ap.srcs += subsystems/sensors/baro_ms5611_i2c.c else ifeq ($(LISA_M_BARO), BARO_BOARD_BMP085) + ap.srcs += peripherals/bmp085.c ap.srcs += $(SRC_BOARD)/baro_board.c - ap.CFLAGS += -DUSE_I2C2 + ap.CFLAGS += -DUSE_I2C2 endif ap.CFLAGS += -D$(LISA_M_BARO) @@ -169,10 +194,14 @@ LIA_BARO ?= BARO_MS5611_SPI ifeq ($(LIA_BARO), BARO_MS5611_SPI) include $(CFG_SHARED)/spi_master.makefile ap.CFLAGS += -DUSE_SPI2 -DUSE_SPI_SLAVE3 - ap.srcs += boards/lisa_m/baro_ms5611_spi.c + ap.srcs += peripherals/ms5611.c + ap.srcs += peripherals/ms5611_spi.c + ap.srcs += subsystems/sensors/baro_ms5611_spi.c else ifeq ($(LIA_BARO), BARO_MS5611_I2C) ap.CFLAGS += -DUSE_I2C2 - ap.srcs += boards/lisa_m/baro_ms5611_i2c.c + ap.srcs += peripherals/ms5611.c + ap.srcs += peripherals/ms5611_i2c.c + ap.srcs += subsystems/sensors/baro_ms5611_i2c.c endif ap.CFLAGS += -D$(LIA_BARO) @@ -183,7 +212,23 @@ ap.CFLAGS += -DUSE_SPI_SLAVE0 ap.CFLAGS += -DUSE_SPI1 ap.srcs += peripherals/mcp355x.c ap.srcs += $(SRC_BOARD)/baro_board.c + +# krooz baro +else ifeq ($(BOARD), krooz) +ap.CFLAGS += -DMS5611_I2C_DEV=i2c2 -DMS5611_SLAVE_ADDR=0xEC +ap.srcs += peripherals/ms5611.c +ap.srcs += peripherals/ms5611_i2c.c +ap.srcs += subsystems/sensors/baro_ms5611_i2c.c + +# apogee baro +else ifeq ($(BOARD), apogee) +ap.CFLAGS += -DUSE_I2C1 +ap.CFLAGS += -DMPL3115_I2C_DEV=i2c1 +ap.CFLAGS += -DMPL3115_ALT_MODE=0 +ap.srcs += peripherals/mpl3115.c +ap.srcs += $(SRC_BOARD)/baro_board.c endif + ifneq ($(BARO_LED),none) ap.CFLAGS += -DROTORCRAFT_BARO_LED=$(BARO_LED) endif @@ -203,9 +248,12 @@ ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c endif else ifeq ($(ARCH), stm32) ap.CFLAGS += -DUSE_ADC -ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4 ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c ap.srcs += subsystems/electrical.c +else ifeq ($(BOARD)$(BOARD_TYPE), ardronesdk) +ap.srcs += $(SRC_BOARD)/electrical_dummy.c +else ifeq ($(BOARD)$(BOARD_TYPE), ardroneraw) +ap.srcs += $(SRC_BOARD)/electrical_raw.c endif @@ -242,6 +290,7 @@ ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_h.c ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_h_ref.c ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_v.c ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_v_ref.c +ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_v_adapt.c # # INS choice @@ -257,12 +306,3 @@ ap.srcs += $(SRC_FIRMWARE)/guidance/guidance_v_ref.c ap.srcs += $(SRC_FIRMWARE)/navigation.c ap.srcs += subsystems/navigation/common_flight_plan.c -# -# FMS choice -# -# include booz2_fms_test_signal.makefile -# or -# include booz2_fms_datalink.makefile -# or -# nothing -# diff --git a/conf/firmwares/subsystems/fixedwing/ahrs_gx3.makefile b/conf/firmwares/subsystems/fixedwing/ahrs_gx3.makefile new file mode 100644 index 0000000000..2d0d4cee14 --- /dev/null +++ b/conf/firmwares/subsystems/fixedwing/ahrs_gx3.makefile @@ -0,0 +1,30 @@ +# Fixedwing AHRS module for GX3 +# 2013, Utah State University, http://aggieair.usu.edu/ + +GX3_PORT ?= UART3 +GX3_BAUD ?= B921600 + +AHRS_CFLAGS = -DUSE_AHRS +AHRS_CFLAGS += -DUSE_IMU +AHRS_CFLAGS += -DUSE_IMU_FLOAT +AHRS_CFLAGS += -DUSE_GX3 + +#fixedwings +AHRS_CFLAGS += -DAHRS_UPDATE_FW_ESTIMATOR +AHRS_CFLAGS += -DUSE_AHRS_ALIGNER + +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +endif + +AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_gx3.h\" +AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c +AHRS_SRCS += $(SRC_SUBSYSTEMS)/imu.c +AHRS_SRCS += subsystems/ahrs/ahrs_gx3.c + +GX3_PORT_LOWER=$(shell echo $(GX3_PORT) | tr A-Z a-z) +AHRS_CFLAGS += -DUSE_$(GX3_PORT) -D$(GX3_PORT)_BAUD=$(GX3_BAUD) +AHRS_CFLAGS += -DUSE_GX3 -DGX3_PORT=$(GX3_PORT_LOWER) + +ap.CFLAGS += $(AHRS_CFLAGS) +ap.srcs += $(AHRS_SRCS) diff --git a/conf/firmwares/subsystems/fixedwing/autopilot.makefile b/conf/firmwares/subsystems/fixedwing/autopilot.makefile index f15c206c9f..3fef9171db 100644 --- a/conf/firmwares/subsystems/fixedwing/autopilot.makefile +++ b/conf/firmwares/subsystems/fixedwing/autopilot.makefile @@ -69,6 +69,10 @@ endif # PERIODIC_FREQUENCY ?= 60 $(TARGET).CFLAGS += -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) + +TELEMETRY_FREQUENCY ?= 60 +$(TARGET).CFLAGS += -DTELEMETRY_FREQUENCY=$(TELEMETRY_FREQUENCY) + $(TARGET).srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(TARGET).CFLAGS += -DUSE_SYS_TIME @@ -103,6 +107,7 @@ endif ifeq ($(ARCH), stm32) ns_srcs += lisa/plug_sys.c + ns_srcs += $(SRC_ARCH)/mcu_periph/gpio_arch.c endif @@ -131,11 +136,7 @@ ns_srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c # ANALOG # ns_CFLAGS += -DUSE_ADC -#ifeq ($(ARCH), lpc21) - ns_srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c -ifeq ($(ARCH), stm32) - ns_CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4 -endif +ns_srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c ###################################################################### ## diff --git a/conf/firmwares/subsystems/fixedwing/ins_xsens700.makefile b/conf/firmwares/subsystems/fixedwing/ins_xsens700.makefile new file mode 100644 index 0000000000..a28dbe30dc --- /dev/null +++ b/conf/firmwares/subsystems/fixedwing/ins_xsens700.makefile @@ -0,0 +1,95 @@ +# Hey Emacs, this is a -*- makefile -*- + +# XSens Mti-G + +# +# +# + + + +######################################### +## ATTITUDE + +ifeq ($(TARGET), ap) + +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# + +# ImuEvent -> XSensEvent +ap.CFLAGS += -DUSE_AHRS -DUSE_INS +ap.CFLAGS += -DIMU_TYPE_H=\"modules/ins/ins_xsens.h\" + +# AHRS Results +ap.CFLAGS += -DINS_MODULE_H=\"modules/ins/ins_xsens.h\" +ap.CFLAGS += -DAHRS_TYPE_H=\"modules/ins/ins_xsens.h\" +ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\" + +#B230400 +#B115200 + +ap.CFLAGS += -DUSE_UART$(XSENS_UART_NR) +ap.CFLAGS += -DINS_LINK=Uart$(XSENS_UART_NR) +ifdef XSENS_BAUDRATE_CONFIG +ap.CFLAGS += -DUART$(XSENS_UART_NR)_BAUD=B115200 +else +ap.CFLAGS += -DUART$(XSENS_UART_NR)_BAUD=B230400 +endif + +ap.CFLAGS += -DUSE_GPS_XSENS +ap.CFLAGS += -DGPS_NB_CHANNELS=50 +ap.CFLAGS += -DXSENS_OUTPUT_MODE=0x1836 +ap.srcs += $(SRC_MODULES)/ins/ins_xsens700.c +ap.CFLAGS += -DAHRS_TRIGGERED_ATTITUDE_LOOP + + +endif + +ifeq ($(TARGET), fbw) + +# when compiling FBW only, the settings need to know the AHRS_TYPE + +fbw.CFLAGS += -DAHRS_TYPE_H=\"modules/ins/ins_xsens.h\" + +endif + + +ifeq ($(TARGET), sim) + +sim.CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_sim.h\" +sim.CFLAGS += -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR + +sim.srcs += $(SRC_SUBSYSTEMS)/ahrs.c +sim.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_sim.c + +endif + +######################################### +## GPS + +# ap.CFLAGS += -DGPS + +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c + +sim.CFLAGS += -DUSE_GPS -DGPS_USE_LATLONG +sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\" +sim.srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim.c + + + + + diff --git a/conf/firmwares/subsystems/fixedwing/joystick.makefile b/conf/firmwares/subsystems/fixedwing/joystick.makefile deleted file mode 100644 index f0787a5567..0000000000 --- a/conf/firmwares/subsystems/fixedwing/joystick.makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# joystick for fixedwings - -$(TARGET).CFLAGS += -DUSE_JOYSTICK - diff --git a/conf/firmwares/subsystems/fixedwing/spi_slave_hs.makefile b/conf/firmwares/subsystems/fixedwing/spi_slave_hs.makefile index c1d03e2aa6..af019ea9a3 100644 --- a/conf/firmwares/subsystems/fixedwing/spi_slave_hs.makefile +++ b/conf/firmwares/subsystems/fixedwing/spi_slave_hs.makefile @@ -1,7 +1,7 @@ # Hey Emacs, this is a -*- makefile -*- #generic spi driver -$(TARGET).CFLAGS += -DUSE_SPI +$(TARGET).CFLAGS += -DUSE_SPI -DSPI_SLAVE_HS ifeq ($(TARGET), sim) else diff --git a/conf/firmwares/subsystems/lisa_passthrough/booz_stabilization_int.makefile b/conf/firmwares/subsystems/lisa_passthrough/booz_stabilization_int.makefile index 53d7b44202..9798cb93cb 100644 --- a/conf/firmwares/subsystems/lisa_passthrough/booz_stabilization_int.makefile +++ b/conf/firmwares/subsystems/lisa_passthrough/booz_stabilization_int.makefile @@ -14,7 +14,7 @@ stm_passthrough.srcs += $(SRC_SUBSYSTEMS)/ins.c stm_passthrough.srcs += math/pprz_geodetic_int.c math/pprz_geodetic_float.c math/pprz_geodetic_double.c stm_passthrough.srcs += $(SRC_FIRMWARE)/navigation.c stm_passthrough.srcs += $(SRC_SUBSYSTEMS)/ins/vf_float.c -stm_passthrough.CFLAGS += -DUSE_VFF -DDT_VFILTER='(1./512.)' +stm_passthrough.CFLAGS += -DUSE_VFF stm_passthrough.CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_INT stm_passthrough.CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_int.h\" diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_ardrone2.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_ardrone2.makefile new file mode 100644 index 0000000000..020408e4fc --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/ahrs_ardrone2.makefile @@ -0,0 +1,16 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Fixed point complementary filter using euler angles for attitude estimation +# + +AHRS_CFLAGS = -DUSE_AHRS -DUSE_AHRS_ARDRONE2 + +AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_ardrone2.h\" +AHRS_SRCS += subsystems/ahrs.c +AHRS_SRCS += subsystems/ahrs/ahrs_ardrone2.c + +ap.CFLAGS += $(AHRS_CFLAGS) +ap.srcs += $(AHRS_SRCS) + +nps.CFLAGS += $(AHRS_CFLAGS) +nps.srcs += $(AHRS_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_extern_quat.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_extern_quat.makefile deleted file mode 100644 index 9a2087c811..0000000000 --- a/conf/firmwares/subsystems/rotorcraft/ahrs_extern_quat.makefile +++ /dev/null @@ -1,17 +0,0 @@ -# -# AHRS wrapper for AHRS devices, such as GX3 or UM6 -# 2013, Utah State University, http://aggieair.usu.edu/ - -AHRS_CFLAGS = -DUSE_AHRS - -ifneq ($(AHRS_ALIGNER_LED),none) - AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) -endif - -AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_extern_quat.h\" -AHRS_SRCS += subsystems/ahrs.c -AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c -AHRS_SRCS += subsystems/ahrs/ahrs_extern_quat.c - -ap.CFLAGS += $(AHRS_CFLAGS) -ap.srcs += $(AHRS_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_quat.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_quat.makefile index 4e1cf5090d..0e0b595620 100644 --- a/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_quat.makefile +++ b/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_quat.makefile @@ -7,7 +7,7 @@ USE_MAGNETOMETER ?= 1 -AHRS_CFLAGS = -DUSE_AHRS +AHRS_CFLAGS = -DUSE_AHRS -DAHRS_FLOAT AHRS_CFLAGS += -DUSE_AHRS_ALIGNER ifneq ($(USE_MAGNETOMETER),0) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile index f8800de866..779c55006f 100644 --- a/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile +++ b/conf/firmwares/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile @@ -7,7 +7,7 @@ USE_MAGNETOMETER ?= 1 -AHRS_CFLAGS = -DUSE_AHRS +AHRS_CFLAGS = -DUSE_AHRS -DAHRS_FLOAT AHRS_CFLAGS += -DUSE_AHRS_ALIGNER ifneq ($(USE_MAGNETOMETER),0) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_float_mlkf.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_float_mlkf.makefile new file mode 100644 index 0000000000..13049dac9f --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/ahrs_float_mlkf.makefile @@ -0,0 +1,37 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# + +USE_MAGNETOMETER ?= 1 + +AHRS_CFLAGS = -DUSE_AHRS -DAHRS_FLOAT +AHRS_CFLAGS += -DUSE_AHRS_ALIGNER + +ifneq ($(USE_MAGNETOMETER),0) + AHRS_CFLAGS += -DUSE_MAGNETOMETER +else +$(error ahrs_float_mlkf needs a magnetometer) +endif + +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +endif + +AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_mlkf.h\" +AHRS_SRCS += subsystems/ahrs.c +AHRS_SRCS += subsystems/ahrs/ahrs_float_mlkf.c +AHRS_SRCS += subsystems/ahrs/ahrs_aligner.c + +ifdef AHRS_PROPAGATE_FREQUENCY +AHRS_CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY) +endif + +ifdef AHRS_CORRECT_FREQUENCY +AHRS_CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY) +endif + +ap.CFLAGS += $(AHRS_CFLAGS) +ap.srcs += $(AHRS_SRCS) + +nps.CFLAGS += $(AHRS_CFLAGS) +nps.srcs += $(AHRS_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_gx3.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_gx3.makefile new file mode 100644 index 0000000000..253b4c62a6 --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/ahrs_gx3.makefile @@ -0,0 +1,26 @@ +# Rotorcraft AHRS module for GX3 +# 2013, Utah State University, http://aggieair.usu.edu/ + +GX3_PORT ?= UART3 +GX3_BAUD ?= B921600 + +AHRS_CFLAGS = -DUSE_AHRS +AHRS_CFLAGS += -DUSE_IMU +AHRS_CFLAGS += -DUSE_IMU_FLOAT +AHRS_CFLAGS += -DUSE_GX3 + +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +endif + +AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_gx3.h\" +AHRS_SRCS += $(SRC_SUBSYSTEMS)/ahrs.c +AHRS_SRCS += $(SRC_SUBSYSTEMS)/imu.c +AHRS_SRCS += subsystems/ahrs/ahrs_gx3.c + +GX3_PORT_LOWER=$(shell echo $(GX3_PORT) | tr A-Z a-z) +AHRS_CFLAGS += -DUSE_$(GX3_PORT) -D$(GX3_PORT)_BAUD=$(GX3_BAUD) +AHRS_CFLAGS += -DUSE_GX3 -DGX3_PORT=$(GX3_PORT_LOWER) + +ap.CFLAGS += $(AHRS_CFLAGS) +ap.srcs += $(AHRS_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_lkf.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_lkf.makefile deleted file mode 100644 index 2c942a23cf..0000000000 --- a/conf/firmwares/subsystems/rotorcraft/ahrs_lkf.makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# Error State Space Kalman filter for attitude estimation -# - -ap.CFLAGS += -DUSE_AHRS_LKF -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_lkf.c - -nps.CFLAGS += -DUSE_AHRS_LKF -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) -nps.srcs += $(SRC_SUBSYSTEMS)/ahrs.c -nps.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -nps.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_lkf.c diff --git a/conf/firmwares/subsystems/rotorcraft/ahrs_mlkf.makefile b/conf/firmwares/subsystems/rotorcraft/ahrs_mlkf.makefile deleted file mode 100644 index b9ff3b0701..0000000000 --- a/conf/firmwares/subsystems/rotorcraft/ahrs_mlkf.makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -# -# - -ap.CFLAGS += -DAHRS_ALIGNER_LED=3 -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c -ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -ap.srcs += $(SRC_BOOZ_PRIV)/ahrs/booz_ahrs_mlkf.c -ap.srcs += $(SRC_BOOZ_PRIV)/ahrs/booz_ahrs_opt.c - -nps.CFLAGS += -I$(SRC_BOOZ_PRIV) -nps.CFLAGS += -DAHRS_ALIGNER_LED=3 -nps.srcs += $(SRC_SUBSYSTEMS)/ahrs.c -nps.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c -nps.srcs += $(SRC_BOOZ_PRIV)/ahrs/booz_ahrs_mlkf.c -nps.srcs += $(SRC_BOOZ_PRIV)/ahrs/booz_ahrs_mlkf_opt.c diff --git a/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile b/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile index f4b19af9fa..6304c5a47e 100644 --- a/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile +++ b/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile @@ -22,7 +22,7 @@ nps.MAKEFILE = nps nps.CFLAGS += -DSITL -DUSE_NPS nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags) -nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) -lm -lglibivy -lgsl -lgslcblas +nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) -lm -lglibivy -lpcre -lgsl -lgslcblas nps.CFLAGS += -I$(NPSDIR) -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I../simulator -I$(PAPARAZZI_HOME)/conf/simulator/nps nps.LDFLAGS += $(shell sdl-config --libs) @@ -67,7 +67,10 @@ nps.srcs += mcu_periph/i2c.c nps.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c -nps.CFLAGS += -DPERIODIC_FREQUENCY=512 +PERIODIC_FREQUENCY ?= 512 +TELEMETRY_FREQUENCY ?= 60 +nps.CFLAGS += -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) +nps.CFLAGS += -DTELEMETRY_FREQUENCY=$(TELEMETRY_FREQUENCY) #nps.CFLAGS += -DUSE_LED nps.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c @@ -100,12 +103,6 @@ nps.srcs += $(SRC_FIRMWARE)/autopilot.c nps.srcs += state.c -# -# in makefile section of airframe xml -# include $(CFG_BOOZ)/subsystems/booz2_ahrs_lkf.makefile -# or -# include $(CFG_BOOZ)/subsystems/booz2_ahrs_cmpl.makefile -# nps.srcs += $(SRC_FIRMWARE)/stabilization.c nps.srcs += $(SRC_FIRMWARE)/stabilization/stabilization_rate.c @@ -116,17 +113,8 @@ nps.srcs += $(SRC_FIRMWARE)/guidance/guidance_h.c nps.srcs += $(SRC_FIRMWARE)/guidance/guidance_h_ref.c nps.srcs += $(SRC_FIRMWARE)/guidance/guidance_v.c nps.srcs += $(SRC_FIRMWARE)/guidance/guidance_v_ref.c +nps.srcs += $(SRC_FIRMWARE)/guidance/guidance_v_adapt.c -# -# INS choice -# -# include subsystems/rotorcraft/ins.makefile -# or -# include subsystems/rotorcraft/ins_extended.makefile -# -# extra: -# include subsystems/rotorcraft/ins_hff.makefile -# nps.srcs += $(SRC_FIRMWARE)/navigation.c nps.srcs += $(SRC_SUBSYSTEMS)/navigation/common_flight_plan.c diff --git a/conf/firmwares/subsystems/rotorcraft/gps_ardrone2.makefile b/conf/firmwares/subsystems/rotorcraft/gps_ardrone2.makefile new file mode 100644 index 0000000000..fad4a3919f --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/gps_ardrone2.makefile @@ -0,0 +1,20 @@ +# Hey Emacs, this is a -*- makefile -*- + +# ARDrone 2 Flightrecorder GPS unit + + +ap.CFLAGS += -DUSE_GPS -DUSE_GPS_ARDRONE2 + +ifneq ($(GPS_LED),none) + ap.CFLAGS += -DGPS_LED=$(GPS_LED) +endif + +ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ardrone2.h\" +ap.srcs += $(SRC_SUBSYSTEMS)/gps/gps_ardrone2.c + +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c + +nps.CFLAGS += -DUSE_GPS +nps.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\" +nps.srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim_nps.c + diff --git a/conf/firmwares/subsystems/rotorcraft/gps_sirf.makefile b/conf/firmwares/subsystems/rotorcraft/gps_sirf.makefile new file mode 100644 index 0000000000..3cff8b7fa9 --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/gps_sirf.makefile @@ -0,0 +1,22 @@ +# Hey Emacs, this is a -*- makefile -*- + +# Sirf GPS unit + +ap.CFLAGS += -DUSE_GPS +ap.CFLAGS += -DGPS_LINK=$(GPS_PORT) +ap.CFLAGS += -DUSE_$(GPS_PORT) +ap.CFLAGS += -D$(GPS_PORT)_BAUD=$(GPS_BAUD) + +ifneq ($(GPS_LED),none) + ap.CFLAGS += -DGPS_LED=$(GPS_LED) +endif + +ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sirf.h\" +ap.srcs += $(SRC_SUBSYSTEMS)/gps/gps_sirf.c + +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/gps.c + +nps.CFLAGS += -DUSE_GPS +nps.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim_nps.h\" +nps.srcs += $(SRC_SUBSYSTEMS)/gps/gps_sim_nps.c + diff --git a/conf/firmwares/subsystems/rotorcraft/ins.makefile b/conf/firmwares/subsystems/rotorcraft/ins.makefile index c23c0333ca..fd4878813c 100644 --- a/conf/firmwares/subsystems/rotorcraft/ins.makefile +++ b/conf/firmwares/subsystems/rotorcraft/ins.makefile @@ -8,5 +8,5 @@ $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_int.c # vertical filter float version $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/vf_float.c -$(TARGET).CFLAGS += -DUSE_VFF -DDT_VFILTER='(1./$(PERIODIC_FREQUENCY).)' +$(TARGET).CFLAGS += -DUSE_VFF diff --git a/conf/firmwares/subsystems/rotorcraft/ins_ardrone2.makefile b/conf/firmwares/subsystems/rotorcraft/ins_ardrone2.makefile new file mode 100644 index 0000000000..759efc1d21 --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/ins_ardrone2.makefile @@ -0,0 +1,7 @@ +# +# simple INS with float vertical filter +# + +$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_ardrone2.h\" -DAUTOPILOT_DISABLE_AHRS_KILL +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_ardrone2.c diff --git a/conf/firmwares/subsystems/rotorcraft/ins_extended.makefile b/conf/firmwares/subsystems/rotorcraft/ins_extended.makefile index 4928c4c495..6ce7f94af9 100644 --- a/conf/firmwares/subsystems/rotorcraft/ins_extended.makefile +++ b/conf/firmwares/subsystems/rotorcraft/ins_extended.makefile @@ -2,11 +2,11 @@ # extended INS with vertical filter using sonar in a better way (flap ground) # -$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_int.h\" +$(TARGET).CFLAGS += -DINS_TYPE_H=\"subsystems/ins/ins_int_extended.h\" $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins.c $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_int_extended.c # vertical filter float version $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/vf_extended_float.c -$(TARGET).CFLAGS += -DUSE_VFF_EXTENDED -DDT_VFILTER='(1./$(PERIODIC_FREQUENCY).)' +$(TARGET).CFLAGS += -DUSE_VFF_EXTENDED diff --git a/conf/firmwares/subsystems/rotorcraft/ins_hff.makefile b/conf/firmwares/subsystems/rotorcraft/ins_hff.makefile index 0e1d9dc5ef..fd0ca65228 100644 --- a/conf/firmwares/subsystems/rotorcraft/ins_hff.makefile +++ b/conf/firmwares/subsystems/rotorcraft/ins_hff.makefile @@ -8,7 +8,7 @@ $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/ins_int.c # vertical filter float version $(TARGET).srcs += $(SRC_SUBSYSTEMS)/ins/vf_float.c -$(TARGET).CFLAGS += -DUSE_VFF -DDT_VFILTER='(1./$(PERIODIC_FREQUENCY).)' +$(TARGET).CFLAGS += -DUSE_VFF # horizontal filter float version $(TARGET).CFLAGS += -DUSE_HFF diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_euler.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_euler.makefile index e62c41b687..ee591b2a52 100644 --- a/conf/firmwares/subsystems/rotorcraft/stabilization_euler.makefile +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_euler.makefile @@ -1,12 +1,2 @@ -STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_INT -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_int.h\" -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_REF_TYPE_H=\"stabilization/stabilization_attitude_ref_euler_int.h\" -STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_ref_euler_int.c -STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_euler_int.c -STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c +$(error The stabilization euler subsystem has been renamed, please replace with in your airframe file.) -ap.CFLAGS += $(STAB_ATT_CFLAGS) -ap.srcs += $(STAB_ATT_SRCS) - -nps.CFLAGS += $(STAB_ATT_CFLAGS) -nps.srcs += $(STAB_ATT_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_float_euler.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_float_euler.makefile index 4f3b11e76d..5733e554e5 100644 --- a/conf/firmwares/subsystems/rotorcraft/stabilization_float_euler.makefile +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_float_euler.makefile @@ -1,6 +1,5 @@ STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_FLOAT -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_float.h\" -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_REF_TYPE_H=\"stabilization/stabilization_attitude_ref_euler_float.h\" +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_euler_float.h\" STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_ref_euler_float.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_euler_float.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_float_quat.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_float_quat.makefile index ba005a992d..d79598d8eb 100644 --- a/conf/firmwares/subsystems/rotorcraft/stabilization_float_quat.makefile +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_float_quat.makefile @@ -1,7 +1,6 @@ STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_FLOAT STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_QUAT -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_float.h\" -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_REF_TYPE_H=\"stabilization/stabilization_attitude_ref_quat_float.h\" +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_quat_float.h\" STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_ref_quat_float.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_quat_float.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_int_euler.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_int_euler.makefile new file mode 100644 index 0000000000..cefbb41959 --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_int_euler.makefile @@ -0,0 +1,11 @@ +STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_INT +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_euler_int.h\" +STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_ref_euler_int.c +STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_euler_int.c +STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c + +ap.CFLAGS += $(STAB_ATT_CFLAGS) +ap.srcs += $(STAB_ATT_SRCS) + +nps.CFLAGS += $(STAB_ATT_CFLAGS) +nps.srcs += $(STAB_ATT_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_int_quat.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_int_quat.makefile index 10e015f4a2..317172085a 100644 --- a/conf/firmwares/subsystems/rotorcraft/stabilization_int_quat.makefile +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_int_quat.makefile @@ -1,7 +1,6 @@ STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_INT STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_QUAT -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_int.h\" -STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_REF_TYPE_H=\"stabilization/stabilization_attitude_ref_quat_int.h\" +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_quat_int.h\" STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_ref_quat_int.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_quat_int.c STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c diff --git a/conf/firmwares/subsystems/rotorcraft/stabilization_passthrough.makefile b/conf/firmwares/subsystems/rotorcraft/stabilization_passthrough.makefile new file mode 100644 index 0000000000..8eb38047ac --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/stabilization_passthrough.makefile @@ -0,0 +1,10 @@ +STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_NO_REF +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_INT +STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_passthrough.h\" +STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_passthrough.c +STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c +ap.CFLAGS += $(STAB_ATT_CFLAGS) +ap.srcs += $(STAB_ATT_SRCS) + +nps.CFLAGS += $(STAB_ATT_CFLAGS) +nps.srcs += $(STAB_ATT_SRCS) diff --git a/conf/firmwares/subsystems/rotorcraft/telemetry_udp.makefile b/conf/firmwares/subsystems/rotorcraft/telemetry_udp.makefile new file mode 100644 index 0000000000..fa355be53b --- /dev/null +++ b/conf/firmwares/subsystems/rotorcraft/telemetry_udp.makefile @@ -0,0 +1,8 @@ + +# Udp telemetry + +ap.CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=Udp +ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=UDP +ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/udp.c subsystems/datalink/pprz_transport.c +ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/telemetry.c +ap.srcs += fms/fms_network.c diff --git a/conf/firmwares/subsystems/shared/actuators_ardrone2.makefile b/conf/firmwares/subsystems/shared/actuators_ardrone2.makefile new file mode 100644 index 0000000000..8273f4461d --- /dev/null +++ b/conf/firmwares/subsystems/shared/actuators_ardrone2.makefile @@ -0,0 +1,11 @@ + +# Actuator drivers for both ardrone versions are conditionally included here +# The AT-command and RAW drivers are not interchangeble + +ifeq ($(BOARD_TYPE), sdk) + $(TARGET).srcs += $(SRC_BOARD)/actuators_at.c + $(TARGET).srcs += $(SRC_BOARD)/at_com.c +else ifeq ($(BOARD_TYPE), raw) + $(TARGET).CFLAGS += -DACTUATORS + $(TARGET).srcs += $(SRC_BOARD)/actuators_ardrone2_raw.c +endif diff --git a/conf/firmwares/subsystems/shared/imu_apogee.makefile b/conf/firmwares/subsystems/shared/imu_apogee.makefile new file mode 100644 index 0000000000..c3e9e4da9b --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_apogee.makefile @@ -0,0 +1,28 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Apogee IMU +# + +IMU_APOGEE_CFLAGS = -DUSE_IMU +IMU_APOGEE_CFLAGS += -DIMU_TYPE_H=\"boards/apogee/imu_apogee.h\" + +IMU_APOGEE_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ + $(SRC_BOARD)/imu_apogee.c + +IMU_APOGEE_I2C_DEV=i2c1 +IMU_APOGEE_CFLAGS += -DUSE_I2C -DUSE_I2C1 + +IMU_APOGEE_CFLAGS += -DIMU_APOGEE_I2C_DEV=$(IMU_APOGEE_I2C_DEV) +IMU_APOGEE_SRCS += peripherals/mpu60x0.c +IMU_APOGEE_SRCS += peripherals/mpu60x0_i2c.c + +# with default APOGEE_SMPLRT_DIV (gyro output 100Hz) +# the AHRS_PROPAGATE_FREQUENCY needs to be adjusted accordingly +AHRS_PROPAGATE_FREQUENCY ?= 100 +AHRS_CORRECT_FREQUENCY ?= 100 +ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY) +ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY) + +ap.CFLAGS += $(IMU_APOGEE_CFLAGS) +ap.srcs += $(IMU_APOGEE_SRCS) + diff --git a/conf/firmwares/subsystems/shared/imu_ardrone2.makefile b/conf/firmwares/subsystems/shared/imu_ardrone2.makefile new file mode 100644 index 0000000000..c574fd2d8a --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_ardrone2.makefile @@ -0,0 +1,22 @@ +# imu AR.Drone2 + +ifeq ($(BOARD_TYPE), sdk) +imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_ardrone2_sdk.h\" -DUSE_IMU +imu_srcs += $(SRC_SUBSYSTEMS)/imu.c +imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_ardrone2_sdk.c +else ifeq ($(BOARD_TYPE), raw) +imu_CFLAGS += -DIMU_TYPE_H=\"subsystems/imu/imu_ardrone2_raw.h\" -DUSE_IMU +imu_srcs += $(SRC_SUBSYSTEMS)/imu.c +imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_ardrone2_raw.c +imu_srcs += $(SRC_BOARD)/navdata.c +endif + +# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets +# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example +ap.CFLAGS += $(imu_CFLAGS) +ap.srcs += $(imu_srcs) + +# +# Simulator +# +include $(CFG_SHARED)/imu_nps.makefile diff --git a/conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile b/conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile index 446b84af59..bcadf223b4 100644 --- a/conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile +++ b/conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile @@ -36,38 +36,7 @@ # # +include $(CFG_SHARED)/imu_aspirin_v2_common.makefile -# for fixedwing firmware and ap only -ifeq ($(TARGET), ap) - IMU_ASPIRIN_CFLAGS = -DUSE_IMU -endif - -IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin2.h\" -IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ - $(SRC_SUBSYSTEMS)/imu/imu_aspirin2.c - -include $(CFG_SHARED)/spi_master.makefile - -ifeq ($(ARCH), lpc21) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI1 -IMU_ASPIRIN_CFLAGS += -DUSE_SPI_SLAVE0 -else ifeq ($(ARCH), stm32) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI2 -# Slave select configuration -# SLAVE2 is on PB12 (NSS) (MPU600 CS) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI_SLAVE2 -endif - -IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_2_1 - -# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets -# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example - -ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS) -ap.srcs += $(IMU_ASPIRIN_SRCS) - - -# -# NPS simulator -# -include $(CFG_SHARED)/imu_nps.makefile +ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS) +ap.srcs += $(IMU_ASPIRIN_2_SRCS) diff --git a/conf/firmwares/subsystems/shared/imu_aspirin_v2.2.makefile b/conf/firmwares/subsystems/shared/imu_aspirin_v2.2.makefile index 8dfb93613a..f9198a182c 100644 --- a/conf/firmwares/subsystems/shared/imu_aspirin_v2.2.makefile +++ b/conf/firmwares/subsystems/shared/imu_aspirin_v2.2.makefile @@ -2,11 +2,14 @@ # # Aspirin IMU v2.2 # +# nearly identical with v2.1, only has the MS5611 baro on SPI. +# The Baro CS line is +# # # required xml: #
# -# +# # # # @@ -37,37 +40,18 @@ # -# for fixedwing firmware and ap only -ifeq ($(TARGET), ap) - IMU_ASPIRIN_CFLAGS = -DUSE_IMU -endif - -IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin2.h\" -IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ - $(SRC_SUBSYSTEMS)/imu/imu_aspirin2.c - -include $(CFG_SHARED)/spi_master.makefile +include $(CFG_SHARED)/imu_aspirin_v2_common.makefile +# +# Baro is connected via SPI, so additionally specify the slave select line for it, +# so that it will be unselected at init (baro CS line high) +# ifeq ($(ARCH), lpc21) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI1 -IMU_ASPIRIN_CFLAGS += -DUSE_SPI_SLAVE0 +IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE1 else ifeq ($(ARCH), stm32) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI2 -# Slave select configuration -# SLAVE2 is on PB12 (NSS) (MPU600 CS) -IMU_ASPIRIN_CFLAGS += -DUSE_SPI_SLAVE2 +# SLAVE3 is on PC13, which is the baro CS +IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE3 endif -IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_2_2 - -# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets -# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example - -ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS) -ap.srcs += $(IMU_ASPIRIN_SRCS) - - -# -# NPS simulator -# -include $(CFG_SHARED)/imu_nps.makefile +ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS) +ap.srcs += $(IMU_ASPIRIN_2_SRCS) diff --git a/conf/firmwares/subsystems/shared/imu_aspirin_v2_common.makefile b/conf/firmwares/subsystems/shared/imu_aspirin_v2_common.makefile new file mode 100644 index 0000000000..a85f2e5e1f --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_aspirin_v2_common.makefile @@ -0,0 +1,90 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Common part for Aspirin IMU v2.1 and v2.2 +# +# +# required xml: +#
+# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +#
+# +# + + +# for fixedwing firmware and ap only +ifeq ($(TARGET), ap) + IMU_ASPIRIN_2_CFLAGS = -DUSE_IMU +endif + +IMU_ASPIRIN_2_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin_2_spi.h\" +IMU_ASPIRIN_2_SRCS = $(SRC_SUBSYSTEMS)/imu.c +IMU_ASPIRIN_2_SRCS += $(SRC_SUBSYSTEMS)/imu/imu_aspirin_2_spi.c +IMU_ASPIRIN_2_SRCS += peripherals/mpu60x0.c +IMU_ASPIRIN_2_SRCS += peripherals/mpu60x0_spi.c + +include $(CFG_SHARED)/spi_master.makefile + +# +# SPI device and slave select defaults +# +ifeq ($(ARCH), lpc21) +ifndef ASPIRIN_2_SPI_DEV +ASPIRIN_2_SPI_DEV = spi1 +endif +ifndef ASPIRIN_2_SPI_SLAVE_IDX +ASPIRIN_2_SPI_SLAVE_IDX = SPI_SLAVE0 +endif +else ifeq ($(ARCH), stm32) +# Slave select configuration +# SLAVE2 is on PB12 (NSS) (MPU600 CS) +ifndef ASPIRIN_2_SPI_DEV +ASPIRIN_2_SPI_DEV = spi2 +endif +ifndef ASPIRIN_2_SPI_SLAVE_IDX +ASPIRIN_2_SPI_SLAVE_IDX = SPI_SLAVE2 +endif +endif + +ASPIRIN_2_SPI_DEV_UPPER=$(shell echo $(ASPIRIN_2_SPI_DEV) | tr a-z A-Z) +ASPIRIN_2_SPI_DEV_LOWER=$(shell echo $(ASPIRIN_2_SPI_DEV) | tr A-Z a-z) + +IMU_ASPIRIN_2_CFLAGS += -DUSE_$(ASPIRIN_2_SPI_DEV_UPPER) +IMU_ASPIRIN_2_CFLAGS += -DASPIRIN_2_SPI_DEV=$(ASPIRIN_2_SPI_DEV_LOWER) + +IMU_ASPIRIN_2_CFLAGS += -DUSE_$(ASPIRIN_2_SPI_SLAVE_IDX) +IMU_ASPIRIN_2_CFLAGS += -DASPIRIN_2_SPI_SLAVE_IDX=$(ASPIRIN_2_SPI_SLAVE_IDX) + +# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets +# and re-use that in the imu_aspirin_v2.1 and imu_aspirin_v2.2 makefiles + + +# +# NPS simulator +# +include $(CFG_SHARED)/imu_nps.makefile diff --git a/conf/firmwares/subsystems/shared/imu_drotek_10dof_v2.makefile b/conf/firmwares/subsystems/shared/imu_drotek_10dof_v2.makefile new file mode 100644 index 0000000000..b41ec9b741 --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_drotek_10dof_v2.makefile @@ -0,0 +1,81 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Drotek 10DOF V2 IMU via I2C +# +# +# required xml: +#
+# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +#
+# +# + + +# for fixedwing firmware and ap only +ifeq ($(TARGET), ap) + IMU_DROTEK_2_CFLAGS = -DUSE_IMU +endif + +IMU_DROTEK_2_CFLAGS += -DIMU_TYPE_H=\"imu/imu_drotek_10dof_v2.h\" +IMU_DROTEK_2_SRCS = $(SRC_SUBSYSTEMS)/imu.c +IMU_DROTEK_2_SRCS += $(SRC_SUBSYSTEMS)/imu/imu_drotek_10dof_v2.c +IMU_DROTEK_2_SRCS += peripherals/mpu60x0.c +IMU_DROTEK_2_SRCS += peripherals/mpu60x0_i2c.c + +# Magnetometer +IMU_DROTEK_2_SRCS += peripherals/hmc58xx.c + + +# set default i2c bus +ifndef DROTEK_2_I2C_DEV +ifeq ($(ARCH), lpc21) +DROTEK_2_I2C_DEV=i2c0 +else ifeq ($(ARCH), stm32) +DROTEK_2_I2C_DEV=i2c2 +endif +endif + +# convert i2cx to upper case +DROTEK_2_I2C_DEV_UPPER=$(shell echo $(DROTEK_2_I2C_DEV) | tr a-z A-Z) + +IMU_DROTEK_2_CFLAGS += -DDROTEK_2_I2C_DEV=$(DROTEK_2_I2C_DEV) +IMU_DROTEK_2_CFLAGS += -DUSE_$(DROTEK_2_I2C_DEV_UPPER) + + +# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets +# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example + +ap.CFLAGS += $(IMU_DROTEK_2_CFLAGS) +ap.srcs += $(IMU_DROTEK_2_SRCS) + + +# +# NPS simulator +# +include $(CFG_SHARED)/imu_nps.makefile diff --git a/conf/firmwares/subsystems/shared/imu_gl1.makefile b/conf/firmwares/subsystems/shared/imu_gl1.makefile new file mode 100644 index 0000000000..041f92f684 --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_gl1.makefile @@ -0,0 +1,51 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# IMU from Goodluckbuy +# + + +IMU_GL1_CFLAGS = -DIMU_TYPE_H=\"imu/imu_gl1.h\" +IMU_GL1_SRCS = $(SRC_SUBSYSTEMS)/imu.c +IMU_GL1_SRCS += $(SRC_SUBSYSTEMS)/imu/imu_gl1.c + +# for fixedwing firmware and ap only +ifeq ($(TARGET), ap) + IMU_GL1_CFLAGS += -DUSE_IMU +endif + +# Accelerometer +IMU_GL1_SRCS += peripherals/adxl345_i2c.c + +# Gyro +IMU_GL1_SRCS += peripherals/l3g4200.c + +# Magnetometer +IMU_GL1_SRCS += peripherals/hmc58xx.c + +ifeq ($(ARCH), lpc21) +ifndef GL1_I2C_DEV +GL1_I2C_DEV=i2c0 +endif +else ifeq ($(ARCH), stm32) +ifndef GL1_I2C_DEV +GL1_I2C_DEV=i2c2 +endif +endif + +# convert i2cx to upper case +GL1_I2C_DEV_UPPER=$(shell echo $(GL1_I2C_DEV) | tr a-z A-Z) + +IMU_GL1_CFLAGS += -DGL1_I2C_DEV=$(GL1_I2C_DEV) +IMU_GL1_CFLAGS += -DUSE_$(GL1_I2C_DEV_UPPER) + +# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets +# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example +ap.CFLAGS += $(IMU_GL1_CFLAGS) +ap.srcs += $(IMU_GL1_SRCS) + + + +# +# NPS simulator +# +include $(CFG_SHARED)/imu_nps.makefile diff --git a/conf/firmwares/subsystems/shared/imu_krooz_sd.makefile b/conf/firmwares/subsystems/shared/imu_krooz_sd.makefile new file mode 100644 index 0000000000..baf9c6ae10 --- /dev/null +++ b/conf/firmwares/subsystems/shared/imu_krooz_sd.makefile @@ -0,0 +1,32 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# KroozSD IMU +# + +IMU_KROOZ_CFLAGS = -DUSE_IMU +IMU_KROOZ_CFLAGS += -DIMU_TYPE_H=\"boards/krooz/imu_krooz.h\" + +IMU_KROOZ_SRCS = $(SRC_SUBSYSTEMS)/imu.c \ + $(SRC_BOARD)/imu_krooz.c \ + $(SRC_ARCH)/subsystems/imu/imu_krooz_sd_arch.c + +IMU_KROOZ_I2C_DEV=i2c2 +IMU_KROOZ_CFLAGS += -DUSE_I2C -DUSE_I2C2 -DI2C2_CLOCK_SPEED=400000 + +IMU_KROOZ_CFLAGS += -DIMU_KROOZ_I2C_DEV=$(IMU_KROOZ_I2C_DEV) +IMU_KROOZ_SRCS += peripherals/mpu60x0.c +IMU_KROOZ_SRCS += peripherals/mpu60x0_i2c.c +IMU_KROOZ_SRCS += peripherals/hmc58xx.c + +AHRS_PROPAGATE_FREQUENCY ?= 512 +AHRS_CORRECT_FREQUENCY ?= 512 +ap.CFLAGS += -DAHRS_PROPAGATE_FREQUENCY=$(AHRS_PROPAGATE_FREQUENCY) +ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY) + +ap.CFLAGS += $(IMU_KROOZ_CFLAGS) +ap.srcs += $(IMU_KROOZ_SRCS) + +# +# NPS simulator +# +include $(CFG_SHARED)/imu_nps.makefile diff --git a/conf/firmwares/subsystems/fixedwing/radio_control_datalink.makefile b/conf/firmwares/subsystems/shared/radio_control_datalink.makefile similarity index 100% rename from conf/firmwares/subsystems/fixedwing/radio_control_datalink.makefile rename to conf/firmwares/subsystems/shared/radio_control_datalink.makefile diff --git a/conf/firmwares/subsystems/shared/radio_control_ppm.makefile b/conf/firmwares/subsystems/shared/radio_control_ppm.makefile index e2b14e0154..f8e49d96d5 100644 --- a/conf/firmwares/subsystems/shared/radio_control_ppm.makefile +++ b/conf/firmwares/subsystems/shared/radio_control_ppm.makefile @@ -23,19 +23,13 @@ ifeq ($(NORADIO), False) $(TARGET).srcs += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c ifeq ($(ARCH),stm32) -# default to PA.01 (Servo 6 on Lisa/M) if not already defined - RADIO_CONTROL_PPM_PIN ?= PA_01 - ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 UART1_RX)) - ap.CFLAGS += -DUSE_PPM_TIM1 - fbw.CFLAGS += -DUSE_PPM_TIM1 - else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 SERVO6)) -# TIM2 is used by ADC by default, tell it to use TIM1 instead -# (also see sw/airborne/arch/stm32/TIM_usage_list.txt) - ap.CFLAGS += -DUSE_PPM_TIM2 -DUSE_AD_TIM1 - fbw.CFLAGS += -DUSE_PPM_TIM2 -DUSE_AD_TIM1 - else - $(error unknown configuration for RADIO_CONTROL_PPM_PIN) + ifdef RADIO_CONTROL_PPM_PIN + ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 UART1_RX)) + $(TARGET).CFLAGS += -DPPM_CONFIG=1 + else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 SERVO6)) + $(TARGET).CFLAGS += -DPPM_CONFIG=2 + endif endif -endif + endif endif diff --git a/conf/firmwares/subsystems/shared/radio_control_sbus.makefile b/conf/firmwares/subsystems/shared/radio_control_sbus.makefile new file mode 100644 index 0000000000..2e8e9ecbe1 --- /dev/null +++ b/conf/firmwares/subsystems/shared/radio_control_sbus.makefile @@ -0,0 +1,20 @@ +# +# Makefile for shared radio_control SBUS subsystem +# + +$(TARGET).CFLAGS += -DRADIO_CONTROL +ifneq ($(RADIO_CONTROL_LED),none) + ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) +endif + +# convert SBUS_PORT to upper and lower case strings: +SBUS_PORT_UPPER=$(shell echo $(SBUS_PORT) | tr a-z A-Z) +SBUS_PORT_LOWER=$(shell echo $(SBUS_PORT) | tr A-Z a-z) + +$(TARGET).CFLAGS += -DUSE_$(SBUS_PORT_UPPER) -D$(SBUS_PORT_UPPER)_BAUD=B100000 +$(TARGET).CFLAGS += -DSBUS_UART_DEV=$(SBUS_PORT_LOWER) +$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus.h\" +$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_SBUS +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c +$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/sbus.c + diff --git a/conf/firmwares/subsystems/shared/radio_control_spektrum.makefile b/conf/firmwares/subsystems/shared/radio_control_spektrum.makefile index d89d66c964..05d9d555c4 100644 --- a/conf/firmwares/subsystems/shared/radio_control_spektrum.makefile +++ b/conf/firmwares/subsystems/shared/radio_control_spektrum.makefile @@ -13,13 +13,13 @@ endif ifneq ($(RADIO_CONTROL_LED),none) ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) endif -ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) -ap.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER -DUSE_TIM6_IRQ +ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) +ap.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER # enable the second spektrum port if so configured ifdef USE_SECONDARY_SPEKTRUM_RECEIVER ifneq ($(USE_SECONDARY_SPEKTRUM_RECEIVER),0) -ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT) +ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT) ap.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)_IRQ_HANDLER endif endif diff --git a/conf/flight_plans/rotorcraft_krooz.xml b/conf/flight_plans/rotorcraft_krooz.xml new file mode 100755 index 0000000000..0ce5f2a18e --- /dev/null +++ b/conf/flight_plans/rotorcraft_krooz.xml @@ -0,0 +1,100 @@ + + + +
+#include "autopilot.h" +#include "../../subsystems/electrical.h" +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/flight_plans/zamboni_survey_test.xml b/conf/flight_plans/zamboni_survey_test.xml new file mode 100644 index 0000000000..c8d138668f --- /dev/null +++ b/conf/flight_plans/zamboni_survey_test.xml @@ -0,0 +1,82 @@ + + + +
+#include "subsystems/datalink/datalink.h" +#include "modules/digital_cam/dc.h" +//#define LINE_START_FUNCTION dc_autoshoot = DC_AUTOSHOOT_DISTANCE; +//#define LINE_START_FUNCTION dc_Survey(dc_gps_dist); +#define LINE_START_FUNCTION dc_Survey(40); +#define LINE_STOP_FUNCTION dc_autoshoot = DC_AUTOSHOOT_STOP; +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/joystick/esky_ek2_0905a.xml b/conf/joystick/esky_ek2_0905a.xml new file mode 100644 index 0000000000..8eb1e02e01 --- /dev/null +++ b/conf/joystick/esky_ek2_0905a.xml @@ -0,0 +1,22 @@ + + + + + + + +