diff --git a/conf/Makefile.arm-linux b/conf/Makefile.arm-linux index 9d39b2365e..98027327bb 100644 --- a/conf/Makefile.arm-linux +++ b/conf/Makefile.arm-linux @@ -33,7 +33,8 @@ include $(PAPARAZZI_SRC)/conf/Makefile.arm-linux-toolchain # Define some ARM specifc flags ifdef HARD_FLOAT -FLOAT_ABI ?= +# e.g. for BBB or gumstix with armhf distribution +FLOAT_ABI ?= -mfloat-abi=hard -mfpu=neon -ffast-math else FLOAT_ABI ?= -mfloat-abi=softfp -mfpu=vfp endif diff --git a/conf/Makefile.bbb b/conf/Makefile.bbb new file mode 100644 index 0000000000..2654a0855a --- /dev/null +++ b/conf/Makefile.bbb @@ -0,0 +1,42 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Copyright (C) 2015 Felix Ruess +# +# This file is part of paparazzi. +# +# paparazzi is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# paparazzi is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with paparazzi; see the file COPYING. If not, see +# . +# + +# +# This Makefile uses the generic Makefile.arm-linux +# after setting some hard float options +# + +HARD_FLOAT=yes + +include $(PAPARAZZI_SRC)/conf/Makefile.arm-linux + +HOST ?= 192.168.7.2 +TARGET_DIR ?= ~/ +# upload to BBB +upload program: $(OBJDIR)/$(TARGET).elf +ifdef USER + scp -B $(OBJDIR)/$(TARGET).elf $(USER)@$(HOST):$(TARGET_DIR) +else + scp -B $(OBJDIR)/$(TARGET).elf $(HOST):$(TARGET_DIR) +endif + +# Listing of phony targets. +.PHONY : upload program diff --git a/conf/airframes/examples/beagle_bone_black.xml b/conf/airframes/examples/beagle_bone_black.xml new file mode 100644 index 0000000000..c3d281ded2 --- /dev/null +++ b/conf/airframes/examples/beagle_bone_black.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/boards/beagle_bone_black.makefile b/conf/boards/beagle_bone_black.makefile new file mode 100644 index 0000000000..351b637713 --- /dev/null +++ b/conf/boards/beagle_bone_black.makefile @@ -0,0 +1,42 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# beagle_bone_black.makefile +# + +BOARD=beagle_bone_black +BOARD_CFG=\"boards/$(BOARD).h\" + +ARCH=linux +$(TARGET).ARCHDIR = $(ARCH) +# include conf/Makefile.bbb (to set hard-float, etc) instead of only Makefile.linux +$(TARGET).MAKEFILE = bbb + +# ----------------------------------------------------------------------- + +# The GPS sensor is connected trough USB so we have to define the device +GPS_PORT ?= UART1 +GPS_BAUD ?= B57600 + +# The datalink default uses UDP +#MODEM_DEV ?= UDP0 +MODEM_HOST ?= 192.168.1.255 + +# +# UART4 (RX P9_11, TX P9_13) +# +MODEM_PORT ?= UART4 +MODEM_BAUD ?= B57600 +$(TARGET).CFLAGS += -DUART4_DEV=\"/dev/ttyO4\" + + +# handle linux signals by hand (CTRL-C twice to stop) +#$(TARGET).CFLAGS += -DUSE_LINUX_SIGNAL + +# ----------------------------------------------------------------------- + +# default LED configuration +RADIO_CONTROL_LED ?= none +BARO_LED ?= none +AHRS_ALIGNER_LED ?= none +GPS_LED ?= none +SYS_TIME_LED ?= none diff --git a/sw/airborne/arch/linux/led_hw.h b/sw/airborne/arch/linux/led_hw.h index b06db63e43..ce84086c8e 100644 --- a/sw/airborne/arch/linux/led_hw.h +++ b/sw/airborne/arch/linux/led_hw.h @@ -29,13 +29,20 @@ #define LED_HW_H_ #include +#include BOARD_CONFIG +#if defined BOARD_ARDRONE2_SDK || defined BOARD_ARDRONE2_RAW extern uint32_t led_hw_values; - #define LED_INIT(i) { led_hw_values &= ~(1<