1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

145 Commits

Author SHA1 Message Date
Stacey Sheldon
7e6a222a8e usb serial: refactor serial number construction
Use new PIOS_USB_UTIL_AsciiToUtf8() function to compose the
USB serial number rather than repeating that code for each
board.

All boards now append "+FW" or "+BL" to their USB serial numbers
to allow the descriptors to differ between FW and BL images.
2012-05-19 16:15:47 -04:00
James Cotton
311cbe37d2 Reenable PIOS_ADC for coptercontrol 2012-05-01 00:30:41 -05:00
James Cotton
bb41bc1472 Add no for DIAG_TASKS to make file to make it easier not to miss. 2012-04-03 02:07:04 -05:00
James Cotton
1415728762 Get the MPU6000 CC3D working. Right now the ADC system is commented out, which
will break regular CC.
2012-04-03 02:07:03 -05:00
James Cotton
c7ff2a46c7 Merge remote-tracking branch 'origin/laurent/modelview' into revolution
Conflicts:
	flight/CopterControl/Makefile
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
2012-03-22 02:58:24 -05:00
Stacey Sheldon
0684a42fac build: use board-specific JTAG interface for openocd
Removes hard-coding of JTAG interface config in the
<board>_program make macros.

This allows the use of STLINKv2 for F4 boards while
continuing to use the FOSS JTAG revB on F1 boards.
2012-03-03 08:43:01 -05:00
Oleg Semyonov
e62cc8914c Merge remote branch 'origin/next' into os/features/pid-tuning-from-transmitter-next
Conflicts:
	flight/CopterControl/Makefile
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
	ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
	shared/uavobjectdefinition/hwsettings.xml
2012-02-22 23:03:17 +02:00
Stacey Sheldon
e2939dae2a revo usb: Add support for USB to Revo 2012-02-07 02:25:31 -05:00
James Cotton
0da20bb846 Flash: Because most of the commands are a JEDEC standard rename this file
pios_flash_jedec and abstract out the methods that can vary between chips.
2012-01-25 00:23:24 -06:00
James Cotton
e9552065a9 Reenable the CC3D sensors 2012-01-24 11:03:33 -06:00
James Cotton
c242ab8b86 Merge branch 'next' into revolution3
Conflicts:
	flight/AHRS/ahrs.c
	flight/AHRS/pios_board.c
	flight/Bootloaders/Revolution/Makefile
	flight/CopterControl/System/pios_board.c
	flight/INS/pios_board.c
	flight/OpenPilot/Makefile
	flight/OpenPilot/System/openpilot.c
	flight/OpenPilot/System/pios_board.c
	flight/PiOS/Boards/STM32103CB_CC_Rev1.h
	flight/PiOS/Boards/STM32F4xx_Revolution.h
	flight/Revolution/Makefile
	flight/Revolution/System/inc/pios_config.h
	flight/Revolution/test.c
2012-01-24 10:46:35 -06:00
James Cotton
486cdb5dbb Got CC running again although with altitude and bmp085 disabled as well as the
CC3D drivers.
2012-01-24 10:32:42 -06:00
James Cotton
0cb6b13d33 Add BMA180 to CopterControl 3D. Had to reduce the stack space by 256 bytes.
Some can be reclaimed by making the BMA180 allocate its fifo dynamically but
I'll do that later when it uses FreeRTOS queues for the FIFO.
2012-01-24 09:23:12 -06:00
James Cotton
11471ff68b Update drivers for CC to the new EXTI system and SPI calls 2012-01-24 09:23:12 -06:00
James Cotton
a20d654744 Update the attitude algorithm for CC to use the Gyros and Accels UAVObjects
instead of AttitudeRaw
2012-01-24 09:23:12 -06:00
James Cotton
5fd458426a Merge branch 'cc3d' into revolution3
Conflicts:
	flight/PiOS/inc/pios_l3gd20.h
	flight/PiOS/pios.h
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
2012-01-23 22:09:45 -06:00
James Cotton
d864b481a1 Fix a few more merge conflicts 2012-01-23 04:47:35 -06:00
Stacey Sheldon
dc4aa07a32 board_hw_defs: factor out board-specific hw config definitions
Board specific HW configuration is now collected in a single .c
file for each board.  This HW configuration is #include'd into
the FW, BL and BU builds for each board.

