mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
processor
This commit is contained in:
+3
-1
@@ -25,9 +25,11 @@
|
||||
# This is the common Makefile for the stm32-target.
|
||||
#
|
||||
|
||||
SRC_ARCH = stm32
|
||||
|
||||
# Pretty Printer
|
||||
# Call with "make Q=''" to get full command display
|
||||
Q=@
|
||||
#Q=@
|
||||
|
||||
MCU = cortex-m3
|
||||
#DEBUG = dwarf-2
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</section>
|
||||
|
||||
<firmware name="fixedwing">
|
||||
<target name="ap" board="lisa_l_1.0">
|
||||
<target name="ap" board="lisa_l_1.0" processor="stm32" >
|
||||
<param name="FLASH_MODE" value="IAP" />
|
||||
<define name="AGR_CLIMB" />
|
||||
<define name="ALT_KALMAN" />
|
||||
@@ -173,7 +173,7 @@
|
||||
<!-- Communication -->
|
||||
<subsystem name="telemetry" type="transparent">
|
||||
<param name="MODEM_UART_NR" value="2"/>
|
||||
<param name="MODEM_BAUD" value="9600"/>
|
||||
<param name="MODEM_BAUD" value="B9600"/>
|
||||
</subsystem>
|
||||
|
||||
<!-- Actuators -->
|
||||
|
||||
@@ -161,12 +161,12 @@
|
||||
</section>
|
||||
|
||||
<firmware name="fixedwing">
|
||||
<target name="sim" board="pc" />
|
||||
<target name="ap" board="tiny_2.11">
|
||||
<param name="FLASH_MODE" value="IAP" />
|
||||
<define name="AGR_CLIMB" />
|
||||
<define name="ALT_KALMAN" />
|
||||
</target>
|
||||
<target name="sim" board="pc" />
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
<firmware name="lisa_passthrough">
|
||||
|
||||
<target name="stm_passthrough" board="lisa_l_1.0">
|
||||
<target name="stm_passthrough" board="lisa_l_1.0" processor="stm32" >
|
||||
</target>
|
||||
<subsystem name="radio_control" type="spektrum">
|
||||
<param name="RADIO_CONTROL_SPEKTRUM_MODEL"
|
||||
@@ -199,7 +199,7 @@
|
||||
<subsystem name="imu" type="b2_v1.1"/>
|
||||
|
||||
|
||||
<target name="overo_test_passthrough" board="lisa_l_1.0" >
|
||||
<target name="overo_test_passthrough" board="lisa_l_1.0" processor="omap" >
|
||||
<param name="HOST" value="A7"/>
|
||||
<param name="USER" value=""/>
|
||||
<param name="TARGET_DIR" value="~"/>
|
||||
|
||||
@@ -32,7 +32,8 @@ name CDATA #REQUIRED>
|
||||
|
||||
<!ATTLIST target
|
||||
name CDATA #REQUIRED
|
||||
board CDATA #REQUIRED>
|
||||
board CDATA #REQUIRED
|
||||
processor CDATA #IMPLIED>
|
||||
|
||||
<!ATTLIST subsystem
|
||||
name CDATA #REQUIRED
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
<!-- Communication -->
|
||||
<subsystem name="telemetry" type="transparent">
|
||||
<param name="MODEM_BAUD" value="9600"/>
|
||||
<param name="MODEM_BAUD" value="B9600"/>
|
||||
</subsystem>
|
||||
|
||||
<!-- Actuators -->
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
CFG_FIXEDWING=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/fixedwing
|
||||
|
||||
|
||||
@@ -14,8 +15,9 @@ SRC_FIXEDWING_TEST=$(SRC_FIXEDWING)/
|
||||
FIXEDWING_INC = -I$(SRC_FIXEDWING) -I$(SRC_FIXEDWING_ARCH)
|
||||
|
||||
|
||||
|
||||
|
||||
# Standard Fixed Wing Code
|
||||
include $(CFG_FIXEDWING)/autopilot.makefile
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for Tiny v1.1
|
||||
|
||||
ap.CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
|
||||
ap.srcs += $(SRC_FIXEDWING_ARCH)/servos_4015_MAT_hw.c $(SRC_FIXEDWING)/actuators.c
|
||||
ap.CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
|
||||
ap.srcs += $(SRC_ARCH)/servos_4015_MAT_hw.c
|
||||
ap.srcs += $(SRC_FIXEDWING)/actuators.c
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
ap.CFLAGS += -DGPS -DUBX
|
||||
ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR)
|
||||
ap.CFLAGS += -DUSE_UART$(GPS_UART_NR)
|
||||
ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=B$(GPS_BAUD)
|
||||
ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD)
|
||||
|
||||
ap.srcs += $(SRC_FIXEDWING)/gps_ubx.c $(SRC_FIXEDWING)/gps.c $(SRC_FIXEDWING)/latlong.c
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
ap.CFLAGS += -DGPS -DUBX -DGPS_USE_LATLONG
|
||||
ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR)
|
||||
ap.CFLAGS += -DUSE_UART$(GPS_UART_NR)
|
||||
ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=B$(GPS_BAUD)
|
||||
ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD)
|
||||
|
||||
ap.srcs += $(SRC_FIXEDWING)/gps_ubx.c $(SRC_FIXEDWING)/gps.c $(SRC_FIXEDWING)/latlong.c
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# joystick for fixedwings
|
||||
|
||||
ap.srcs += joystick.c
|
||||
ap.CFLAGS += -DUSE_JOYSTICK
|
||||
$(TARGET).srcs += joystick.c
|
||||
$(TARGET).CFLAGS += -DUSE_JOYSTICK
|
||||
|
||||
sim.srcs += joystick.c
|
||||
sim.CFLAGS += -DUSE_JOYSTICK
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
|
||||
|
||||
ap.CFLAGS += -DRADIO_CONTROL
|
||||
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR)
|
||||
ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=B$(MODEM_BAUD)
|
||||
ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD)
|
||||
|
||||
MODEM_UART = Uart$(MODEM_UART_NR)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# XBee modems in API mode
|
||||
|
||||
ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR)
|
||||
ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=B$(MODEM_BAUD)
|
||||
ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD)
|
||||
|
||||
MODEM_UART = Uart$(MODEM_UART_NR)
|
||||
|
||||
|
||||
@@ -4,11 +4,30 @@
|
||||
# http://paparazzi.enac.fr/wiki/User/LisaL
|
||||
#
|
||||
|
||||
ARCH=stm32
|
||||
ARCHI=stm32
|
||||
BOARD=lisa_l
|
||||
BOARD_VERSION=1.0
|
||||
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
ifeq ($(BOARD_PROCESSOR),'omap')
|
||||
|
||||
ARCHI = omap
|
||||
$(TARGET).LDFLAGS += -levent -lm
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
else
|
||||
|
||||
ARCH=stm32
|
||||
ARCHI=stm32
|
||||
BOARD=lisa_l
|
||||
BOARD_VERSION=1.0
|
||||
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
|
||||
|
||||
$(TARGET).ARCHDIR = $(ARCHI)
|
||||
# not needed?
|
||||
# $(TARGET).ARCH = arm7tdmi
|
||||
$(TARGET).TARGET = $(TARGET)
|
||||
$(TARGET).TARGETDIR = $(TARGET)
|
||||
|
||||
endif
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
ifndef FLASH_MODE
|
||||
FLASH_MODE = JTAG
|
||||
@@ -33,3 +52,5 @@ AHRS_ALIGNER_LED = 7
|
||||
GPS_PORT=UART1
|
||||
GPS_BAUD=B38400
|
||||
GPS_LED = 3
|
||||
|
||||
|
||||
|
||||
@@ -14,20 +14,15 @@ FLASH_MODE = IAP
|
||||
endif
|
||||
|
||||
|
||||
$(TARGET).ARCHDIR = $(ARCHI)
|
||||
$(TARGET).ARCH = arm7tdmi
|
||||
$(TARGET).TARGET = $(TARGET)
|
||||
$(TARGET).TARGETDIR = $(TARGET)
|
||||
|
||||
LPC21ISP_BAUD = 38400
|
||||
LPC21ISP_XTAL = 12000
|
||||
|
||||
|
||||
### default settings for tiny_2 and twog
|
||||
GPS_UART_NR = 0
|
||||
GPS_BAUD = 38400
|
||||
GPS_BAUD = B38400
|
||||
MODEM_UART_NR = 1
|
||||
MODEM_BAUD = 57600
|
||||
MODEM_BAUD = B57600
|
||||
|
||||
ADC_IR_TOP = ADC_0
|
||||
ADC_IR1 = ADC_1
|
||||
@@ -38,3 +33,9 @@ ADC_GYRO_PITCH = ADC_4
|
||||
ADC_GYRO_NB_SAMPLES = 16
|
||||
|
||||
|
||||
# All targets on the TINY board run on the same processor achitecture
|
||||
$(TARGET).ARCHDIR = $(ARCHI)
|
||||
$(TARGET).ARCH = arm7tdmi
|
||||
$(TARGET).TARGET = $(TARGET)
|
||||
$(TARGET).TARGETDIR = $(TARGET)
|
||||
|
||||
|
||||
@@ -191,8 +191,19 @@ let parse_targets = fun makefile_ac tag target ->
|
||||
(Xml.attrib c "value")
|
||||
end) in
|
||||
List.iter print_if_subsystem (Xml.children target);
|
||||
let has_processor = ref false in
|
||||
begin try
|
||||
has_processor := not (String.compare (Xml.attrib target "processor") "" = 0)
|
||||
with _ -> () end;
|
||||
if !has_processor then
|
||||
fprintf makefile_ac "BOARD_PROCESSOR = %s\n"
|
||||
(Xml.attrib target "processor");
|
||||
fprintf makefile_ac "include $(PAPARAZZI_SRC)/conf/boards/%s.makefile\n" (Xml.attrib target "board");
|
||||
fprintf makefile_ac "include $(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib tag "name");
|
||||
(** fprintf makefile_ac "%s.ARCHDIR = $(ARCHI)\n%s.ARCH = $(ARCH)\n%s.TARGET = %s\n%s.TARGETDIR = %s\n"
|
||||
(Xml.attrib target "name") (Xml.attrib target "name")
|
||||
(Xml.attrib target "name") (Xml.attrib target "name")
|
||||
(Xml.attrib target "name") (Xml.attrib target "name");
|
||||
**) fprintf makefile_ac "include $(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib tag "name");
|
||||
let print_if_subsystem = (fun d ->
|
||||
if ExtXml.tag_is d "define" then begin
|
||||
fprintf makefile_ac "%s.CFLAGS += -D%s\n"
|
||||
|
||||
@@ -217,7 +217,7 @@ let parse_ap_only_commands = fun ap_only ->
|
||||
printf " commands[COMMAND_%s] = ap_commands[COMMAND_%s];\\\n" com com
|
||||
| _ -> xml_error "copy"
|
||||
|
||||
|
||||
(**
|
||||
let parse_subsystem_defines = fun options ->
|
||||
match Xml.tag options with
|
||||
"param" ->
|
||||
@@ -235,7 +235,7 @@ let parse_subsystems = fun subsystem ->
|
||||
printf "// -%s:\n" (ExtXml.attrib subsystem "name");
|
||||
List.iter parse_subsystem_defines (Xml.children subsystem)
|
||||
| _ -> xml_error "subsystem"
|
||||
|
||||
**)
|
||||
|
||||
let parse_command = fun command no ->
|
||||
let command_name = "COMMAND_"^ExtXml.attrib command "name" in
|
||||
@@ -300,10 +300,6 @@ let parse_section = fun s ->
|
||||
| "makefile" ->
|
||||
()
|
||||
(** Ignoring this section *)
|
||||
| "target" ->
|
||||
printf "// Subsystems \n";
|
||||
List.iter parse_subsystems (Xml.children s);
|
||||
printf "// End Subsystems\n\n"
|
||||
| _ -> ()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user