mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 15:30:08 +08:00
Merge remote branch 'paparazzi/master' into nav
This commit is contained in:
Executable → Regular
Executable → Regular
@@ -1,8 +1,7 @@
|
|||||||
<!DOCTYPE airframe SYSTEM "airframe.dtd">
|
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
|
||||||
|
|
||||||
<!-- Funjet Multiplex (http://www.multiplex-rc.de/), Jeti ECO 25
|
<!-- Funjet Multiplex (http://www.multiplex-rc.de/), Jeti ECO 25
|
||||||
Tiny 2.11 board (http://paparazzi.enac.fr/wiki/index.php/Tiny_v2)
|
Tiny 2.11 board (http://paparazzi.enac.fr/wiki/index.php/Tiny_v2)
|
||||||
PerkinElmer TPS334 IR Sensors
|
|
||||||
Tilted infrared sensor (http://paparazzi.enac.fr/wiki/index.php/Image:Tiny_v2_1_Funjet.jpg)
|
Tilted infrared sensor (http://paparazzi.enac.fr/wiki/index.php/Image:Tiny_v2_1_Funjet.jpg)
|
||||||
XBee modem
|
XBee modem
|
||||||
Payload: Sensirion humidity/temp, VTI pressure/temp
|
Payload: Sensirion humidity/temp, VTI pressure/temp
|
||||||
@@ -11,7 +10,46 @@
|
|||||||
|
|
||||||
<airframe name="Funjet GFI 8 K68">
|
<airframe name="Funjet GFI 8 K68">
|
||||||
|
|
||||||
<!-- commands section -->
|
<firmware name="fixedwing">
|
||||||
|
<target name="ap" board="tiny_2.11"/>
|
||||||
|
<target name="sim" board="pc"/>
|
||||||
|
|
||||||
|
<define name="AGR_CLIMB"/>
|
||||||
|
<define name="LOITER_TRIM"/>
|
||||||
|
<define name="ALT_KALMAN"/>
|
||||||
|
<define name="WIND_INFO"/>
|
||||||
|
<define name="WIND_INFO_RET"/>
|
||||||
|
<define name="SENSOR_SYNC_SEND"/>
|
||||||
|
|
||||||
|
<!-- RC -->
|
||||||
|
<subsystem name="radio_control" type="ppm"/>
|
||||||
|
<!-- Communication -->
|
||||||
|
<subsystem name="telemetry" type="xbee_api"/>
|
||||||
|
<!-- Actuators are automatically chosen according to board-->
|
||||||
|
<subsystem name="control"/>
|
||||||
|
<!-- Sensors -->
|
||||||
|
<subsystem name="attitude" type="infrared"/>
|
||||||
|
<subsystem name="gps" type="ublox_lea5h"/>
|
||||||
|
<!-- Nav -->
|
||||||
|
<subsystem name="navigation"/>
|
||||||
|
<!-- Interfaces -->
|
||||||
|
<subsystem name="spi"/>
|
||||||
|
</firmware>
|
||||||
|
|
||||||
|
<!-- modules -->
|
||||||
|
<modules>
|
||||||
|
<load name="baro_scp.xml"/>
|
||||||
|
<load name="humid_sht.xml"/>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<firmware name="setup">
|
||||||
|
<target name="tunnel" board="tiny_2.11"/>
|
||||||
|
<target name="usb_tunnel_0" board="tiny_2.11"/>
|
||||||
|
<target name="usb_tunnel_1" board="tiny_2.11"/>
|
||||||
|
<target name="setup_actuators" board="tiny_2.11"/>
|
||||||
|
</firmware>
|
||||||
|
|
||||||
|
<!-- commands section -->
|
||||||
<servos>
|
<servos>
|
||||||
<servo name="MOTOR" no="0" min="1000" neutral="1000" max="2000"/>
|
<servo name="MOTOR" no="0" min="1000" neutral="1000" max="2000"/>
|
||||||
<servo name="AILEVON_LEFT" no="2" min="1900" neutral="1563" max="1100"/>
|
<servo name="AILEVON_LEFT" no="2" min="1900" neutral="1563" max="1100"/>
|
||||||
@@ -81,8 +119,6 @@
|
|||||||
<section name="BAT">
|
<section name="BAT">
|
||||||
<define name="MILLIAMP_AT_FULL_THROTTLE" value="10000."/>
|
<define name="MILLIAMP_AT_FULL_THROTTLE" value="10000."/>
|
||||||
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
|
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
|
||||||
<!-- 0.0247311828 -->
|
|
||||||
<!-- 0.02432905 -->
|
|
||||||
<define name="VoltageOfAdc(adc)" value="(0.02454*adc)"/>
|
<define name="VoltageOfAdc(adc)" value="(0.02454*adc)"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -91,8 +127,6 @@
|
|||||||
<define name="CARROT" value="5." unit="s"/>
|
<define name="CARROT" value="5." unit="s"/>
|
||||||
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
|
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
|
||||||
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
||||||
<!-- <define name="XBEE_INIT" value="\"ATPL2\rATRN1\rATTT80\r\""/> -->
|
|
||||||
<!-- <define name="NO_XBEE_API_INIT" value="TRUE"/> -->
|
|
||||||
<define name="ALT_KALMAN_ENABLED" value="FALSE"/>
|
<define name="ALT_KALMAN_ENABLED" value="FALSE"/>
|
||||||
|
|
||||||
<define name="TRIGGER_DELAY" value="1."/>
|
<define name="TRIGGER_DELAY" value="1."/>
|
||||||
@@ -125,7 +159,6 @@
|
|||||||
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
|
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
|
||||||
|
|
||||||
<define name="THROTTLE_SLEW" value="0.1"/>
|
<define name="THROTTLE_SLEW" value="0.1"/>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
||||||
@@ -140,10 +173,6 @@
|
|||||||
<define name="PITCH_DGAIN" value="0.4"/>
|
<define name="PITCH_DGAIN" value="0.4"/>
|
||||||
|
|
||||||
<define name="ELEVATOR_OF_ROLL" value="2400"/>
|
<define name="ELEVATOR_OF_ROLL" value="2400"/>
|
||||||
|
|
||||||
<!--define name="ROLL_ATTITUDE_GAIN" value="-7500"/>
|
|
||||||
<define name="ROLL_RATE_GAIN" value="-1500"/-->
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="NAV">
|
<section name="NAV">
|
||||||
@@ -168,79 +197,6 @@
|
|||||||
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
|
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
|
||||||
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
|
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
|
||||||
<define name="HOME_RADIUS" value="100" unit="m"/>
|
<define name="HOME_RADIUS" value="100" unit="m"/>
|
||||||
</section>
|
|
||||||
|
|
||||||
<section name="DATALINK" prefix="DATALINK_">
|
|
||||||
<define name="DEVICE_TYPE" value="XBEE"/>
|
|
||||||
<define name="DEVICE_ADDRESS" value="...."/>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="SIMU">
|
|
||||||
<define name="YAW_RESPONSE_FACTOR" value="0.5"/>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<makefile>
|
|
||||||
CONFIG = \"tiny_2_1.h\"
|
|
||||||
|
|
||||||
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
|
|
||||||
|
|
||||||
FLASH_MODE=IAP
|
|
||||||
|
|
||||||
ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
|
|
||||||
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
|
|
||||||
|
|
||||||
ap.srcs += commands.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
|
|
||||||
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DRADIO_CONTROL
|
|
||||||
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
|
|
||||||
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
|
|
||||||
|
|
||||||
#TRANSPARENT
|
|
||||||
#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
|
|
||||||
#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
|
|
||||||
|
|
||||||
|
|
||||||
ap.CFLAGS += -DINTER_MCU
|
|
||||||
ap.srcs += inter_mcu.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2
|
|
||||||
ap.srcs += $(SRC_ARCH)/adc_hw.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DUSE_GPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
|
|
||||||
# -DGPS_LED=2
|
|
||||||
ap.srcs += gps_ubx.c gps.c latlong.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DUSE_INFRARED -DALT_KALMAN -DWIND_INFO -DWIND_INFO_RET
|
|
||||||
ap.srcs += infrared.c estimator.c
|
|
||||||
|
|
||||||
ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
|
|
||||||
ap.srcs += subsystems/nav.c fw_h_ctl.c fw_v_ctl.c
|
|
||||||
|
|
||||||
ap.srcs += subsystems/navigation/nav_line.c
|
|
||||||
ap.srcs += subsystems/navigation/nav_survey_rectangle.c
|
|
||||||
|
|
||||||
ap.srcs += humid_sht.c
|
|
||||||
ap.CFLAGS += -DUSE_HUMID_SHT -DDAT_PIN=3 -DSCK_PIN=2
|
|
||||||
|
|
||||||
ap.srcs += baro_scp.c
|
|
||||||
ap.CFLAGS += -DUSE_BARO_SCP
|
|
||||||
|
|
||||||
ap.srcs += joystick.c
|
|
||||||
ap.CFLAGS += -DUSE_JOYSTICK
|
|
||||||
|
|
||||||
# Config for SITL simulation
|
|
||||||
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
|
|
||||||
sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
|
|
||||||
sim.srcs += subsystems/navigation/nav_line.c subsystems/navigation/nav_survey_rectangle.c
|
|
||||||
|
|
||||||
sim.srcs += joystick.c
|
|
||||||
sim.CFLAGS += -DUSE_JOYSTICK
|
|
||||||
|
|
||||||
|
|
||||||
</makefile>
|
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
|
||||||
|
|
||||||
|
<!-- Funjet Multiplex (http://www.multiplex-rc.de/), Jeti ECO 25
|
||||||
|
Lisa/L board (http://paparazzi.enac.fr/wiki/Lisa)
|
||||||
|
XBee modem
|
||||||
|
LEA 5H GPS
|
||||||
|
robbe R6107SP mk
|
||||||
|
-->
|
||||||
|
|
||||||
|
<airframe name="Funjet Lisa/L">
|
||||||
|
|
||||||
|
<firmware name="fixedwing">
|
||||||
|
<target name="sim" board="pc"/>
|
||||||
|
<target name="ap" board="lisa_l_1.0"/>
|
||||||
|
|
||||||
|
<subsystem name="radio_control" type="ppm"/>
|
||||||
|
<subsystem name="telemetry" type="transparent"/>
|
||||||
|
<subsystem name="control"/>
|
||||||
|
<subsystem name="attitude" type="infrared"/>
|
||||||
|
<subsystem name="gps" type="ublox_lea5h">
|
||||||
|
<param name="GPS_UART_NR" value="3"/>
|
||||||
|
</subsystem>
|
||||||
|
<subsystem name="navigation"/>
|
||||||
|
</firmware>
|
||||||
|
|
||||||
|
<firmware name="lisa_l_test_progs">
|
||||||
|
<target name="tunnel" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_led" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_uart" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_servos" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_telemetry" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_baro" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_imu_b2" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_imu_b2_2" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_imu_aspirin" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_rc_spektrum" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_rc_ppm" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_adc" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_hmc5843" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_itg3200" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_adxl345" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_esc_mkk_simple" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_esc_asctecv1_simple" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_actuators_mkk" board="lisa_l_1.0"/>
|
||||||
|
<target name="test_actuators_asctecv1" board="lisa_l_1.0"/>
|
||||||
|
</firmware>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<servos>
|
||||||
|
<servo name="MOTOR" no="0" min="1000" neutral="1000" max="2000"/>
|
||||||
|
<servo name="AILEVON_LEFT" no="1" min="1900" neutral="1534" max="1100"/>
|
||||||
|
<servo name="AILEVON_RIGHT" no="2" min="1100" neutral="1468" max="1900"/>
|
||||||
|
</servos>
|
||||||
|
|
||||||
|
<commands>
|
||||||
|
<axis name="THROTTLE" failsafe_value="0"/>
|
||||||
|
<axis name="ROLL" failsafe_value="0"/>
|
||||||
|
<axis name="PITCH" failsafe_value="0"/>
|
||||||
|
</commands>
|
||||||
|
|
||||||
|
<rc_commands>
|
||||||
|
<set command="THROTTLE" value="@THROTTLE"/>
|
||||||
|
<set command="ROLL" value="@ROLL"/>
|
||||||
|
<set command="PITCH" value="@PITCH"/>
|
||||||
|
</rc_commands>
|
||||||
|
|
||||||
|
<section name="MIXER">
|
||||||
|
<define name="AILEVON_AILERON_RATE" value="0.45"/>
|
||||||
|
<define name="AILEVON_ELEVATOR_RATE" value="0.8"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<command_laws>
|
||||||
|
<let var="aileron" value="@ROLL * AILEVON_AILERON_RATE"/>
|
||||||
|
<let var="elevator" value="@PITCH * AILEVON_ELEVATOR_RATE"/>
|
||||||
|
<set servo="MOTOR" value="@THROTTLE"/>
|
||||||
|
<set servo="AILEVON_LEFT" value="$elevator + $aileron"/>
|
||||||
|
<set servo="AILEVON_RIGHT" value="$elevator - $aileron"/>
|
||||||
|
</command_laws>
|
||||||
|
|
||||||
|
<section name="AUTO1" prefix="AUTO1_">
|
||||||
|
<define name="MAX_ROLL" value="RadOfDeg(50)"/>
|
||||||
|
<define name="MAX_PITCH" value="RadOfDeg(35)"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="INFRARED" prefix="IR_">
|
||||||
|
<define name="ADC_IR1_NEUTRAL" value="2048"/>
|
||||||
|
<define name="ADC_IR2_NEUTRAL" value="2048"/>
|
||||||
|
<define name="ADC_TOP_NEUTRAL" value="2048"/>
|
||||||
|
|
||||||
|
<define name="LATERAL_CORRECTION" value="-1"/>
|
||||||
|
<define name="LONGITUDINAL_CORRECTION" value="1"/>
|
||||||
|
<define name="VERTICAL_CORRECTION" value="1.5"/>
|
||||||
|
|
||||||
|
<define name="HORIZ_SENSOR_TILTED" value="1"/>
|
||||||
|
<define name="IR1_SIGN" value="1"/>
|
||||||
|
<define name="IR2_SIGN" value="-1"/>
|
||||||
|
<define name="TOP_SIGN" value="1"/>
|
||||||
|
|
||||||
|
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
|
||||||
|
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="BAT">
|
||||||
|
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="MISC">
|
||||||
|
<define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
|
||||||
|
<define name="CARROT" value="5." unit="s"/>
|
||||||
|
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
|
||||||
|
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
||||||
|
|
||||||
|
<define name="DEFAULT_CIRCLE_RADIUS" value="120."/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="VERTICAL CONTROL" prefix="V_CTL_">
|
||||||
|
<define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/>
|
||||||
|
<!-- outer loop proportional gain -->
|
||||||
|
<define name="ALTITUDE_PGAIN" value="-0.06"/> <!-- -0.024 -->
|
||||||
|
<!-- outer loop saturation -->
|
||||||
|
<define name="ALTITUDE_MAX_CLIMB" value="2."/>
|
||||||
|
|
||||||
|
<!-- auto throttle inner loop -->
|
||||||
|
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.45"/>
|
||||||
|
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.35"/>
|
||||||
|
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
|
||||||
|
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.2" unit="%/(m/s)"/>
|
||||||
|
<define name="AUTO_THROTTLE_PGAIN" value="-0.023"/> <!-- -0.012 -->
|
||||||
|
<define name="AUTO_THROTTLE_IGAIN" value="0.01"/>
|
||||||
|
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.05"/>
|
||||||
|
|
||||||
|
<!-- auto pitch inner loop -->
|
||||||
|
<define name="AUTO_PITCH_PGAIN" value="-0.06"/> <!-- -0.03 -->
|
||||||
|
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
|
||||||
|
<define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
|
||||||
|
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
|
||||||
|
|
||||||
|
<define name="THROTTLE_SLEW" value="0.1"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
||||||
|
<define name="COURSE_PGAIN" value="-0.9"/>
|
||||||
|
<define name="ROLL_MAX_SETPOINT" value="0.70" unit="radians"/> <!-- 0.5 -->
|
||||||
|
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/>
|
||||||
|
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>
|
||||||
|
|
||||||
|
<define name="ROLL_PGAIN" value="6600."/>
|
||||||
|
<define name="AILERON_OF_THROTTLE" value="0.0"/>
|
||||||
|
<define name="PITCH_PGAIN" value="-5500."/>
|
||||||
|
<define name="PITCH_DGAIN" value="0.4"/>
|
||||||
|
|
||||||
|
<define name="ELEVATOR_OF_ROLL" value="2400"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="NAV">
|
||||||
|
<define name="NAV_PITCH" value="0."/>
|
||||||
|
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="FAILSAFE" prefix="FAILSAFE_">
|
||||||
|
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
|
||||||
|
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
|
||||||
|
<define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
|
||||||
|
<define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
|
||||||
|
<define name="HOME_RADIUS" value="100" unit="m"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="SIMU">
|
||||||
|
<define name="YAW_RESPONSE_FACTOR" value="0.5"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</airframe>
|
||||||
Executable → Regular
Executable → Regular
+2
-1
@@ -189,8 +189,9 @@
|
|||||||
|
|
||||||
<firmware name="rotorcraft">
|
<firmware name="rotorcraft">
|
||||||
<target name="ap" board="lisa_l_1.0">
|
<target name="ap" board="lisa_l_1.0">
|
||||||
|
<define name="GPS_UART_NR" value="3"/>
|
||||||
<!-- <define name="BOOZ_START_DELAY" value="1"/> -->
|
<!-- <define name="BOOZ_START_DELAY" value="1"/> -->
|
||||||
<subsystem name="radio_control" type="spektrum"/>
|
<subsystem name="radio_control" type="ppm"/>
|
||||||
<subsystem name="actuators" type="mkk"/>
|
<subsystem name="actuators" type="mkk"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="sim" board="pc">
|
<target name="sim" board="pc">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# baro scp bits
|
# baro scp bits
|
||||||
ap.CFLAGS += -DUSE_BARO_SCP -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0
|
ap.CFLAGS += -DUSE_BARO_SCP -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0
|
||||||
ap.srcs += $(SRC_CSC)/csc_baro.c spi.c $(SRC_ARCH)/spi_hw.c
|
ap.srcs += $(SRC_CSC)/csc_baro.c mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||||
|
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ test_adc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=$(MODEM_PORT)
|
|||||||
test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||||
test_adc.srcs += downlink.c pprz_transport.c
|
test_adc.srcs += downlink.c pprz_transport.c
|
||||||
|
|
||||||
test_adc.srcs += $(SRC_ARCH)/adc_hw.c
|
test_adc.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
|
||||||
test_adc.CFLAGS += -DUSE_AD1 -DUSE_AD1_1
|
test_adc.CFLAGS += -DUSE_AD1 -DUSE_AD1_1
|
||||||
# -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
|
# -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
|
||||||
test_adc.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
test_adc.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
||||||
|
|||||||
@@ -103,12 +103,12 @@ stm_passthrough.CFLAGS += -DUSE_CAN1 \
|
|||||||
-DCAN_BS1_TQ=CAN_BS1_3tq \
|
-DCAN_BS1_TQ=CAN_BS1_3tq \
|
||||||
-DCAN_BS2_TQ=CAN_BS2_4tq \
|
-DCAN_BS2_TQ=CAN_BS2_4tq \
|
||||||
-DCAN_ERR_RESUME=DISABLE
|
-DCAN_ERR_RESUME=DISABLE
|
||||||
stm_passthrough.srcs += can.c $(SRC_ARCH)/can_hw.c
|
stm_passthrough.srcs += mcu_periph/can.c $(SRC_ARCH)/mcu_periph/can_arch.c
|
||||||
stm_passthrough.srcs += $(SRC_CSC)/csc_protocol.c
|
stm_passthrough.srcs += $(SRC_CSC)/csc_protocol.c
|
||||||
|
|
||||||
# ADC
|
# ADC
|
||||||
|
|
||||||
stm_passthrough.srcs += $(SRC_ARCH)/adc_hw.c
|
stm_passthrough.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
|
||||||
stm_passthrough.CFLAGS += -DUSE_AD1 \
|
stm_passthrough.CFLAGS += -DUSE_AD1 \
|
||||||
-DUSE_AD1_1 \
|
-DUSE_AD1_1 \
|
||||||
-DUSE_AD1_2 \
|
-DUSE_AD1_2 \
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ ap.ARCHDIR = $(ARCH)
|
|||||||
ap.CFLAGS += $(ROTORCRAFT_INC)
|
ap.CFLAGS += $(ROTORCRAFT_INC)
|
||||||
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
|
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
|
||||||
ap.srcs = $(SRC_FIRMWARE)/main.c
|
ap.srcs = $(SRC_FIRMWARE)/main.c
|
||||||
|
ap.srcs += mcu.c
|
||||||
|
ap.srcs += $(SRC_ARCH)/mcu_arch.c
|
||||||
|
|
||||||
ifeq ($(ARCH), stm32)
|
ifeq ($(ARCH), stm32)
|
||||||
ap.srcs += lisa/plug_sys.c
|
ap.srcs += lisa/plug_sys.c
|
||||||
@@ -90,7 +92,7 @@ endif
|
|||||||
#
|
#
|
||||||
# Telemetry/Datalink
|
# Telemetry/Datalink
|
||||||
#
|
#
|
||||||
ap.srcs += $(SRC_ARCH)/uart_hw.c
|
ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||||
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
|
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
|
||||||
ap.CFLAGS += -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
ap.CFLAGS += -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||||
ap.srcs += $(SRC_FIRMWARE)/telemetry.c \
|
ap.srcs += $(SRC_FIRMWARE)/telemetry.c \
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sim.srcs += latlong.c\
|
|||||||
commands.c\
|
commands.c\
|
||||||
gps.c\
|
gps.c\
|
||||||
inter_mcu.c\
|
inter_mcu.c\
|
||||||
infrared.c\
|
subsystems/sensors/infrared.c\
|
||||||
$(SRC_FIRMWARE)/stabilization/stabilization_attitude.c\
|
$(SRC_FIRMWARE)/stabilization/stabilization_attitude.c\
|
||||||
$(SRC_FIRMWARE)/guidance/guidance_v.c \
|
$(SRC_FIRMWARE)/guidance/guidance_v.c \
|
||||||
subsystems/nav.c\
|
subsystems/nav.c\
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ endif
|
|||||||
|
|
||||||
jsbsim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO -Ifirmwares/fixedwing
|
jsbsim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DUSE_INFRARED -DNAV -DLED -DWIND_INFO -Ifirmwares/fixedwing
|
||||||
jsbsim.srcs = $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/jsbsim_ir.c $(SRC_ARCH)/jsbsim_transport.c $(SRC_ARCH)/ivy_transport.c
|
jsbsim.srcs = $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/jsbsim_ir.c $(SRC_ARCH)/jsbsim_transport.c $(SRC_ARCH)/ivy_transport.c
|
||||||
jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c infrared.c \
|
jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c \
|
||||||
$(SRC_FIXEDWING)/stabilization/stabilization_attitude.c \
|
$(SRC_FIXEDWING)/stabilization/stabilization_attitude.c \
|
||||||
$(SRC_FIXEDWING)/guidance/guidance_v.c\
|
$(SRC_FIXEDWING)/guidance/guidance_v.c\
|
||||||
subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c
|
subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
sim.ARCHDIR = $(ARCH)
|
sim.ARCHDIR = $(ARCH)
|
||||||
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DDOWNLINK_AP_DEVICE=SimUart -DDOWNLINK_FBW_DEVICE=SimUart -DDATALINK=PPRZ
|
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DDOWNLINK_AP_DEVICE=SimUart -DDOWNLINK_FBW_DEVICE=SimUart -DDATALINK=PPRZ
|
||||||
sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c subsystems/nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c datalink.c
|
sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c datalink.c
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
sim.ARCHDIR = $(ARCH)
|
sim.ARCHDIR = $(ARCH)
|
||||||
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=XBeeTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DSIM_XBEE -DXBEE_UART=SimUart
|
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=XBeeTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DSIM_XBEE -DXBEE_UART=SimUart
|
||||||
sim.srcs = radio_control.c downlink.c xbee.c commands.c gps.c inter_mcu.c infrared.c $(SRC_FIXEDWING)/stabilization/stabilization_attitude.c $(SRC_FIXEDWING)/guidance/guidance_v.c subsystems/nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c
|
sim.srcs = radio_control.c downlink.c xbee.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIXEDWING)/stabilization/stabilization_attitude.c $(SRC_FIXEDWING)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ endif
|
|||||||
ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES)
|
ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES)
|
||||||
|
|
||||||
$(TARGET).CFLAGS += -DUSE_INFRARED
|
$(TARGET).CFLAGS += -DUSE_INFRARED
|
||||||
$(TARGET).srcs += $(SRC_FIXEDWING)/infrared.c
|
$(TARGET).srcs += subsystems/sensors/infrared.c
|
||||||
|
|
||||||
sim.srcs += $(SRC_ARCH)/sim_ir.c
|
sim.srcs += $(SRC_ARCH)/sim_ir.c
|
||||||
jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
|
jsbsim.srcs += $(SRC_ARCH)/jsbsim_ir.c
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
# temporary hack for ADCs
|
# temporary hack for ADCs
|
||||||
ifeq ($(ARCH), stm32)
|
ifeq ($(ARCH), stm32)
|
||||||
$(TARGET).CFLAGS += -DSTM32
|
# FIXME : this is for the battery
|
||||||
$(TARGET).CFLAGS += -DUSE_AD1_3
|
$(TARGET).CFLAGS += -DUSE_AD1_3
|
||||||
endif
|
endif
|
||||||
#
|
#
|
||||||
@@ -37,8 +37,12 @@ endif
|
|||||||
#
|
#
|
||||||
|
|
||||||
$(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
$(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||||
|
$(TARGET).CFLAGS += -DPERIPHERALS_AUTO_INIT
|
||||||
$(TARGET).CFLAGS += $(FIXEDWING_INC)
|
$(TARGET).CFLAGS += $(FIXEDWING_INC)
|
||||||
|
|
||||||
|
$(TARGET).srcs += mcu.c
|
||||||
|
$(TARGET).srcs += $(SRC_ARCH)/mcu_arch.c
|
||||||
|
|
||||||
#
|
#
|
||||||
# Common Options
|
# Common Options
|
||||||
#
|
#
|
||||||
@@ -54,7 +58,7 @@ $(TARGET).CFLAGS += -DTRAFFIC_INFO
|
|||||||
# LEDs
|
# LEDs
|
||||||
#
|
#
|
||||||
|
|
||||||
$(TARGET).CFLAGS += -DLED
|
$(TARGET).CFLAGS += -DUSE_LED
|
||||||
ifneq ($(ARCH), lpc21)
|
ifneq ($(ARCH), lpc21)
|
||||||
ifneq ($(ARCH), jsbsim)
|
ifneq ($(ARCH), jsbsim)
|
||||||
$(TARGET).srcs += $(SRC_ARCH)/led_hw.c
|
$(TARGET).srcs += $(SRC_ARCH)/led_hw.c
|
||||||
@@ -126,7 +130,7 @@ ns_srcs += $(SRC_ARCH)/sys_time_hw.c
|
|||||||
# UARTS
|
# UARTS
|
||||||
#
|
#
|
||||||
|
|
||||||
ns_srcs += $(SRC_ARCH)/uart_hw.c
|
ns_srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||||
|
|
||||||
#
|
#
|
||||||
# ANALOG
|
# ANALOG
|
||||||
@@ -134,10 +138,7 @@ ns_srcs += $(SRC_ARCH)/uart_hw.c
|
|||||||
|
|
||||||
ns_CFLAGS += -DADC
|
ns_CFLAGS += -DADC
|
||||||
#ifeq ($(ARCH), lpc21)
|
#ifeq ($(ARCH), lpc21)
|
||||||
ns_srcs += $(SRC_ARCH)/adc_hw.c
|
ns_srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
|
||||||
#else ifeq ($(ARCH), stm32)
|
|
||||||
# ns_srcs += lisa/lisa_analog_plug.c
|
|
||||||
#endif
|
|
||||||
ifeq ($(ARCH), stm32)
|
ifeq ($(ARCH), stm32)
|
||||||
ns_CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
ns_CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
||||||
endif
|
endif
|
||||||
@@ -207,9 +208,9 @@ jsbsim.srcs += downlink.c datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsi
|
|||||||
|
|
||||||
ifeq ($(BOARD),classix)
|
ifeq ($(BOARD),classix)
|
||||||
fbw.CFLAGS += -DMCU_SPI_LINK -DUSE_SPI -DSPI_SLAVE
|
fbw.CFLAGS += -DMCU_SPI_LINK -DUSE_SPI -DSPI_SLAVE
|
||||||
fbw.srcs += $(SRC_FIXEDWING)/link_mcu.c $(SRC_FIXEDWING)/spi.c $(SRC_ARCH)/spi_hw.c
|
fbw.srcs += $(SRC_FIXEDWING)/link_mcu.c mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||||
ap.CFLAGS += -DMCU_SPI_LINK -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0
|
ap.CFLAGS += -DMCU_SPI_LINK -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0
|
||||||
ap.srcs += $(SRC_FIXEDWING)/link_mcu.c $(SRC_FIXEDWING)/spi.c $(SRC_ARCH)/spi_hw.c
|
ap.srcs += $(SRC_FIXEDWING)/link_mcu.c mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||||
else
|
else
|
||||||
# Single MCU's run both
|
# Single MCU's run both
|
||||||
ap.CFLAGS += $(fbw_CFLAGS)
|
ap.CFLAGS += $(fbw_CFLAGS)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
#generic i2c driver
|
#generic i2c driver
|
||||||
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += mcu_periph/i2c.c
|
||||||
sim.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
sim.srcs += mcu_periph/i2c.c
|
||||||
|
sim.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#generic spi driver
|
#generic spi driver
|
||||||
$(TARGET).CFLAGS += -DUSE_SPI
|
$(TARGET).CFLAGS += -DUSE_SPI
|
||||||
|
|
||||||
ap.srcs += spi.c $(SRC_ARCH)/spi_hw.c
|
ap.srcs += mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||||
sim.srcs += spi.c $(SRC_ARCH)/spi_hw.c
|
sim.srcs += mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DADC -DUSE_ADC_
|
|||||||
test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
|
test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
|
||||||
test_adcs.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
|
test_adcs.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
|
||||||
|
|
||||||
test_adcs.srcs += sys_time.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c test/test_adcs.c
|
test_adcs.srcs += sys_time.c $(SRC_ARCH)/mcu_periph/adc_arch.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c test/test_adcs.c
|
||||||
# pprz_transport.c
|
# pprz_transport.c
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# asctec controllers
|
# asctec controllers
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||||
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += mcu_periph/i2c.c
|
||||||
|
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|
||||||
ifeq ($(ARCH), lpc21)
|
ifeq ($(ARCH), lpc21)
|
||||||
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
|
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
|
||||||
@@ -16,5 +17,6 @@ endif
|
|||||||
# Simulator
|
# Simulator
|
||||||
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||||
sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
|
sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
|
||||||
sim.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
sim.srcs += mcu_periph/i2c.c
|
||||||
|
sim.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
ap.CFLAGS += -DACTUATORS_ASCTEC_V2_PROTOCOL
|
ap.CFLAGS += -DACTUATORS_ASCTEC_V2_PROTOCOL
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||||
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += mcu_periph/i2c.c
|
||||||
|
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|
||||||
ifeq ($(ARCH), lpc21)
|
ifeq ($(ARCH), lpc21)
|
||||||
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
|
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_heli.c
|
|||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
|
||||||
|
|
||||||
# fixme : this is needed by baro and usualy added by actuators_mkk or actuators_asctec
|
# fixme : this is needed by baro and usualy added by actuators_mkk or actuators_asctec
|
||||||
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
#
|
#
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
||||||
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
ap.srcs += mcu_periph/i2c.c
|
||||||
|
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|
||||||
ifeq ($(ARCH), lpc21)
|
ifeq ($(ARCH), lpc21)
|
||||||
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
|
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
|
||||||
@@ -42,4 +43,5 @@ endif
|
|||||||
sim.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
sim.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
||||||
sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10 -DACTUATORS_MKK_DEVICE=i2c1
|
sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10 -DACTUATORS_MKK_DEVICE=i2c1
|
||||||
sim.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
sim.srcs += mcu_periph/i2c.c
|
||||||
|
sim.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ endif
|
|||||||
|
|
||||||
ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind
|
ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind
|
||||||
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\"
|
ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\"
|
||||||
ifeq ($(BOARD), booz)
|
ifeq ($(ARCH), lpc21)
|
||||||
ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL)
|
ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL)
|
||||||
endif
|
endif
|
||||||
ifdef RADIO_CONTROL_LED
|
ifdef RADIO_CONTROL_LED
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ ADC_IR2 = 2
|
|||||||
ADC_IR2_CHAN = 1
|
ADC_IR2_CHAN = 1
|
||||||
endif
|
endif
|
||||||
ifndef ADC_IR3
|
ifndef ADC_IR3
|
||||||
ADC_IR_TOP = 3
|
ADC_IR_TOP = 4
|
||||||
ADC_IR_TOP_CHAN = 2
|
ADC_IR_TOP_CHAN = 3
|
||||||
endif
|
endif
|
||||||
ifndef ADC_IR_NB_SAMPLES
|
ifndef ADC_IR_NB_SAMPLES
|
||||||
ADC_IR_NB_SAMPLES = 16
|
ADC_IR_NB_SAMPLES = 16
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
|
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
|
||||||
|
|
||||||
<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="400" name="Booz Test Enac" security_height="2">
|
<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="400" name="Booz Test Enac" security_height="2">
|
||||||
<header>
|
|
||||||
#include "booz_fms.h"
|
|
||||||
</header>
|
|
||||||
<waypoints>
|
<waypoints>
|
||||||
<waypoint name="HOME" x="0.0" y="0.0"/>
|
<waypoint name="HOME" x="0.0" y="0.0"/>
|
||||||
<waypoint name="CLIMB" x="0.0" y="5.0"/>
|
<waypoint name="CLIMB" x="0.0" y="5.0"/>
|
||||||
@@ -63,15 +60,6 @@
|
|||||||
<block name="circle">
|
<block name="circle">
|
||||||
<circle radius="nav_radius" wp="p1"/>
|
<circle radius="nav_radius" wp="p1"/>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<!--
|
|
||||||
<block name="Joystick" pre_call="NavUpdateWPFromFms(WP_p1)" strip_button="Joystick" strip_icon="joystick.png">
|
|
||||||
<set var="fms.enabled" value="TRUE"/>
|
|
||||||
<call fun="NavSetWaypointHere(WP_p1)"/>
|
|
||||||
<stay wp="p1"/>
|
|
||||||
</block>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
|
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
|
||||||
<call fun="NavSetWaypointHere(WP_TD)"/>
|
<call fun="NavSetWaypointHere(WP_TD)"/>
|
||||||
</block>
|
</block>
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
<event fun="baro_scp_event()"/>
|
<event fun="baro_scp_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
<file name="baro_scp.c"/>
|
<file name="baro_scp.c"/>
|
||||||
|
<flag name="SPI_MASTER"/>
|
||||||
|
<flag name="USE_SPI"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
</dl_settings>
|
</dl_settings>
|
||||||
|
|
||||||
<dl_settings NAME="Infrared">
|
<dl_settings NAME="Infrared">
|
||||||
<dl_setting MAX="15" MIN="-15" STEP="1" VAR="ir_roll_neutral" shortname="roll neutral" module="infrared" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad" alt_unit="deg" alt_unit_coef="57.3"/>
|
<dl_setting MAX="15" MIN="-15" STEP="1" VAR="ir_roll_neutral" shortname="roll neutral" module="subsystems/sensors/infrared" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad" alt_unit="deg" alt_unit_coef="57.3"/>
|
||||||
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch neutral" module="infrared" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch neutral" module="subsystems/sensors/infrared" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
</dl_settings>
|
</dl_settings>
|
||||||
</dl_settings>
|
</dl_settings>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
|
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="infrared" param="IR_LATERAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="subsystems/sensors/infrared" param="IR_LATERAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral"/>
|
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral"/>
|
||||||
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral"/>
|
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral"/>
|
||||||
|
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="infrared"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="subsystems/sensors/infrared"/>
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr"/>
|
||||||
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr"/>
|
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr"/>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
|
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="infrared" param="IR_LATERAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="subsystems/sensors/infrared" param="IR_LATERAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.3" MIN="-0.3" STEP="0.01" VAR="ir_roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
<dl_setting MAX="0.5" MIN="-0.3" STEP="0.01" VAR="ir_pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad"/>
|
||||||
|
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="infrared" param="IR_LATERAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_lateral_correction" shortname="360_lat_corr" module="subsystems/sensors/infrared" param="IR_LATERAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="ir_longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
|
||||||
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="ir_vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
#ifndef _6DOF_H
|
|
||||||
#define _6DOF_H
|
|
||||||
|
|
||||||
#define AXIS_X 0
|
|
||||||
#define AXIS_Y 1
|
|
||||||
#define AXIS_Z 2
|
|
||||||
#define AXIS_NB 3
|
|
||||||
|
|
||||||
#define AXIS_P 0
|
|
||||||
#define AXIS_Q 1
|
|
||||||
#define AXIS_R 2
|
|
||||||
|
|
||||||
#define AXIS_U 0
|
|
||||||
#define AXIS_V 1
|
|
||||||
#define AXIS_W 2
|
|
||||||
|
|
||||||
#define EULER_PHI 0
|
|
||||||
#define EULER_THETA 1
|
|
||||||
#define EULER_PSI 2
|
|
||||||
#define EULER_NB 3
|
|
||||||
|
|
||||||
#define QUAT_QI 0
|
|
||||||
#define QUAT_QX 1
|
|
||||||
#define QUAT_QY 2
|
|
||||||
#define QUAT_QZ 3
|
|
||||||
#define QUAT_NB 4
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* _6DOF_H */
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef AGL_VFILTER_H
|
#ifndef AGL_VFILTER_H
|
||||||
#define AGL_VFILTER_H
|
#define AGL_VFILTER_H
|
||||||
|
|
||||||
#include "adc.h"
|
#include "mcu_periph/adc.h"
|
||||||
|
|
||||||
#define STATE_SIZE 3
|
#define STATE_SIZE 3
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include "adc.h"
|
#include "mcu_periph/adc.h"
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include CONFIG
|
#include CONFIG
|
||||||
#include "spi.h"
|
#include "mcu_periph/spi.h"
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
* \brief avr uart low level functions
|
* \brief avr uart low level functions
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "uart.h"
|
#include "mcu_periph/uart.h"
|
||||||
#include "sys_time.h"
|
#include "sys_time.h"
|
||||||
|
|
||||||
#define B2400 2400UL
|
#define B2400 2400UL
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "armVIC.h"
|
#include "armVIC.h"
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
#include "spi_hw.h"
|
#include "mcu_periph/spi.h"
|
||||||
|
|
||||||
#define ADS8344_SS_IODIR IO0DIR
|
#define ADS8344_SS_IODIR IO0DIR
|
||||||
#define ADS8344_SS_IOSET IO0SET
|
#define ADS8344_SS_IOSET IO0SET
|
||||||
|
|||||||
@@ -1,64 +1,40 @@
|
|||||||
/*
|
/*
|
||||||
* Paparazzi $Id$
|
* Paparazzi lpc21 arch dependant microcontroller initialisation function
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Pascal Brisset, Antoine Drouin
|
* Copyright (C) 2010 The Paparazzi team
|
||||||
*
|
*
|
||||||
* This file is part of paparazzi.
|
* This file is part of Paparazzi.
|
||||||
*
|
*
|
||||||
* paparazzi is free software; you can redistribute it and/or modify
|
* Paparazzi is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* paparazzi is distributed in the hope that it will be useful,
|
* Paparazzi is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with paparazzi; see the file COPYING. If not, write to
|
* along with Paparazzi; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
#include "mcu.h"
|
||||||
*\brief ARM7 low level hardware initialisation
|
|
||||||
* PLL, MAM, VIC
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef INIT_HW_H
|
|
||||||
#define INIT_HW_H
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include BOARD_CONFIG
|
#include BOARD_CONFIG
|
||||||
#include "LPC21xx.h"
|
#include "LPC21xx.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef PERIPHERALS_AUTO_INIT
|
|
||||||
#if defined LED || defined USE_LED
|
|
||||||
#include "led.h"
|
|
||||||
#endif
|
|
||||||
#if defined USE_UART0 || defined USE_UART1
|
|
||||||
#include "uart.h"
|
|
||||||
#endif
|
|
||||||
#ifdef USE_USB_SERIAL
|
|
||||||
#include "usb_serial.h"
|
|
||||||
#endif
|
|
||||||
#if defined USE_I2C0 || defined USE_I2C1
|
|
||||||
#include "i2c.h"
|
|
||||||
#endif
|
|
||||||
#endif /* PERIPHERALS_AUTO_INIT */
|
|
||||||
|
|
||||||
|
|
||||||
/* declare functions and values from crt0.S & the linker control file */
|
/* declare functions and values from crt0.S & the linker control file */
|
||||||
extern void reset(void);
|
extern void reset(void);
|
||||||
/* extern void exit(void); */
|
|
||||||
extern void abort(void);
|
|
||||||
|
|
||||||
|
void mcu_arch_init(void) {
|
||||||
|
|
||||||
static inline void hw_init(void) {
|
|
||||||
/* set PLL multiplier & divisor. */
|
/* set PLL multiplier & divisor. */
|
||||||
/* values computed from config.h */
|
/* values computed from config.h */
|
||||||
PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL;
|
PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL;
|
||||||
@@ -82,24 +58,12 @@ static inline void hw_init(void) {
|
|||||||
MAMTIM = MAMTIM_CYCLES;
|
MAMTIM = MAMTIM_CYCLES;
|
||||||
MAMCR = MAMCR_FULL;
|
MAMCR = MAMCR_FULL;
|
||||||
|
|
||||||
/* setup & enable the MAM */
|
|
||||||
MAMTIM = MAMTIM_CYCLES;
|
|
||||||
MAMCR = MAMCR_FULL;
|
|
||||||
|
|
||||||
/* set the peripheral bus speed */
|
/* set the peripheral bus speed */
|
||||||
/* value computed from config.h */
|
/* value computed from config.h */
|
||||||
VPBDIV = VPBDIV_VALUE;
|
VPBDIV = VPBDIV_VALUE;
|
||||||
|
|
||||||
/* set the interrupt controller defaults */
|
/* set the interrupt controller to flash */
|
||||||
//#if defined(RAM_RUN)
|
|
||||||
/* map interrupt vectors space into SRAM */
|
|
||||||
// MEMMAP = MEMMAP_SRAM;
|
|
||||||
//#elif defined(ROM_RUN)
|
|
||||||
/* map interrupt vectors space into FLASH */
|
|
||||||
MEMMAP = MEMMAP_FLASH;
|
MEMMAP = MEMMAP_FLASH;
|
||||||
//#else
|
|
||||||
//#error RUN_MODE not defined!
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
/* clear all interrupts */
|
/* clear all interrupts */
|
||||||
VICIntEnClear = 0xFFFFFFFF;
|
VICIntEnClear = 0xFFFFFFFF;
|
||||||
@@ -108,29 +72,4 @@ static inline void hw_init(void) {
|
|||||||
/* point unvectored IRQs to reset() */
|
/* point unvectored IRQs to reset() */
|
||||||
VICDefVectAddr = (uint32_t)reset;
|
VICDefVectAddr = (uint32_t)reset;
|
||||||
|
|
||||||
|
|
||||||
#ifdef PERIPHERALS_AUTO_INIT
|
|
||||||
#if defined LED || defined USE_LED
|
|
||||||
led_init();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_UART0
|
|
||||||
uart0_init();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_UART1
|
|
||||||
uart1_init();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_USB_SERIAL
|
|
||||||
VCOM_init();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_I2C0
|
|
||||||
i2c0_init();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_I2C1
|
|
||||||
i2c1_init();
|
|
||||||
#endif
|
|
||||||
#endif /* PERIPHERALS_AUTO_INIT */
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* INIT_HW_H */
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Paparazzi lpc21 arch dependant microcontroller initialisation functions
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 The Paparazzi team
|
||||||
|
*
|
||||||
|
* 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, write to
|
||||||
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LPC21_MCU_ARCH_H
|
||||||
|
#define LPC21_MCU_ARCH_H
|
||||||
|
|
||||||
|
extern void mcu_arch_init(void);
|
||||||
|
|
||||||
|
#include "armVIC.h"
|
||||||
|
|
||||||
|
#define mcu_int_enable() enableIRQ()
|
||||||
|
#define mcu_int_disable() disableIRQ()
|
||||||
|
|
||||||
|
#endif /* LPC21_MCU_ARCH_H */
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "adc.h"
|
#include "mcu_periph/adc.h"
|
||||||
|
|
||||||
#include "LPC21xx.h"
|
#include "LPC21xx.h"
|
||||||
#include "armVIC.h"
|
#include "armVIC.h"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "i2c.h"
|
#include "mcu_periph/i2c.h"
|
||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
#include "interrupt_hw.h"
|
#include "interrupt_hw.h"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
* for now only SPI1 ( aka SSP )
|
* for now only SPI1 ( aka SSP )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "spi.h"
|
#include "mcu_periph/spi.h"
|
||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
#include "LPC21xx.h"
|
#include "LPC21xx.h"
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user