These new .c files are found in:
  flight/board_hw_defs/<board_name>/board_hw_defs.c

Parts of this information were previously duplicated between
the BL and FW builds.  This commit cleans up the duplication.

Using a #include on a .c file is a bit ugly but it allows us
to ensure that all of the symbols in the board_hw_defs.c file
are *ONLY* used in the PIOS_Board_Init() function for each
software build.
2012-01-22 19:41:41 -05:00
James Cotton
bb0bfe0ae4 Merge branch 'next' into revolution3
Conflicts:
	flight/Bootloaders/CopterControl/Makefile
	flight/Bootloaders/PipXtreme/Makefile
	flight/Bootloaders/Revolution/inc/pios_config.h
	flight/CopterControl/Makefile
	flight/INS/inc/pios_config.h
	flight/Libraries/taskmonitor.c
	flight/Modules/Altitude/altitude.c
	flight/Modules/Attitude/attitude.c
	flight/OpenPilot/Makefile
	flight/OpenPilot/Makefile.posix
	flight/OpenPilot/System/inc/pios_usb_board_data.h
	flight/OpenPilot/System/inc/taskmonitor.h
	flight/OpenPilot/System/pios_board.c
	flight/OpenPilot/System/taskmonitor.c
	flight/PiOS/Boards/STM32F4xx_Revolution.h
	flight/PiOS/STM32F4xx/pios_bmp085.c
	flight/PiOS/STM32F4xx/pios_iap.c
	flight/PiOS/pios.h
	flight/Revolution/System/inc/pios_config.h
	flight/Revolution/System/inc/taskmonitor.h
	flight/Revolution/System/taskmonitor.c
	ground/openpilotgcs/src/plugins/serialconnection/serialplugin.cpp
	shared/uavobjectdefinition/systemalarms.xml
	shared/uavobjectdefinition/taskinfo.xml
2012-01-21 11:27:03 -06:00
James Cotton
a5d006d1a9 Set up the SPI interface to the l3gd20 2012-01-20 14:20:37 -06:00
Stacey Sheldon
64202ce092 Merge remote-tracking branch 'origin/stac/i2c_decoupling' into next 2012-01-17 22:35:36 -05:00
Stacey Sheldon
8cd4816d7b taskmonitor: move taskmonitor into flight/Libraries
taskmonitor.[ch] existed as (nearly) identical copies under
CC and OP directories.  Both builds now reference the common
version under Libraries.
2012-01-15 21:37:10 -05:00
Stacey Sheldon
387ea77d30 diagnostics: enable DIAG_TASKS on OP board by default 2012-01-15 18:16:50 -05:00
Stacey Sheldon
27ceb7ea92 modules: Allow optional modules to be used as built-in
Some modules are written such that they can be included
or excluded at runtime.  These are added to the OPTMODULES
list in the makefile for a given board.

This change provides a mechanism to allow a build to force
a given module to be built-in (ie. always initialized)
regardless of the configuration in hwsettings.

The main use case for this is to handle a module being optional
on one platform but essential on another.

All modules added to the MODULES list in the Makefile will
automatically result in a matching #define in the form
  MODULE_TheModuleName_BUILTIN
being defined in the CFLAGS for all compiled source.

