Commit Graph

359 Commits

Author SHA1 Message Date
Julian Oes 35074aaffd posix: remove segfault handler
I could not get a core dump without removing the segfault handler, hence
this change.
2019-06-05 08:16:19 +02:00
Julian Oes f3620f7018 Remove all leftover PX4_BACKTRACE calls 2019-06-05 08:16:19 +02:00
Beat Küng 0d71eeccbf console buffer: write to log as 'boot_console_output' message 2019-06-04 11:57:54 +02:00
Beat Küng d947818654 console: add simple dmesg functionality (enable only on v5) 2019-06-04 11:57:54 +02:00
Beat Küng 6e2b70cbcd posix: restore original SEGV signal handler upon first entry of our handler
The current SEGV handling on posix is not useful: as soon as our handler
is left, it's triggered again, infinitely.
This patch changes to restore the original handler, so the OS can create
a core dump, etc.
2019-05-29 08:30:52 +02:00
Julian Oes 7b9562e3b1 hysteresis: move out of systemlib, move to gtest
This moves the hysteresis test out of the systemlib and makes it its own
small library. Since it still depends on hrt_absolute_time this does not
link yet. My attempt to get all link dependencies together failed.
2019-05-27 09:57:50 +02:00
Daniel Agar e9ca5d5aba PX4 general work queue 2019-05-24 12:58:55 -04:00
Beat Küng f58079bc5d pxh.cpp: fix invalid reference if words is empty
This can happen for example if 'line' is a space.
2019-05-24 11:06:41 -04:00
Julian Oes 7a768dbab3 lockstep_scheduler: always use the same code
This define was not set anyway, and in my opinion we should
not use different code for tests anyway.
2019-05-20 12:39:02 -04:00
Julian Oes 52099f5792 cmake: include lockstep_scheduler test
This makes sure we add the lockstep_scheduler_test even if the
ENABLE_LOCKSTEP_SCHEDULER is not set to yes. This means the
lockstep_scheduler is not used for SITL but the CMakeLists.txt file
still used and the test added.
2019-05-20 12:39:02 -04:00
Julian Oes 8d8799097d lockstep_scheduler: convert test to gtest 2019-05-20 12:39:02 -04:00
Daniel Agar 162405479b
device drivers lib add linux spi support 2019-05-20 12:18:56 -04:00
Matthias Grob cbd230e34e Testing: Clean up unit_test target because test_results does all tests now 2019-05-09 09:42:46 +02:00
Matthias Grob 542f61f04b testing build: add possibility to filter tests with ctest regex 2019-05-09 09:42:46 +02:00
Matthias Grob 5a90382cb8 sitl_tests: add prefix "sitl-" for regex test filtering 2019-05-09 09:42:46 +02:00
Matthias Grob 5020dfdc3d Testing: switch unit tests to BUILD_TESTING 2019-05-09 09:42:46 +02:00
Beat Küng 2448a84c36 SITL: add if750a model 2019-05-03 13:32:48 +02:00
David Sidrane 2b68076663 Update Nuttx with F7 i2C fixes 2019-04-18 08:55:50 +02:00
Julian Oes 5b3a6facfa cmake: fix races without ninja
This fixes build races which happened if "Unix Makefiles" instead of
ninja-build was used as the cmake backend.

For any dependencies of commands on files we need to create a target.
Otherwise, if "Unix Makefiles" are used as the generator the commands
are run in parallel on the different files which often can lead to
races or redundancies in our build.

