diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index 707d867861..edd19a7e1f 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -118,7 +118,7 @@ endif MULTILIB = $(shell if $(CC) --print-multi-lib | grep thumb2 > /dev/null ; then echo "yes"; else echo "no"; fi) CFLAGS = -I. -I./$(ARCH) $(INCLUDES) -D__thumb2__ -Wall -msoft-float -O$(OPT) -CFLAGS += -Wl,gc-sections +CFLAGS += -Wl,--gc-sections CFLAGS += -mcpu=$(MCU) -mthumb -ansi ifeq ("$(MULTILIB)","yes") CFLAGS += -mfix-cortex-m3-ldrd @@ -149,9 +149,9 @@ endif AFLAGS += -x assembler-with-cpp -Wa,-adhlns=$(OBJDIR)/$(<:.S=.lst),--g$(DEBUG) ifeq ("$(MULTILIB)","yes") -LDFLAGS = -T$(LDSCRIPT) -nostartfiles -O$(OPT) --gc-sections -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float +LDFLAGS = -T$(LDSCRIPT) -nostartfiles -O$(OPT) -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float else -LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) --gc-sections +LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) endif LDFLAGS += -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref,--gc-sections LDLIBS += -lc -lm -lgcc -lcmsis -lstm32 -l$(LIBOPENCM3_LIB) diff --git a/sw/airborne/arch/sim/sim_ap.c b/sw/airborne/arch/sim/sim_ap.c index a37a453baa..c5e1a652db 100644 --- a/sw/airborne/arch/sim/sim_ap.c +++ b/sw/airborne/arch/sim/sim_ap.c @@ -17,7 +17,6 @@ #include "subsystems/nav.h" #include "firmwares/fixedwing/stabilization/stabilization_attitude.h" #include "firmwares/fixedwing/guidance/guidance_v.h" -#include "subsystems/sensors/infrared.h" #include "commands.h" #include "firmwares/fixedwing/main_ap.h" #include "ap_downlink.h" diff --git a/sw/airborne/arch/sim/sim_gps.c b/sw/airborne/arch/sim/sim_gps.c index 0930c39f34..13ef9b84cd 100644 --- a/sw/airborne/arch/sim/sim_gps.c +++ b/sw/airborne/arch/sim/sim_gps.c @@ -47,6 +47,7 @@ value sim_use_gps_pos(value x, value y, value z, value c, value a, value s, valu gps.utm_pos.north = Int_val(y); gps.utm_pos.zone = Int_val(z); lat = lon; /* Just to get rid of the "unused arg" warning */ + lon = lat; /* Just to get rid of the "unused arg" warning */ #endif // GPS_USE_LATLONG diff --git a/sw/airborne/subsystems/sensors/infrared.h b/sw/airborne/subsystems/sensors/infrared.h index 4b5e0e4acc..84ad3ac4e3 100644 --- a/sw/airborne/subsystems/sensors/infrared.h +++ b/sw/airborne/subsystems/sensors/infrared.h @@ -54,6 +54,10 @@ */ #define IR_RollOfIrs(_ir1, _ir2) (_ir1 + _ir2) #define IR_PitchOfIrs(_ir1, _ir2) (-(_ir1) + _ir2) +#else +#ifndef SITL +#error "You have to define either HORIZ_SENSOR_ALIGNED or HORIZ_SENSOR_TILTED in the IR section" +#endif #endif /* Vertical sensor, TOP_SIGN gives positice values when it's warm on the bottom */ #ifndef IR_TopOfIr