Note that the capitalization of TheModuleName must match
exactly the capitalization used in the MODULES list.
2012-01-14 16:55:55 -05:00
Stacey Sheldon
53e9ef06b4 altitude: add optional altitude module 2012-01-14 15:38:56 -05:00
Stacey Sheldon
a51bf72bc7 usb: allow runtime selection of USB descriptors via hwsettings 2012-01-14 14:28:15 -05:00
Stacey Sheldon
b94f4b49a4 usb: major refactoring of USB descriptors, CDC and HID
Summary of changes:
 * USB CDC and HID drivers are completely split apart.
   * This will allow different max buffer sizes for HID and CDC.
 * USB descriptors have been overhauled:
   * Proper structs/macros/enums declared for USB (see pios_usb_defs.h)
   * Two common descriptor definitions.  One for HID+CDC another for HID only.
     See pios_usb_desc_{hid_cdc,hid_only}.c for details.
   * Long standing bugs in OP USB descriptors became much more obvious with the
     new struct definitions.
   * Board specific USB initialization is now in pios_usb_board_data.h in each build target.
   * Definition of USB descriptors is now entirely indpendent of STM32 libs.
     Glue into STM32 libs is provided by pios_usbhook.c.
 * Removed a lot of stale/irrelevant USB #defines throughout the tree.
 * Improved naming consistency throughout USB code:
   * PIOS_USB_HID_* now refers to the HID endpoint code.
   * PIOS_USB_CDC_* now refers to the CDC endpoint code.
   * PIOS_USB_* now refers to the low-level USB code.
   * PIOS_USB_BOARD_* now refers to board-specific USB data
   * PIOS_USBHOOK_* is glue between PIOS and STM32 USB libs.
   * struct usb_* and enum usb_* and USB_* and HID_* are all types from the USB spec.
 * Shrunk the buffer size on the CDC call mgmt endpoint to save some RAM.
 * Made a few more USB related variables static to save some RAM.
2012-01-02 14:27:06 -05:00
Stacey Sheldon
5c0921e92c fault: add optional fault insertion module
This module and its associated settings uavo can be used
to test various fault conditions during initialization.

To enable the module, add the TEST_FAULTS=YES to your make
command line:
  make fw_coptercontrol TEST_FAULTS=YES

Once this module is part of your firmware load, you can
enable it in the hwsettings uavo and then select the
type of fault to insert by editing the faultsettings uavo.
On the next reset, the configured fault will be inserted
into the init sequence to allow you to test the boot fault
recovery code.

With a fault inserted, you should see 3 failed boot attempts
followed by a successful (recovery) boot.  You will see the
BootFault alarm set to Critical, and the RAM version of your
hwsettings will be reset to defaults.  Since the defaults have
all optional modules disabled, the fault module will be out of
the way during the recovery boot.

You can then "Load" the flash version of the hwsettings uavo
in the object browser, disable the Fault module and then "Save"
the hwsettings module back to the board.  The next reset will
boot normally without the fault inserted.
2011-12-30 23:05:39 -05:00
Stacey Sheldon
f4f0dab764 fixup make combridge an optional module 2011-12-30 23:05:39 -05:00
Stacey Sheldon
7c03875013 diag-tasks: make taskinfo diagnostics a separate enable
This allows task stack analysis without turning on all
of the other diagnostics.
2011-12-30 23:05:37 -05:00
Stacey Sheldon
64f498e48a com-bridge: add usart to usb vcp bridge 2011-12-30 23:05:34 -05:00
Stacey Sheldon
59cb489e01 usb: clean up pios hooks into stm32 usb_core
Reduced scope of many variables since they were being
exposed unnecessarily.

Renamed pios_usb_hid_prop code to pios_usbhook to reflect
the fact that it implements all of the callout functions
that are hooked into the stm32 usb library.
2011-12-30 23:05:33 -05:00
Stacey Sheldon
c0259dc616 usb cdc: USB composite device with HID + VCP 2011-12-30 23:05:33 -05:00
James Cotton
569b201b58 Move the bl_helper out of the common directory as it isn't 2011-12-24 13:10:23 -06:00
James Cotton
684715930a Merge branch 'next' into revolution
Conflicts:
	flight/OpenPilot/Makefile
	flight/Revolution/System/inc/openpilot.h
