From 1a90de4cc26e2635338fd27a2042d453a92f97ab Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Mon, 24 Nov 2014 19:32:18 +0100 Subject: [PATCH] [airborne] rename arch/omap to arch/linux --- conf/Makefile.ardrone2 | 4 ++-- conf/{Makefile.omap => Makefile.linux} | 19 +++++++++++-------- conf/boards/ardrone2_raw.makefile | 4 ++-- conf/boards/ardrone2_sdk.makefile | 4 ++-- conf/boards/lisa_l_1.0.makefile | 2 +- conf/boards/lisa_l_1.1.makefile | 2 +- conf/firmwares/rotorcraft.makefile | 4 ++-- sw/airborne/arch/{omap => linux}/led_hw.h | 4 ++-- sw/airborne/arch/{omap => linux}/mcu_arch.c | 4 ++-- sw/airborne/arch/{omap => linux}/mcu_arch.h | 4 ++-- .../{omap => linux}/mcu_periph/gpio_arch.h | 2 +- .../{omap => linux}/mcu_periph/i2c_arch.c | 2 +- .../{omap => linux}/mcu_periph/i2c_arch.h | 8 ++++---- .../{omap => linux}/mcu_periph/i2c_smbus.h | 2 +- .../{omap => linux}/mcu_periph/spi_arch.c | 4 ++-- .../{omap => linux}/mcu_periph/spi_arch.h | 4 ++-- .../mcu_periph/sys_time_arch.c | 4 ++-- .../mcu_periph/sys_time_arch.h | 4 ++-- .../{omap => linux}/mcu_periph/uart_arch.c | 4 ++-- .../{omap => linux}/mcu_periph/uart_arch.h | 4 ++-- .../{omap => linux}/mcu_periph/udp_arch.c | 4 ++-- .../{omap => linux}/mcu_periph/udp_arch.h | 4 ++-- .../arch/{omap => linux}/serial_port.c | 0 .../arch/{omap => linux}/serial_port.h | 0 .../subsystems/settings_arch.c | 4 ++-- 25 files changed, 52 insertions(+), 49 deletions(-) rename conf/{Makefile.omap => Makefile.linux} (86%) rename sw/airborne/arch/{omap => linux}/led_hw.h (94%) rename sw/airborne/arch/{omap => linux}/mcu_arch.c (90%) rename sw/airborne/arch/{omap => linux}/mcu_arch.h (91%) rename sw/airborne/arch/{omap => linux}/mcu_periph/gpio_arch.h (97%) rename sw/airborne/arch/{omap => linux}/mcu_periph/i2c_arch.c (98%) rename sw/airborne/arch/{omap => linux}/mcu_periph/i2c_arch.h (87%) rename sw/airborne/arch/{omap => linux}/mcu_periph/i2c_smbus.h (99%) rename sw/airborne/arch/{omap => linux}/mcu_periph/spi_arch.c (98%) rename sw/airborne/arch/{omap => linux}/mcu_periph/spi_arch.h (90%) rename sw/airborne/arch/{omap => linux}/mcu_periph/sys_time_arch.c (96%) rename sw/airborne/arch/{omap => linux}/mcu_periph/sys_time_arch.h (95%) rename sw/airborne/arch/{omap => linux}/mcu_periph/uart_arch.c (98%) rename sw/airborne/arch/{omap => linux}/mcu_periph/uart_arch.h (95%) rename sw/airborne/arch/{omap => linux}/mcu_periph/udp_arch.c (98%) rename sw/airborne/arch/{omap => linux}/mcu_periph/udp_arch.h (94%) rename sw/airborne/arch/{omap => linux}/serial_port.c (100%) rename sw/airborne/arch/{omap => linux}/serial_port.h (100%) rename sw/airborne/arch/{omap => linux}/subsystems/settings_arch.c (92%) diff --git a/conf/Makefile.ardrone2 b/conf/Makefile.ardrone2 index 2f92b83e9b4..94962bfe78c 100644 --- a/conf/Makefile.ardrone2 +++ b/conf/Makefile.ardrone2 @@ -20,10 +20,10 @@ # # -# This Makefile uses the generic Makefile.omap and adds upload rules for the ARDrone2 +# This Makefile uses the generic Makefile.linux and adds upload rules for the ARDrone2 # -include $(PAPARAZZI_SRC)/conf/Makefile.omap +include $(PAPARAZZI_SRC)/conf/Makefile.linux DRONE = $(PAPARAZZI_SRC)/sw/ext/ardrone2_drivers/ardrone2.py diff --git a/conf/Makefile.omap b/conf/Makefile.linux similarity index 86% rename from conf/Makefile.omap rename to conf/Makefile.linux index 7b2e049a848..9e446d17211 100644 --- a/conf/Makefile.omap +++ b/conf/Makefile.linux @@ -20,6 +20,9 @@ # Boston, MA 02111-1307, USA. # +# +# Makefile for linux targets (e.g. OMAP, BBB, ARDrone) +# # # find compiler toolchain @@ -65,11 +68,11 @@ CXXFLAGS += -Wall -Wextra CXXFLAGS += $($(TARGET).CXXFLAGS) CXXFLAGS += $(USER_CFLAGS) -SRC_C_OMAP = $($(TARGET).srcs) -OBJ_C_OMAP = $(SRC_C_OMAP:%.c=$(OBJDIR)/%.o) +SRC_C_LINUX = $($(TARGET).srcs) +OBJ_C_LINUX = $(SRC_C_LINUX:%.c=$(OBJDIR)/%.o) -SRC_CPP_OMAP = $($(TARGET).cpp_srcs) -OBJ_CPP_OMAP = $(SRC_CPP_OMAP:%.cpp=$(OBJDIR)/%.o) +SRC_CPP_LINUX = $($(TARGET).cpp_srcs) +OBJ_CPP_LINUX = $(SRC_CPP_LINUX:%.cpp=$(OBJDIR)/%.o) printcommands: @echo "" @@ -94,12 +97,12 @@ elf: $(OBJDIR)/$(TARGET).elf # Link: create ELF output file from object files. .SECONDARY : $(OBJDIR)/$(TARGET).elf -.PRECIOUS : $(OBJ_C_OMAP) $(OBJ_CPP_OMAP) -%.elf: $(OBJ_C_OMAP) $(OBJ_CPP_OMAP) +.PRECIOUS : $(OBJ_C_LINUX) $(OBJ_CPP_LINUX) +%.elf: $(OBJ_C_LINUX) $(OBJ_CPP_LINUX) @echo LD $@ $(Q)if (expr "$($(TARGET).cpp_srcs)"); \ - then $(CXX) $(CXXFLAGS) $(OBJ_CPP_OMAP) $(OBJ_C_OMAP) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS); \ - else $(CC) $(CFLAGS) $(OBJ_C_OMAP) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS); fi + then $(CXX) $(CXXFLAGS) $(OBJ_CPP_LINUX) $(OBJ_C_LINUX) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS); \ + else $(CC) $(CFLAGS) $(OBJ_C_LINUX) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS); fi # Compile: create object files from C source files $(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac diff --git a/conf/boards/ardrone2_raw.makefile b/conf/boards/ardrone2_raw.makefile index d3768412d03..6166a3e2efa 100644 --- a/conf/boards/ardrone2_raw.makefile +++ b/conf/boards/ardrone2_raw.makefile @@ -10,9 +10,9 @@ BOARD_VERSION=2 BOARD_TYPE=raw BOARD_CFG=\"boards/$(BOARD)$(BOARD_VERSION)_$(BOARD_TYPE).h\" -ARCH=omap +ARCH=linux $(TARGET).ARCHDIR = $(ARCH) -# include conf/Makefile.ardrone2 (with specific upload rules) instead of only Makefile.omap: +# include conf/Makefile.ardrone2 (with specific upload rules) instead of only Makefile.linux: ap.MAKEFILE = ardrone2 # ----------------------------------------------------------------------- diff --git a/conf/boards/ardrone2_sdk.makefile b/conf/boards/ardrone2_sdk.makefile index d490651ff51..7a6a69c4090 100644 --- a/conf/boards/ardrone2_sdk.makefile +++ b/conf/boards/ardrone2_sdk.makefile @@ -10,9 +10,9 @@ BOARD_VERSION=2 BOARD_TYPE=sdk BOARD_CFG=\"boards/$(BOARD)$(BOARD_VERSION)_$(BOARD_TYPE).h\" -ARCH=omap +ARCH=linux $(TARGET).ARCHDIR = $(ARCH) -# include conf/Makefile.ardrone2 (with specific upload rules) instead of only Makefile.omap: +# include conf/Makefile.ardrone2 (with specific upload rules) instead of only Makefile.linux: ap.MAKEFILE = ardrone2 # ----------------------------------------------------------------------- diff --git a/conf/boards/lisa_l_1.0.makefile b/conf/boards/lisa_l_1.0.makefile index 3b8092e6831..a49941a09ed 100644 --- a/conf/boards/lisa_l_1.0.makefile +++ b/conf/boards/lisa_l_1.0.makefile @@ -13,7 +13,7 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-l.ld # ----------------------------------------------------------------------- ifeq ($(BOARD_PROCESSOR),'omap') - ARCH = omap + ARCH = linux $(TARGET).LDFLAGS += -levent -lm # ----------------------------------------------------------------------- diff --git a/conf/boards/lisa_l_1.1.makefile b/conf/boards/lisa_l_1.1.makefile index 44e2b58ccae..cc39735344d 100644 --- a/conf/boards/lisa_l_1.1.makefile +++ b/conf/boards/lisa_l_1.1.makefile @@ -16,7 +16,7 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-l.ld # ----------------------------------------------------------------------- ifeq ($(BOARD_PROCESSOR),'omap') - ARCH = omap + ARCH = linux $(TARGET).LDFLAGS += -levent -lm # ----------------------------------------------------------------------- diff --git a/conf/firmwares/rotorcraft.makefile b/conf/firmwares/rotorcraft.makefile index 8de4dd47ca2..28a0a62bc93 100644 --- a/conf/firmwares/rotorcraft.makefile +++ b/conf/firmwares/rotorcraft.makefile @@ -105,7 +105,7 @@ $(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c # # Electrical subsystem / Analog Backend # -ifneq ($(ARCH), omap) +ifneq ($(ARCH), linux) $(TARGET).CFLAGS += -DUSE_ADC $(TARGET).srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c $(TARGET).srcs += subsystems/electrical.c @@ -158,7 +158,7 @@ endif ns_srcs += mcu_periph/uart.c ns_srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c -ifeq ($(ARCH), omap) +ifeq ($(ARCH), linux) ns_srcs += $(SRC_ARCH)/serial_port.c endif diff --git a/sw/airborne/arch/omap/led_hw.h b/sw/airborne/arch/linux/led_hw.h similarity index 94% rename from sw/airborne/arch/omap/led_hw.h rename to sw/airborne/arch/linux/led_hw.h index 6aecc2884d5..b06db63e430 100644 --- a/sw/airborne/arch/omap/led_hw.h +++ b/sw/airborne/arch/linux/led_hw.h @@ -21,8 +21,8 @@ */ /** - * @file arch/omap/led_hw.h - * omap arch dependant LED macros. + * @file arch/linux/led_hw.h + * linux arch dependant LED macros. */ #ifndef LED_HW_H_ diff --git a/sw/airborne/arch/omap/mcu_arch.c b/sw/airborne/arch/linux/mcu_arch.c similarity index 90% rename from sw/airborne/arch/omap/mcu_arch.c rename to sw/airborne/arch/linux/mcu_arch.c index aab1c9b13d9..5a8f012bd6a 100644 --- a/sw/airborne/arch/omap/mcu_arch.c +++ b/sw/airborne/arch/linux/mcu_arch.c @@ -21,8 +21,8 @@ */ /** - * @file arch/omap/mcu_arch.h - * omap arch dependant microcontroller initialisation functions. + * @file arch/linux/mcu_arch.h + * linux arch dependant microcontroller initialisation functions. * * Because Linux runs on omap, we don't have to initialize the MCU ourselves. */ diff --git a/sw/airborne/arch/omap/mcu_arch.h b/sw/airborne/arch/linux/mcu_arch.h similarity index 91% rename from sw/airborne/arch/omap/mcu_arch.h rename to sw/airborne/arch/linux/mcu_arch.h index b115d23e062..df1c145f835 100644 --- a/sw/airborne/arch/omap/mcu_arch.h +++ b/sw/airborne/arch/linux/mcu_arch.h @@ -21,8 +21,8 @@ */ /** - * @file arch/omap/mcu_arch.c - * omap arch dependant microcontroller initialisation functions. + * @file arch/linux/mcu_arch.c + * linux arch dependant microcontroller initialisation functions. * * Because Linux runs on omap, we don't have to initialize the MCU ourselves. */ diff --git a/sw/airborne/arch/omap/mcu_periph/gpio_arch.h b/sw/airborne/arch/linux/mcu_periph/gpio_arch.h similarity index 97% rename from sw/airborne/arch/omap/mcu_periph/gpio_arch.h rename to sw/airborne/arch/linux/mcu_periph/gpio_arch.h index bbd5316e009..362433e5820 100644 --- a/sw/airborne/arch/omap/mcu_periph/gpio_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/gpio_arch.h @@ -20,7 +20,7 @@ */ /** - * @file arch/omap/mcu_periph/gpio_arch.h + * @file arch/linux/mcu_periph/gpio_arch.h * * GPIO helper functions for linux/omap. * @todo implement gpio_set|clear diff --git a/sw/airborne/arch/omap/mcu_periph/i2c_arch.c b/sw/airborne/arch/linux/mcu_periph/i2c_arch.c similarity index 98% rename from sw/airborne/arch/omap/mcu_periph/i2c_arch.c rename to sw/airborne/arch/linux/mcu_periph/i2c_arch.c index f9f8b34d692..a56cd0414d9 100644 --- a/sw/airborne/arch/omap/mcu_periph/i2c_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/i2c_arch.c @@ -21,7 +21,7 @@ * */ -/** @file arch/omap/mcu_periph/i2c_arch.c +/** @file arch/linux/mcu_periph/i2c_arch.c * I2C functionality */ diff --git a/sw/airborne/arch/omap/mcu_periph/i2c_arch.h b/sw/airborne/arch/linux/mcu_periph/i2c_arch.h similarity index 87% rename from sw/airborne/arch/omap/mcu_periph/i2c_arch.h rename to sw/airborne/arch/linux/mcu_periph/i2c_arch.h index 0be85364cdb..955c57d645a 100644 --- a/sw/airborne/arch/omap/mcu_periph/i2c_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/i2c_arch.h @@ -21,12 +21,12 @@ * */ -/** @file arch/omap/mcu_periph/i2c_arch.h +/** @file arch/linux/mcu_periph/i2c_arch.h * I2C functionality */ -#ifndef OMAP_MCU_PERIPH_I2C_ARCH_H -#define OMAP_MCU_PERIPH_I2C_ARCH_H +#ifndef LINUX_MCU_PERIPH_I2C_ARCH_H +#define LINUX_MCU_PERIPH_I2C_ARCH_H #include "mcu_periph/i2c.h" @@ -45,4 +45,4 @@ extern void i2c2_hw_init(void); #endif /* USE_I2C2 */ -#endif /* OMAP_MCU_PERIPH_I2C_ARCH_H */ +#endif /* LINUX_MCU_PERIPH_I2C_ARCH_H */ diff --git a/sw/airborne/arch/omap/mcu_periph/i2c_smbus.h b/sw/airborne/arch/linux/mcu_periph/i2c_smbus.h similarity index 99% rename from sw/airborne/arch/omap/mcu_periph/i2c_smbus.h rename to sw/airborne/arch/linux/mcu_periph/i2c_smbus.h index 92cc94e779f..d2d7d4877c2 100644 --- a/sw/airborne/arch/omap/mcu_periph/i2c_smbus.h +++ b/sw/airborne/arch/linux/mcu_periph/i2c_smbus.h @@ -23,7 +23,7 @@ /* $Id: i2c-dev.h 5361 2008-10-19 09:47:02Z khali $ */ /** - * @file arch/omap/mcu_periph/i2c_smbus.h + * @file arch/linux/mcu_periph/i2c_smbus.h * I2C-bus driver */ diff --git a/sw/airborne/arch/omap/mcu_periph/spi_arch.c b/sw/airborne/arch/linux/mcu_periph/spi_arch.c similarity index 98% rename from sw/airborne/arch/omap/mcu_periph/spi_arch.c rename to sw/airborne/arch/linux/mcu_periph/spi_arch.c index eb5783482e7..04116afc6aa 100644 --- a/sw/airborne/arch/omap/mcu_periph/spi_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/spi_arch.c @@ -19,8 +19,8 @@ */ /** - * @file arch/omap/mcu_periph/spi_arch.c - * + * @file arch/linux/mcu_periph/spi_arch.c + * Handling of SPI hardware for Linux. */ #include diff --git a/sw/airborne/arch/omap/mcu_periph/spi_arch.h b/sw/airborne/arch/linux/mcu_periph/spi_arch.h similarity index 90% rename from sw/airborne/arch/omap/mcu_periph/spi_arch.h rename to sw/airborne/arch/linux/mcu_periph/spi_arch.h index f5d8d53eb61..374f8413805 100644 --- a/sw/airborne/arch/omap/mcu_periph/spi_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/spi_arch.h @@ -19,8 +19,8 @@ */ /** - * @file arch/omap/mcu_periph/spi_arch.h - * Handling of SPI hardware for Linux/OMAP. + * @file arch/linux/mcu_periph/spi_arch.h + * Handling of SPI hardware for Linux. */ #ifndef SPI_ARCH_H diff --git a/sw/airborne/arch/omap/mcu_periph/sys_time_arch.c b/sw/airborne/arch/linux/mcu_periph/sys_time_arch.c similarity index 96% rename from sw/airborne/arch/omap/mcu_periph/sys_time_arch.c rename to sw/airborne/arch/linux/mcu_periph/sys_time_arch.c index 277e1a7893b..f4fe4a8c5a6 100644 --- a/sw/airborne/arch/omap/mcu_periph/sys_time_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/sys_time_arch.c @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -/** @file arch/omap/mcu_periph/sys_time_arch.h - * omap timing functions +/** @file arch/linux/mcu_periph/sys_time_arch.h + * linux timing functions */ #include "mcu_periph/sys_time.h" diff --git a/sw/airborne/arch/omap/mcu_periph/sys_time_arch.h b/sw/airborne/arch/linux/mcu_periph/sys_time_arch.h similarity index 95% rename from sw/airborne/arch/omap/mcu_periph/sys_time_arch.h rename to sw/airborne/arch/linux/mcu_periph/sys_time_arch.h index 72f3cbb2f45..0b498ee6e55 100644 --- a/sw/airborne/arch/omap/mcu_periph/sys_time_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/sys_time_arch.h @@ -21,8 +21,8 @@ * */ -/** @file arch/omap/mcu_periph/sys_time_arch.h - * omap timing functions +/** @file arch/linux/mcu_periph/sys_time_arch.h + * linux timing functions */ #ifndef SYS_TIME_ARCH_H diff --git a/sw/airborne/arch/omap/mcu_periph/uart_arch.c b/sw/airborne/arch/linux/mcu_periph/uart_arch.c similarity index 98% rename from sw/airborne/arch/omap/mcu_periph/uart_arch.c rename to sw/airborne/arch/linux/mcu_periph/uart_arch.c index b8d81f6519b..3ff18110c3e 100644 --- a/sw/airborne/arch/omap/mcu_periph/uart_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/uart_arch.c @@ -19,8 +19,8 @@ * Boston, MA 02111-1307, USA. */ -/** @file arch/omap/mcu_periph/uart_arch.c - * omap uart handling +/** @file arch/linux/mcu_periph/uart_arch.c + * linux uart handling */ #include "mcu_periph/uart.h" diff --git a/sw/airborne/arch/omap/mcu_periph/uart_arch.h b/sw/airborne/arch/linux/mcu_periph/uart_arch.h similarity index 95% rename from sw/airborne/arch/omap/mcu_periph/uart_arch.h rename to sw/airborne/arch/linux/mcu_periph/uart_arch.h index 9e3a4b38965..e269428480e 100644 --- a/sw/airborne/arch/omap/mcu_periph/uart_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/uart_arch.h @@ -19,8 +19,8 @@ * Boston, MA 02111-1307, USA. */ -/** @file arch/omap/mcu_periph/uart_arch.h - * omap uart handling +/** @file arch/linux/mcu_periph/uart_arch.h + * linux uart handling */ #ifndef UART_ARCH_H diff --git a/sw/airborne/arch/omap/mcu_periph/udp_arch.c b/sw/airborne/arch/linux/mcu_periph/udp_arch.c similarity index 98% rename from sw/airborne/arch/omap/mcu_periph/udp_arch.c rename to sw/airborne/arch/linux/mcu_periph/udp_arch.c index 22260f2d626..5149c90f5a5 100644 --- a/sw/airborne/arch/omap/mcu_periph/udp_arch.c +++ b/sw/airborne/arch/linux/mcu_periph/udp_arch.c @@ -19,8 +19,8 @@ * Boston, MA 02111-1307, USA. */ -/** @file arch/omap/mcu_periph/udp_arch.c - * omap UDP handling +/** @file arch/linux/mcu_periph/udp_arch.c + * linux UDP handling */ #include "mcu_periph/udp.h" diff --git a/sw/airborne/arch/omap/mcu_periph/udp_arch.h b/sw/airborne/arch/linux/mcu_periph/udp_arch.h similarity index 94% rename from sw/airborne/arch/omap/mcu_periph/udp_arch.h rename to sw/airborne/arch/linux/mcu_periph/udp_arch.h index 78e57751ef0..c32cd0bd6d2 100644 --- a/sw/airborne/arch/omap/mcu_periph/udp_arch.h +++ b/sw/airborne/arch/linux/mcu_periph/udp_arch.h @@ -19,8 +19,8 @@ * Boston, MA 02111-1307, USA. */ -/** @file arch/omap/mcu_periph/udp_arch.h - * omap UDP handling +/** @file arch/linux/mcu_periph/udp_arch.h + * linux UDP handling */ #ifndef UDP_ARCH_H diff --git a/sw/airborne/arch/omap/serial_port.c b/sw/airborne/arch/linux/serial_port.c similarity index 100% rename from sw/airborne/arch/omap/serial_port.c rename to sw/airborne/arch/linux/serial_port.c diff --git a/sw/airborne/arch/omap/serial_port.h b/sw/airborne/arch/linux/serial_port.h similarity index 100% rename from sw/airborne/arch/omap/serial_port.h rename to sw/airborne/arch/linux/serial_port.h diff --git a/sw/airborne/arch/omap/subsystems/settings_arch.c b/sw/airborne/arch/linux/subsystems/settings_arch.c similarity index 92% rename from sw/airborne/arch/omap/subsystems/settings_arch.c rename to sw/airborne/arch/linux/subsystems/settings_arch.c index 8056be71847..5f453892860 100644 --- a/sw/airborne/arch/omap/subsystems/settings_arch.c +++ b/sw/airborne/arch/linux/subsystems/settings_arch.c @@ -20,8 +20,8 @@ */ /** - * @file arch/omap/subsystems/settings_arch.c - * OMAP arch Persistent settings. + * @file arch/linux/subsystems/settings_arch.c + * linux arch Persistent settings. * * Unimplemented. */