Commit Graph

526 Commits

Author SHA1 Message Date
Mark Charlebois 1a8bd15d98 Minor cleanup of mixer changes
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-03 11:20:07 -07:00
Mark Charlebois 5557ecf3d7 POSIX: Added airspeed simulator
This seems to be a dependency for the system to start up.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 13:16:03 -07:00
Mark Charlebois 58595e2e78 QuRT: fixed hard coded path in toolchain_hexagon.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 16:21:30 -07:00
Mark Charlebois 58a33dd26a Added simulated tone_alarm and enabled led for POSIX
Added simulated tone_alarm class and enabled led class for posix build.

The simulator implements the led_init, led_on, led_off, led_toggle calls.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 14:00:06 -07:00
tumbili 3af6e9d76e added autogenerated code for topic listener tool 2015-04-26 22:17:16 +02:00
Mark Charlebois 20d35e33da Platform header file cleanup and consolidation
Removed obsolete porting cruft from px4_XXX.h files and merged the
POSIX changes in PreflightCheck_posix.cpp back to PreflightCheck.cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 11:45:14 -07:00
Mark Charlebois 16d6068bfd QuRT: patch for eigen
This patch is required for QuRT. comlpex.h defines "I" and it replaces "I" in the
enum definition without this patch creating an error.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 10:52:07 -07:00
Mark Charlebois 3336fce1f4 QuRT and POSIX changes
Partial commit of the changes for QuRT and related changes for POSIX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 00:52:44 -07:00
Mark Charlebois f63ab3d5e3 Merge branch 'master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
2015-04-22 10:38:46 -07:00
Mark Charlebois 6a439f7ddc QuRT: Hello world app for QuRT
DSPAL for QuRT is still missing the pthreads exports and there is no
exported sleep function. These functions are stubbed out for the time being.

This is based on the 6.4.05 version of the Hexagon tools.

The Hexagon tools and DSPAL are needed to build the qurt target.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 08:48:48 -07:00
Don Gagne a885c2c8c9 Parameter meta data is not typed to board 2015-04-21 12:32:15 -07:00
Mark Charlebois f3b5076d70 Linux to posix conversion
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 09:53:09 -07:00
Mark Charlebois 0b649204b0 Make nuttx the default PX4_TARGET_OS
This should make the CI builder happy again.

Also fixed another itdef that should have been ifeq

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 14:35:56 -07:00
Mark Charlebois 4749974d5c Made nuttx the default PX4_TARGET_OS
The CI builder should work when nuttx is set to be the default

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 14:22:51 -07:00
Mark Charlebois 94b622998a Silence use of gnu extension gnu-array-member-paren-init
Added -Wno-gnu-array-member-paren-init to toolchain_native.mk

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:02:23 -07:00
Mark Charlebois 6ce0b7b753 QuRT: added missing make pieces
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 5d60437164 Qurt: Added more support for the QuRT target
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 47beddc88f Linux: Fixed hil crash with no args passed
The hil module did not check for argc < 2.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 1126e7ed52 Added config files for QuRT
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois e9c2e08770 Added initial QuRT support
Added the basic files to start building for QuRT

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois dc52bb7703 Linux: Added support for drivers/rgbled
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois bba26c3430 Linux: enabled commander module
The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 2f5bfe0c16 Linux: quelch clang-3.5 not found warnings
Quelch stderr when looking for clang-3.5.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois facc2faf04 Linux: added hil support
The HIL driver now runs in the Linux build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:49 -07:00
Mark Charlebois a1501fa368 Linux: Default to use clang
Fixed to use clang 3.4.2 on Ubuntu 12.04

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:49 -07:00
Mark Charlebois 87a8289a22 Linux: changed adc to adcsim and add barosim
The name of the app was adc but should have been adcsim.
Added a barometer simulator.

This will allow ms56711_linux to depend on real devices and not
simulation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois ddf75dd55a Linux: added ADC simulator
The sensor module is now able to run after the simulation modules are
started.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 410f86b767 Linux: Added simulated gyro
The code is based on mpu6000.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 76e28ac952 Use of != compare of floats in AttitudeEKF.c
This is a bug and is unsafe. I am not going to change the code but
it needs to be changed to a cast to int or a <= as it is unsafe to
check for equality with 0.0F.