2011-11-14 10:11:53 -06:00
Oleg Semyonov
de6e450b5f Merge branch 'next' into os/TxPID-module
Conflicts:
	flight/CopterControl/Makefile
	flight/CopterControl/System/coptercontrol.c
	ground/uavobjgenerator/generators/generator_common.h
	shared/uavobjectdefinition/hwsettings.xml

component    	free heap used
----------------------------
Nothing            2544    -
PWM                2416  128
PPM                2392  152
DSM                2448   96
S.Bus              2432  112
GPS (port only)    2352  192
GPS (port+module)  1296 1248
CameraStab         2080  464
Telemetry          1912  632
TxPID              2272  272
2011-11-13 16:25:58 +02:00
Corvus Corax
cd473ed1fd some makefile cleanup 2011-11-11 11:51:45 +01:00
Corvus Corax
aa69027cb2 Merge branch 'next' into CC_GPS 2011-11-11 11:44:11 +01:00
Corvus Corax
88f161dd42 Revert "Makefiles: fixed comment line"
This reverts commit 0065842de7.
2011-11-11 11:06:32 +01:00
Oleg Semyonov
f5e82b8242 spektrum: rename Spektrum to DSM (DSM2/DSMJ/DSMX used by Spektrum and JR radios)
No code changes, just file, variable and define names are changed.

First, it better describes the serial protocol used by DSMx satellite
receivers. Second, many people using Spektrum radio, assume Spektrum
protocol. This is the attempt to address those inaccuracies.
2011-11-04 21:40:34 +02:00
Oleg Semyonov
2a98a52f4c gps: include optional GPS module by default 2011-10-23 00:41:18 +03:00
Oleg Semyonov
6a9208e8c3 Merge branch 'next' into os/TxPID-module 2011-10-22 23:34:58 +03:00
Oleg Semyonov
a38c569cd0 HwSettings: move Telemetry and add GPS port speed to the HwSettings object
TelemetrySettings object removed (saved 200+ bytes of RAM). Telemetry
port speed moved to the HwSettings object. Added GPS port speed setting.
GCS code updated to reflect changes and support both fields.
2011-09-28 22:11:42 +03:00
Oleg Semyonov
53c098dd08 Merge branch 'next' into os/GPS-on-CopterControl_next_v2
Conflicts:
	flight/OpenPilot/System/pios_board.c
	flight/OpenPilot/UAVObjects.inc
	shared/uavobjectdefinition/hwsettings.xml
2011-09-28 22:02:02 +03:00
James Cotton
cf6a59468f Merge branch 'next' into ins
Conflicts:
	flight/INS/Makefile
	flight/Project/OpenOCD/stm32f1x.cfg
	flight/Project/OpenOCD/stm32f2x.cfg
	make/firmware-defs.mk
2011-09-27 01:02:06 -05:00
James Cotton
f1e70d2ff5 Merge remote-tracking branch 'origin/msmith/OP-578' into next 2011-09-23 16:43:00 -05:00
Oleg Semyonov
d923117c25 TxPID: optional module to tune PID settings using R/C transmitter
This module will periodically update values of stabilization PID settings
depending on configured input control channels. New values of stabilization
settings are not saved to flash, but updated in RAM. It is expected that the
module will be enabled only for tuning. When desired values are found, they
can be read via GCS and saved permanently. Then this module should be
disabled again.
2011-09-17 22:49:51 +03:00
James Cotton
acf2aa218b Merge remote-tracking branch 'origin/stac/upgrade-to-openocd-0.5.0' into next 2011-09-14 11:49:01 -05:00
Mike Smith
deade53c5d OP-578 - check for CODE_SOURCERY before setting -fpromote-loop-indices 2011-09-11 10:49:09 -07:00
James Cotton
3239fdf21b Merge branch 'next' into ins
Conflicts:
	flight/CopterControl/Makefile
	flight/OpenPilot/System/pios_board.c
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
2011-09-09 08:33:34 -05:00