148 Commits

Author SHA1 Message Date
David Sidrane
ec11b943a8 Allow an alternate startup file independent of bootloader builds
In support of bootloader builds the nuttx_v3 builds previously had a
facility to set the start up files: Non Bootloader STM32 builds uses
the common vectors facility in NuttX. The bootloaders use a fixed
minimum set of vectors.

Since other architectures my need to include a start up file or
set of files, this PR allow an alternate startup file to be
selected independent of if this is bootloader build.
2017-09-29 10:13:51 -04:00
Daniel Agar
af9690cf08 add simple posix tests to SITL 2017-09-28 16:50:47 +01:00
NRottmann
989b1484cc HippoCampus AUV: Enable start without ROS wrappers 2017-09-13 06:20:05 -07:00
Daniel Agar
fd6499baca cmake simplify uavcan linking 2017-08-23 08:05:13 +02:00
Nicolae Rosia
0dc4f1f96d Fix strip target and bebop upload
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-13 08:16:37 +02:00
Nicolae Rosia
3dd32492de Move find of STRIP_TOOL to toolchain
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-13 08:16:37 +02:00
Nicolae Rosia
a6acb2e68e ARM Toolchain: search compiler in PATH
Add CMake target for strip since these changes break adb_upload_to_bebop.

GCC users should add the cross compiler bin path to PATH (location of arm-linux-gnueabihf-g++).
Clang user should do the following:
* set CMAKE_CXX_COMPILER to clang++ by providing -DCMAKE_CXX_COMPILER=clang++ to cmake
* get GCC cross compiler - needed because Clang does not ship a CRT
* create a symlink for clang and clang++ in GCC cross compiler bin dir.
* add GCC bin dir to PATH

Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-13 08:16:37 +02:00
Daniel Agar
4937449890 move parameter unittest into systemcmds 2017-06-12 12:18:53 -04:00
Daniel Agar
f26cd01d16 param gen reorganize and fix DISABLE_PARAMS_MODULE_SCOPING 2017-06-12 12:18:53 -04:00
Daniel Agar
24b26e53b9 cmake organize code coverage handling and base 2017-06-02 19:35:18 -04:00
Daniel Agar
2f6249af2f cmake add better logs_symlink dependencies 2017-04-12 19:26:06 +02:00
Beat Küng
685f114d29 sitl_target.cmake: create a symlink to the log directory in the build dir
Allowing for easier access to SITL logs.
2017-04-10 23:37:09 +02:00
James Goppert
955749ed6f Add iris_rplidar model (#6558)
* Whitespace cleanup and add config for rplidar.

* Add rplidar target.

* Disable gps for rplidar.
2017-04-10 03:06:21 -04:00
Lorenz Meier
bbd1906dfb Add Rover SITL config 2017-04-02 21:52:18 +02:00
David Sidrane
78e2a293d2 Fix UAVCAN bootloader builds broken by os calls from stm32_flash
Recent upsteam NuttX changes needed by PX4 added sem_[wait|post]
   in the stm32_flash driver.

   UAVCAN Bootloaders do not use the OS's scheduler etal.
   This commit nops the sem_[wait|post] with linker magic.
   Which precludes the linking the nuttx scheduler in the
   bootloader build.
2017-03-24 16:22:47 +01:00
flying-production
aed280fbd4 Make sure that external sitl project will be rebuild in case of sourcve has changed 2017-03-22 08:53:34 +01:00
James Goppert
7659402fdb WIP: valgrind runtime analysis and fixes (#6521)
* Fix several valgrind identified mem leaks

* Added callgrind target.

* px4_posix_tasks use nullptr
2017-02-17 12:36:52 -05:00
Daniel Agar
1bbca3bf1d test_dataman add to SITL with minor updates 2017-02-15 22:29:24 -05:00
Daniel Agar
3d804dd7ca cmake nuttx simple binary naming 2017-01-26 18:39:09 -05:00
Mark Charlebois
62a3e07423 orb_exists support for muorb
Also added builtin command wait_for_topic

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2017-01-09 15:41:54 -08:00
Daniel Agar
48e7c784e7 remove px4_model targets from all 2017-01-06 11:56:27 +01:00
Daniel Agar
9689163125 tests skip junit output and cmake exclude from all 2017-01-03 04:16:11 -05:00
Daniel Agar
573aed0ee8 tests coverage reorder to avoid lcov issues 2017-01-03 04:00:41 -05:00
Daniel Agar
28971caaf3 partially restore mavlink_tests 2017-01-02 10:14:41 +01:00
Daniel Agar
9fad6f9dd2 travis-ci use PX4_DOCKER for builds and specify tag 2017-01-02 10:14:41 +01:00
Daniel Agar
3607e72d4d OSX don't run uorb test 2017-01-02 10:14:41 +01:00
Daniel Agar
d6fd633500 sitl tests manually list all 2017-01-02 10:14:41 +01:00
Daniel Agar
351b3d20cb sitl testing exclude tests 2017-01-02 10:14:41 +01:00
Daniel Agar
97bc0f4486 gather test results 2017-01-02 10:14:41 +01:00
Daniel Agar
74231e6656 split tests for SITL ctest 2017-01-02 10:14:41 +01:00
Michael Schaeuble
71e48c937e Restructure posix cmake configuration
We check if the target is SITL and do not build it with all other
posix targets.
2016-12-26 15:38:25 +01:00
Anton Matosov
6d3116e30b Implement the way to run posix simulator directly from IDE without the need to reconfigure command lines, but use runner created via CMake
Steps to debug:
 * Run gazebo (or any other sim) server and client viewers via the terminal: `make posix_sitl_default gazebo_none_ide`
 * In your IDE select `px4_<mode>` target you want to debug (e.g. `px4_iris`)
 * Start debug session directly from IDE

This approach significantly reduces the debug cycle time because simulator (e.g. gazebo) is always running in background and you only re-run px4 process which is very light.
2016-12-26 15:38:25 +01:00
David Sidrane
d6098c8226 Adding Nuttx Build infrastructure 2016-12-21 08:34:20 +01:00
Lorenz Meier
1926c7bca7 Revert "Implement the way to run posix simulator directly from IDE without the need to reconfigure command lines, but use runner created via CMake"
This reverts commit fff493474356f34c32075cc4f67e50d787efa7a2.
2016-12-12 22:32:34 +01:00
Anton Matosov
fff4934743 Implement the way to run posix simulator directly from IDE without the need to reconfigure command lines, but use runner created via CMake
Steps to debug:
 * Run gazebo (or any other sim) server and client viewers via the terminal: `make posix_sitl_default gazebo_none_ide`
 * In your IDE select `px4_<mode>` target you want to debug (e.g. `px4_iris`)
 * Start debug session directly from IDE

This approach significantly reduces the debug cycle time because simulator (e.g. gazebo) is always running in background and you only re-run px4 process which is very light.
2016-12-10 12:48:53 +01:00
José Roberto de Souza
c49c3f469e aerofc: add upload command
AeroFC is updated by Aero board using the UART between AeroFC
and Aero board.

This script will copy firmware and px_uploader.py to Aero board and run
px_uploader.py with the correct paremeters. User only needs to have a
network connection (Ethernet over USB or WiFi) with Aero board to update
AeroFC firmware. The IP/hostname can be given by AERO_HOSTNAME
environment variable.
2016-11-28 09:21:12 +01:00
Beat Küng
0a0f268407 RPi: improve upload script, upload mixer files & all startup scripts 2016-11-24 14:43:45 +01:00
Carlo Wood
6fc30c76a6 Clean up of app.h
app.h, generated from app.h_in, has unnecessary code duplication
and isn't a header file (it defines globals, static functions
and doesn't have a header guard, moreover, it has a 'using namespace
std;'). Because of this, a real headerfile that declares the stuff
defined in apps.h was missing leading to even more code duplication:
scattered forward declarations in .cpp files and an often repeated
type of std::map<std::string, px4_main_t>.

This patch moves cmake/qurt/apps.h_in to src/platforms/apps.cpp.in
(with some changes) and removes cmake/posix/apps.h_in.
Then src/platforms/apps.cpp.in is split into src/platforms/apps.cpp.in
and src/platforms/apps.h.in, splitting declarations from definitions.

A typedef is defined for the map (apps_map_type).

The main difference between cmake/posix/apps.h_in and
cmake/qurt/apps.h_in was that the first defined a global 'apps',
while qurt stores the apps in QShell. I opted to get rid of
the global variable (which are in general evil for various reasons)
and used the API of cmake/qurt/apps.h_in where a provided 'apps'
map is initialized with a call to init_app_map. Thus removing
the existing code duplication.
2016-10-22 08:31:14 +02:00
Julian Oes
e2c308c4e6 cmake: fixes for cmake_hexagon changes 2016-10-18 08:07:14 +02:00
Carlo Wood
e93324785b list_vmd_make_targets and list_cmake_targets
* This allows one to run 'make posix list_vmd_make_targets' and get output like

>make posix list_vmd_make_targets
[...]
-- Build files have been written to:
/usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default
PX4 CONFIG: /usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default
Scanning dependencies of target list_vmd_make_targets
[100%] List of acceptable 'posix_sitl_default' <viewer_model_debugger> targets:
none
none_iris
none_iris_opt_flow
none_tailsitter
[...]
replay_solo_valgrind
replay_typhoon_h480_valgrind
[100%] Built target list_vmd_make_targets

Or, run 'make list_vmd_make_targets' from the build_posix_* directory.

* This adds the list_cmake_targets make target to print all
cmake targets that one can match with PX4_NO_OPTIMIZATION.
PX4_NO_OPTIMIZATION is ignored (do optimization as normal)
when the CONFIG isn't posix_sitl_*.

* Add comment in Makefile on how/where to find all targets.
2016-09-13 16:31:08 +02:00
Carlo Wood
77d356d275 Target specific optimization control.
This allows one to set a semi-colon separated list of regular
expressions in the environment variable PX4_NO_OPTIMIZATION
to control which (cmake generated) targets should be compiled
without optimization.

Suppressing optimization can be necessary for debugging in
a debugger, especially when trying to step through the code
or needing to print variables that otherwise are optimized out.

EXAMPLE

export PX4_NO_OPTIMIZATION="px4;^modules__uORB;^modules__systemlib$"

will result in the following messages during cmake configuration:

[...]
-- Disabling optimization for target 'platforms__posix__px4_layer'
because it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__systemlib' because it
matches the regexp '^modules__systemlib$' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB' because it matches
the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'examples__px4_simple_app' because
it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB__uORB_tests' because
it matches the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'px4' because it matches the regexp
'px4' in env var PX4_NO_OPTIMIZATION

Note that a list of all (currently used) target names can be printed
with the following command line from within the required build directory:

find . -wholename '*/CMakeFiles/*.dir/flags.make' | xargs dirname | xargs basename -a | sort -u | sed -e 's/.dir$//'
2016-09-13 16:31:08 +02:00
Michael Schaeuble
1fac4c4874 Improve code documentation and code cleanup 2016-09-07 08:24:08 +02:00
Tim Dyer
b65ff53b00 Initial build for Crazyflie 2.0
Working crazyflie firmware build

* Console on USART3
* Could not disable building PX4IO firmware, currently commented out

Don't build PX4IO firmware if the board doesn't ask for it

Added crazyflie motor driver

Fixed wrong register

CLK_SEL is in PWR_MGMT_1

Initial I2C/SPI MPU9250 device

* Tested with I2C
* Need to add error checking
* Intermittent crash on stop call

Working ak8963 mag driver

Functional lps25h driver. Work in progress.

Works well enough to probe and allow sensors task to start.

Added serial port test module

HACK! Get sensors module working

Set crazyflie PWM range

Extend baudrate for Crazyflie's NRF radio

Added dummy tone alarm to allow for init

Added autostart script for Crazyflie
2016-09-04 19:12:08 +02:00
Lorenz Meier
f511d49cc2 Improvements to SITL to make paths more flexible. (#5181) (#5255)
* Path cleanup for SITL.

* Restructured sitl scripts dir.

* Set integration tests to use ekf2 for vtol.

* Fix sitl paths for mac.
2016-08-25 21:47:45 +02:00
James Goppert
818840b576 Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch.

This is a step towards minimizing the diff with path_cleanup branch.

* Update ecl.

* Revert matrix update.

* Revert ecl and matrix.

* Update sitl gazebo.

* Revert sitl_gazebo and matrix changes.
2016-08-18 15:37:23 -04:00
Lorenz Meier
102f5b54d7 Revert "Improvements to SITL to make paths more flexible. (#5181)"
This reverts commit 699b6a2cb340f4b6ec3979ae7748ff9c56cfdb89.
2016-08-05 21:29:49 +02:00
James Goppert
699b6a2cb3 Improvements to SITL to make paths more flexible. (#5181) 2016-08-05 06:23:59 -04:00
Julian Oes
55d21242fe Snapdragon: keep copying mainapp.config for now
mainapp.config can't be renamed to px4.config just yet because it would
clash with the name used for the DSP side.
2016-07-29 11:15:10 +02:00
James Goppert
b6a9ff756c Rename mainapp to px4. 2016-07-29 11:05:01 +02:00
James Goppert
05315abc89 Optical flow simulator and install cleanup. (#5132)
sitl CI is having some issue cloning, but I have verified it locally for various configs
2016-07-24 13:07:14 -04:00