Disabled warning for GCC 4.9 for now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 1d676b2e10 Moved linux/drivers/accel to linux/drivers/accelsim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois eab32572f4 Linux: Added thread safe getopt
The getopt command uses global variables and is not thread safe.

Created a minimal px4_getopt version that supports options with
or without an arg, and random placement of options on the command line.

This version modifies the order of the args in argv as does the
POSIX version of getopt.

This assumes that argv[0] is the program name. Nuttx may not support
that properly in task_spawn.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 440fc306a9 Added accelerometer simulator
The simulator satisfies the dependencies for an accelerometer
being present.

The accel code compiles but is not fully functional.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Lorenz Meier 07b16ffa01 Enable estimators in config 2015-04-20 11:27:17 -07:00
Mark Charlebois 509f7f9fdb Linux: changed to use submodule version of eigen vs system version
Eigen no longer needs to be installed on the build machine as it is
downloaded as a submodule.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:17:21 -07:00
Mark Charlebois 1805c21226 Linux: default to clang build
The build will now fail if clang is not found. To force the use
of GCC, use:

   make USE_GCC=1

The toolchain makefile was modified so it no longer checks for
various versions of clang if USE_GCC=1 is passed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois e3f137ce23 Fixed gcc 4.8 warnings
Disabled gcc warnings that are tripped by Eigen.

Removed signal code that is not needed in Linux port and was
causing gcc warnings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois eabc44afbe Linux: Added work queue support and unit test
PX4 uses NuttX data structures throughout so those data structures
were preserved and used to implement high and low priority queues.

A unit test for the work queues was added.

The polling rate of the queues are set in px4_config.h in
CONFIG_SCHED_WORKPERIOD. The units are milliseconds.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois cf71db74d7 Support to specify build time OS target
Now run:

make PX4_TARGET_OS=nuttx

or

make PX4_TARGET_OS=linux

To test the linux build and make sure that the required directories
exist, run:

make linuxrun

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois bb7c8163b9 Linux: commented out tests
The src/platform/linux/tests modules were commented out in the
config file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 31edc08cea Linux: added missing -pthread flag
LDFLAGS was missing -pthread

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 2cd44a24ea Linux: Added linker script support for param and added mc_att_control
Added linker script to resolve __param_start and __param_end.

Added mc_att_control to list of supported builtins.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 977036faf9 Linux: changed param to nit use errx or exit
Thread based implementaton can't call errx or exit

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 5f3496353c Linux: added support for sdlog2
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois df53defca6 Linux: Add support for blinkm to test I2C layering
Running the blinkm device to test I2C

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 90818363eb Linux: fix for undefined BO in mavlink_main_linux.cpp
if termios.h is included before mathlib.h then BO is undefined.
Since mathlib.h is not needed it was removed but I still don't
know why this error occurs.

Also added -lrt to link flags for clock_gettime

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 1cdc44828d Linux - revert to preferentially use clang over gcc
Removed hardcoded requirement to use gcc

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 11e971eaa0 Linux: min gcc version is 4.8.1
PX4 will not build with gcc-4.6.

If you are running Ubuntu 12.04 still (you poor old sod) follow the directions at

http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/

to install gcc-4.8.1

Alternatively you can install clang 3.4.1 for Ubuntu 12.04 from

http://llvm.org/releases/3.4.1/clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04.tar.xz

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois ac0df5c61d Linux: added HRT test, moved tests to linux/tests
Also fixed naming of mavlink files for NuttX build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 88a0081112 Linux: Added support for gcc-4.9.1
Fixed bug with missing quote in #error found by gcc 4.9.1

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois d013ac0927 Support for building more modules with Linux
Added more queue support to linux/px4_layer.

Use virt char devices for ms5611, and mavlink.

Added more HRT functionality. uORB latency test
now fails. Likely due to bad HRT impl for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00