A nice write-up can be found here:
https://samthursfield.wordpress.com/2015/11/21/
cmake-dependencies-between-targets-and-files-and-custom-commands/#
custom-commands-and-parallel-make
2019-04-11 10:07:00 +02:00
Daniel Agar b9516d7e38 mixer move test_mixer_multirotor into cmake 2019-04-07 16:12:17 -04:00
Daniel Agar a78ff7fe55 NuttX delete accidental tone_alarm copy 2019-04-03 23:57:51 +02:00
Daniel Agar 8541f4b0cf cmake nuttx use defconfig matching config label if available
- otherwise use default nsh
2019-04-03 16:58:39 -04:00
Daniel Agar 296d7900a0 cmake fix NuttX build dependencies 2019-04-03 12:33:12 -04:00
mcsauder e6f1a2db12 Delete trailing whitespace, extra newlines, to quiet git hooks and add an extra = so that it does not appear to git as a merge conflict marker. 2019-04-02 15:31:37 -04:00
Nico van Duijn b7784a1439 Add MAVLink stream and cmake sitl target 2019-04-02 08:17:13 +02:00
Daniel Agar b35883f5d5
cmake nuttx use wrapper script to call "make olddefconfig"
- this is a workaround for PATH variables that exceed the maximum cmake custom command length
2019-03-24 17:58:41 -04:00
Julian Oes ed3b924f97 nuttx: update submodule (#11705)
This fixes a build error due to a Scandinavian letter in the help text.
2019-03-23 11:09:35 -04:00
Daniel Agar 5e6bfe1ad8
vscode updates
* working debugging (one click build and debug)
   * SITL jmavsim
   * SITL gazebo
   * jlink px4_fmu-v{2-5}
 * improved syntax highlighting
   * GNU linker files
   * ROS message files msg/*.msg
   * jinja2 template files
 * fixed intellisense support
2019-03-22 20:55:39 -04:00
Daniel Agar 9fd0bbe30f NuttX build include and use Kconfiglib (python) 2019-03-21 08:41:01 -04:00
Daniel Agar 94cab1f9a9 update cmake NuttX helper save behaviour (oldconfig, menuconfig, etc) 2019-03-20 12:07:37 -04:00
Daniel Agar b35d048566 cmake enable -Wcast-align and disable per module 2019-03-16 11:47:15 -04:00
Julian Oes b54ca67de9 lockstep_scheduler: check if mutex is still valid
It turns out that we can fix the unit tests of the lockstep_scheduler
just by checking if `passed_lock` is not `nullptr`.

Without this check, the unit tests segfaulted.
2019-03-15 13:38:11 +01:00
Daniel Agar edad4c40c3 containers add IntrusiveQueue and testing 2019-03-14 09:22:19 +01:00
Beat Küng 505b1aca2c lockstep_scheduler: work around a potential dead-lock for canceled threads 2019-03-08 12:22:45 -05:00
Beat Küng e999075ac7 lockstep_scheduler: fix system_sleep -> system_usleep
The effect was that threads that tried to exit were unnecessarily kept
running.
This did not cause problems except for increased resource usage.
2019-03-08 12:22:45 -05:00
Beat Küng 08298ab3d0 drv_hrt: make lockstep_scheduler a pointer
This solves a potential dead-lock when trying to shutdown: a call to exit()
stops all threads and calls all destructors for static objects.
The destructor of LockstepScheduler takes a lock. However this is not
safe, as the lock could already be taken (by any thread).
2019-03-08 12:22:45 -05:00
Daniel Agar e2bf4b1894 List container improvements and testing
- support range based for loops
 - add remove() method to remove a node
 - add clear() to empty entire list and delete nodes
 - add empty() helper
2019-03-01 21:01:04 -05:00
Daniel Agar e7dfb375be
create jlink gdb upload script and use in Jenkins Hardware pipeline 2019-02-27 18:42:54 -05:00
Daniel Agar e4b3c8bcc6 tests enable bezier and search_min 2019-02-22 16:23:57 -05:00
David Sidrane 4e792b2487 Update nuttx with backport f7 i2c fix on 7.28+ 2019-02-21 16:07:58 -05:00
Daniel Agar 7a1c8ea8cb Update platforms/posix/src/lockstep_scheduler/CMakeLists.txt
Co-Authored-By: MaEtUgR <maetugr@gmail.com>
2019-02-04 21:31:06 +01:00
Matthias Grob ffb8bb6066 lockstep_scheduler: correct cmake target includes 2019-02-04 21:31:06 +01:00
Daniel Agar 40e42a677b
NuttX cmake support optional compressed defconfigs 2019-01-30 10:54:53 -05:00
Daniel Agar d02685c9f7 cmake nuttx .px4 package fix dependency location 2019-01-29 15:34:36 -05:00
mcsauder dc5f18bdcd ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class. 2019-01-28 18:58:04 -08:00
Matthias Grob bda60ecfd6 posix main: hotfix for px4 application not exiting anymore
Some threads do not exit and are still running when
trying to exit SITL running under Windows in Cygwin.

This problem was introduced with:
- posix shell #10173 because of strating a child process
for the startup script and mixing up the signal handling
(only Ctrl+C broken)
- lockstep #10648 because of simulator threads not
stopping gracefully anymore with timing race conditions
(no graceful exit possible anymore)

I leave the SIGINT handler on its default implementation for
Cygwin which kills the process and all its threads when pressing
Ctrl+C.

This hotfix at least allows the usage of Ctrl+C again instead
of forcing the user to use the task manager to shut down
px4.exe going crazy on CPU load instead of exiting
everytime.
2019-01-28 09:38:49 +01:00
Daniel Agar 739a02022b position_estimator_inav: move to examples (start deprecation) 2019-01-27 22:15:39 +01:00
David Sidrane dc73dd7bba px4_init:Nuttx support boards without a console 2019-01-25 06:32:37 -08:00
David Sidrane 1ef9b5ed81 Updated Nuttx 7.28+ 2019-01-25 06:32:37 -08:00
David Sidrane 8f308efa88 upstram NuttX CONFIG_EXAMPLES_NSH_CXXINITIALIZE->CONFIG_SYSTEM_NSH_CXXINITIALIZE 2019-01-25 06:32:37 -08:00