Commit Graph

387 Commits

Author SHA1 Message Date
Julian Oes 23653f9f39 lockstep_scheduler: fix return value, remove errno
The API of cond_timedwait was wrong. It used return -1 and set errno
instead of returning the error as specified for pthread_cond_timedwait
which it tries to mock.
2019-01-01 20:35:42 +01:00
Lorenz Meier 0d0a556847 Fix usage of errno in POSIX semaphore error handling
Previous commit 98ae0186e9 changed the err variable to errno, which is not the return value we are looking for.
2019-01-01 20:35:42 +01:00
PX4 Build Bot 0636aff5d5 Update submodule nuttx to latest Sun Dec 23 21:16:39 UTC 2018
- nuttx in PX4/Firmware (faf082fa1876b3f96ff9c07fc91ab8211d274c60): c225d4a691
    - nuttx current upstream: c225d4a691
    - Changes: c225d4a691...c225d4a691
2018-12-23 16:20:30 -05:00
David Sidrane d676325ea5 Update Nuttx with env out of memory fix 2018-12-22 19:09:49 +01:00
Julian Oes 8486b2b917 tests: properly disable shutdown test for Cygwin 2018-12-22 10:32:18 +01:00
Julian 0601214806 tests: disable shutdown and hysteresis for Cygwin
It seems that the hysteresis test fails every now and then, presumably
due to timing issues. The tests needs some improvements, e.g. isolating
it from the system time.
2018-12-22 10:32:18 +01:00
Julian Oes ffb73f6496 platforms: fix redefinition for QURT 2018-12-22 10:32:18 +01:00
Julian Oes 14e5ebbbbc platforms: fix clock build for macOS (yet again) 2018-12-22 10:32:18 +01:00
Julian Oes 06c5037025 platforms: use CLOCK_MONOTONIC
For the non-lockstep case we want to use CLOCK_MONOTONIC if possible.
2018-12-22 10:32:18 +01:00
Julian Oes 547dd8511b platforms: use define for lockstep scheduler
Instead of using the define __PX4_POSIX_SITL it makes more sense to have
a define just to determine if the lockstep scheduler should be used.
2018-12-22 10:32:18 +01:00
Julian Oes 5280a4aba1 platforms: prevent wrap-arounds in px4_sleep
@bkueng found that the old implementation was likely to wrap-around
given seconds is only a uint32_t. We now cast it directly to uint64_t
and therefore should fix this problem.
2018-12-22 10:32:18 +01:00
Julian Oes 4efe4b0d15 platforms: reorg after rebase on new board config
The new board config changed everything, so I needed to move the
lockstep_scheduler repo.
2018-12-22 10:32:18 +01:00
Julian Oes 6d273f3bd8 px4_layer: modernize warnings 2018-12-22 10:32:18 +01:00
Julian Oes c24f6ef943 platforms: lockstep_scheduler ain't no submodule 2018-12-22 10:32:18 +01:00
Julian Oes 357870377a platforms: try to get submodule checked out 2018-12-22 10:32:18 +01:00
Julian Oes e41518a08b platforms: clean up various build/linking issues
This makes sure lockstep is only built for SITL builds and fixes the
existing builds.
2018-12-22 10:32:18 +01:00
Julian Oes d75389b2e4 platforms: consolidate latency_buckets
These symbols were duplicated all over the place.
2018-12-22 10:32:18 +01:00
Julian Oes 843033d530 platforms: remove unused function 2018-12-22 10:32:18 +01:00
Julian Oes 98ae0186e9 px4_sem: use px4_sem on all POSIX system
This uses the "fake" px4_sem based on mutex and condition_variable on
all POSIX system, not just macOS and Cygwin. This means that we can
change px4_sem_timedwait under the hood and inject the simulated time.
2018-12-22 10:32:18 +01:00
Julian Oes 3e6e1f5c2b POSIX: use lockstep_scheduler to fake time
This integrates the lockstep_scheduler, so that the system time is set
by the mavlink HIL_SENSOR message.

This means that the speed factor is removed and the speed is entirely
given by the simulator.
2018-12-22 10:32:18 +01:00
Julian Oes f0ce300744 platforms: move latency_buckets to perf.c 2018-12-22 10:32:18 +01:00
Julian Oes fa8ac612ab POSIX: use C++ for drv_hrt (file was renamed) 2018-12-22 10:32:18 +01:00
Julian Oes 5df333fa96 POSIX: include lockstep_scheduler in build 2018-12-22 10:32:18 +01:00
Julian Oes fa31d95fd8 Renamed drv_hrt.c to drv_hrt.cpp 2018-12-22 10:32:18 +01:00
Julian Oes db6de38b19 Work in progress to support a speed factor in SITL
These contains some rough changes trying to get SITL to speed up by a
SPEED_FACTOR.

This platform time code probably requires some more thought and refactor
but this gets a demo at 4x working.
2018-12-22 10:32:18 +01:00
Julian Oes 5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
TSC21 870c513aad readd CMAKE_RUNTIME_OUTPUT_DIRECTORY install for the posix build 2018-12-13 02:09:31 +00:00
TSC21 a6121e1655 Cmake build: do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY if building with catkin 2018-12-13 02:09:31 +00:00
James Goppert c7eb21be86 Fix catkin/ROS build paths. 2018-12-13 02:09:31 +00:00
Kārlis Seņko c1d50d35d3 Move common shmem parameter declarations to shmem.h. 2018-12-11 09:21:15 -05:00
Kārlis Seņko 859b242cb8 Fix some dynamic linking errors.
_Stof, bsearch, param_find_changed
2018-12-11 09:21:15 -05:00
Daniel Agar fd8fe29ef3 vscode update targets and gdb debugging 2018-12-05 15:58:41 -05:00
PX4 Build Bot a922d4e70e Update submodule nuttx to latest Wed Dec 5 00:37:51 UTC 2018
- nuttx in PX4/Firmware (eddfa7421c4ca2eb0969498093e09fa834e920bd): 166d898c70
    - nuttx current upstream: d07a1d459e
    - Changes: 166d898c70...d07a1d459e

    d07a1d4 2018-12-04 Beat Küng - [REJECTED] arm/include/math.h: remove _PARAMS macro (#42)
2018-12-04 22:57:01 -05:00
Daniel Agar 1f8c0e79e8 cmake toolchains force cache cpu flags and don't append
- these flags were accumlating on top of each other anytime cmake had to reconfigure
2018-12-04 19:45:46 -05:00
Daniel Agar dbee6380ee cmake move custom upload helpers to boards/ 2018-12-04 19:45:46 -05:00
Daniel Agar 1efad64f0c bebop move flow driver to board directory 2018-12-04 01:06:54 -05:00
Daniel Agar d4e06e517a delete drv_gpio.h, modules/gpio_led, and fmu GPIO ioctls 2018-12-03 16:30:39 +01:00
Daniel Agar 91721f2060 cmake update NuttX bloaty_compare_master helper to use new paths 2018-11-28 16:40:12 -05:00
Daniel Agar 48df19c8df move dyn_hello to examples and restore testing 2018-11-26 14:40:14 -08:00
Daniel Agar e45e7aa8a6 move posix/tests/hello to examples/hello and include everywhere 2018-11-26 14:40:14 -08:00
Daniel Agar c3448c19c4 make vcdevtest a generic cdev test 2018-11-26 14:40:14 -08:00
Daniel Agar 3e0a3559a9 cmake use standard mechanisms for settings flags 2018-11-26 14:40:14 -08:00
Daniel Agar 11be2b8873 cmake split px4_base into px4_add_module, px4_add_library, px4_add_common_flags 2018-11-26 14:40:14 -08:00
Daniel Agar fa0fe4cac6 cmake remove need for platform px4_add_board_os
- explicitly set TOOLCHAIN on all NuttX targets
2018-11-26 14:40:14 -08:00
Daniel Agar abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Mara Bos 3c660acca8 Add unit test for dynamically loading modules on posix. 2018-11-24 01:58:09 +01:00
Mara Bos d13836eb1e Add dynamic modules on Posix.
You can now add `DYNAMIC` as an option to `px4_add_module`, which will
cause that module to no longer be compiled into the px4 executable, but
instead produce a separate shared library file, which can be loaded and
executed with the new `dyn` command:

    pxh> dyn ./hello.px4mod start

This will load the shared object file `hello.px4mod` if it wasn't
already loaded, and execute its main function with the given arguments.
2018-11-24 01:58:09 +01:00
Mara Bos e9fb17c51a Always use FILE* for standard output.
The threads running commands for clients through the Posix daemon used
to write to a char buffer through snprintf (etc.) which was then written
directly to the file descriptor, whereas in the other case printf
(etc.) was used to write to stdout (FILE*). Both versions used some
macro's and repeated code to have the same output.

This change unifies these two cases by using a FILE* in both cases. The
(line) buffering is done by the standard C library's implementation
(just like with stdout), and px4_log.c now uses the same code in all
cases (using fprintf, etc.) for printing (colored) output.
2018-11-23 12:15:41 +01:00
Daniel Agar 75c1396ed7 cmake sitl_tests silence debug message 2018-11-21 18:13:21 +01:00
Matthias Grob be16baaa3c sitl_tests: exclude uorb test from Windows build
Because it was always failing from the beginning on and
we want to make sure no other tests break in the meantime
by running the currently passing tests also on Windows CI.
2018-11-21 14:25:11 +01:00
Daniel Agar 26bac9594f add simple SITL shutdown test 2018-11-16 16:43:19 -05:00
Daniel Agar 30fe079844 qurt px4_layer fix style 2018-11-16 09:53:28 -05:00
Daniel Agar 4278dd8fb4 posix px4_layer fix style 2018-11-16 09:53:28 -05:00
dkang 4901f8a1dc
add execption check after malloc 2018-11-16 08:15:26 +01:00
Mara Bos c882ca9389 On Posix: Don't shutdown (half) the connection from the client.
This triggered POLLHUP too early on Mac.
2018-11-14 17:36:29 +01:00
Mara Bos 9594ebf72e Use unix sockets instead of pipes for posix daemon. (#10766)
Unlike pipes, unix sockets provide bi-directional
communication with each connected client.

- No need to generate a unique uuid per client anymore.

- The client doesn't have to create its own pipe anymore.

- Since there is no risk of multiple client's writes getting mixed up,
  messages don't need to fit in a single write anymore, removing the
  limit on command length.

- Since the server can detect a connection closing, the client no longer
  needs to handle signals. When the client is killed, the connection is
  automatically closed, which will cause the server to kill the related
  px4 thread.
  Since this does not rely on handling signals and the client sending an
  additional message, this is much more reliable.

- Client is no longer a singleton.

- The protocol is simplified. Standard output is directly written to the
  socket back to the client, without wrapping it in any protocol
  message.

- Because of the simple protocol, one could now even use netcat to run a
  px4 command:

    $ echo hello | netcat -UN /tmp/px4-sock-0

Also removes a few race conditions.
2018-11-13 14:31:22 -05:00
Daniel Agar 246b879aea require MODULE_NAME 2018-11-10 13:52:34 -05:00
Mara Bos 10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Daniel Agar cc64661791
Update submodule nuttx to latest Sat Oct 20 00:44:04 UTC 2018
- nuttx in PX4/Firmware (31767b6b5aeb4293c2991dbfea6b810e34a34149): 999c4357a2
    - nuttx current upstream: 166d898c70
    - Changes: 999c4357a2...166d898c70

166d898 2018-10-18 Daniel Agar - [BACKPORT] Merged in dagar/nuttx/pr-stm32_dma_per_spi (pull request #736)
0a5b1cb 2018-10-17 David Sidrane - [BACKPORT] Lampoo-master-spi-flash (pull request #735)
2018-10-19 21:22:34 -04:00
David Sidrane 640d10044c NuttX update with i2c Backport 2018-10-19 20:08:01 -04:00
Mark Sauder ad8539bd15 Deprecate the tap_common directory, nuttx, driver, and makefile references to tap-v1. (#10629) 2018-10-15 11:53:29 -04:00
TSC21 d3c1d5f019 sitl_gazebo: build with SEND_VISION_ESTIMATION_DATA set 2018-10-09 11:57:30 -04:00
Daniel Agar f74b96e918 AV-X DSM RC fixes (disable single wire) 2018-10-09 10:37:12 -04:00
mcsauder 2d208b1524 Edited aerofc-v1 file comments to not reference tap-v1. 2018-10-03 15:47:04 -04:00
Daniel Agar f2e10a163b fix qurt eagle board_identity 2018-10-03 10:30:10 +02:00
David Sidrane 61935e8271 qurt:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane 73552bdd64 sim:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane 2f64870e78 qurt:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane ed9223edaf board_identity:Added common no-arch specific board_identity API
This common code can be used byt posix based boars to provide
   the board_identity API.
2018-10-03 10:30:10 +02:00
David Sidrane 347ac48eab posix:Added PX4 GUID API board_get_px4_guid_formated 2018-10-03 10:30:10 +02:00
David Sidrane 7f29b04e41 sim:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
Beat Küng b972651a06 posix shell: use /bin/sh instead of bash
This uses the systems default shell:
- Ubuntu: dash
- Fedora: bash

Since bash is invoked via /bin/sh, it operates in POSIX mode:
  https://tiswww.case.edu/php/chet/bash/POSIX

- remove '# Ignore the expand_aliases command in zshell.'
  Not needed because the shell operates in POSIX mode
- [[ is bashism -> use [
- autostart_files=( $autostart_file_match )
  is not supported in dash, so use 'ls'
- shellcheck runs the dash flavor, since dash is a minimalistic shell.

Tested on dash & bash.
2018-09-27 23:39:20 +02:00
Bart Slinger ea96501e8c bebop 2: upload entire bin directory content 2018-09-26 21:34:22 +02:00
Bart Slinger adad22f879 make set function work in sh 2018-09-26 21:34:22 +02:00
Bart Slinger 4df88122cb Bebop 2: use sh instead of bash 2018-09-26 21:34:22 +02:00
PX4 Build Bot 82acf6894d Update submodule nuttx to latest Tue Sep 25 23:58:20 UTC 2018
- nuttx in PX4/Firmware (1adcfeecc20620f02439093afb85f3151b2e8be1): e31e94f5bd
    - nuttx current upstream: 7e3c8e10cd
    - Changes: e31e94f5bd...7e3c8e10cd

    7e3c8e1 2018-09-21 Gregory Nutt - [BACKPORT] 510b0f7e07 Correct all ARMv7-M architectures.
2018-09-25 20:28:47 -04:00
David Sidrane 6ec693b716 tap-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 3f1a155e57 px4nucleoF767ZI-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane f7dd2511ab px4fmu-v5 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane a6e77eb9a0 px4fmu-v5 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane a302c58a0d px4fmu-v4pro nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 825d6c06f2 px4fmu-v4 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane dfc390bbe0 px4fmu-v4 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 2ec56cef42 px4fmu-v2 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 5148d2d94f px4fmu-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane b606897743 px4flow-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane ee28b9aa69 px4esc-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 65322c98ca px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 384a1dcf66 px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane eaec63a747 px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 233d116aee px4-stm32f4discovery nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 7c3850902f omnibus-f4sd nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 053fecbf20 nxphlite-v3 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 0bd2a0be05 mindpx-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 197940eadd esc35-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 907d478f3e crazyflie nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane debb8afa0d av-x-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane fe591aee5c auav-x21 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane e893aaec48 aerofc-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 0829e3c654 aerocore2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
Daniel Agar 610ec9f854
Update submodule nuttx to latest Sun Sep 23 08:37:24 EDT 2018 (#10550)
- nuttx in PX4/Firmware (f3cbd3c744e9224bd55597fbfae23c56ce296544): 98a8951306
    - nuttx current upstream: e31e94f5bd
    - Changes: 98a8951306...e31e94f5bd

    e31e94f 2018-09-21 David Sidrane - [REJECTED] kinetis:usbdev use CONFIG_KINETIS_USBOTG_PRIO at default
2018-09-23 10:07:42 -04:00
mcsauder a1af7ffdcf Remove whitespaces to quiet git commit trailing whitespace warnings. 2018-09-21 23:28:31 +02:00
David Sidrane d2faf5f31d platforms/nuttx/NuttX/nuttx with hardfault fix 2018-09-21 22:34:38 +02:00
Matthias Grob fbd175c0c9 posix-shell server: switch pipe flag to read/write
to make it non-blocking and ommit opening the same
named pipe multiple times inside the same process
which seems to be not supported in cygwin.
2018-09-18 18:24:07 +02:00
Lukas Woodtli c1a58bda17 Add address sanitizer to SITL pipeline
- Environment variables for building with asan
- Docker argument for leak sanitizer
- Regex for tests to fail on sanitizer error

Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
2018-09-16 09:40:53 +02:00
David Sidrane eb4f847322 nxphlite-v3:Set UART4 to have the same bufffer sizes as TELEM1
Bring UART4 bufffer sizes in alignment with FMUv2 Telem1
2018-09-14 15:38:56 -04:00
Roman 5847ab4607 posix main.cpp: better reporting e.g. when there are permission problems
- if somebody tries to use the shell with insufficient permissions he will be told so

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-14 14:43:08 +02:00
David Sidrane 698590a5b2 Update nuttx with hardfault fix for kinetis on i2c reset 2018-09-13 06:56:00 -07:00
Daniel Agar 73fe4ecd20 AV-X enable GPS for rev C board 2018-09-12 02:39:03 -04:00
Daniel Agar 56723b2ece AV-X initial networking support 2018-09-07 16:50:32 -07:00
Daniel Agar 060463e8a7
parameters lib convert to c++ (#10267) 2018-09-04 09:18:28 -04:00
Daniel Agar d7580aa676 px4fmu-v5 increase CONFIG_USERMAIN_STACKSIZE slightly 2018-09-02 16:41:41 -04:00
Daniel Agar ac298664c7 nuttx-configs increase idle thread stack size to 750 bytes 2018-09-02 15:31:54 -04:00
Daniel Agar 7cc0e69fcd add px4fmu-v{3,4,5} stackcheck configs 2018-09-02 14:16:04 -04:00
Daniel Agar c76187dbbb
Update submodule nuttx to latest Fri Aug 31 21:30:51 UTC 2018 (#10385)
- nuttx in PX4/Firmware (0a1a2025402a387cde88132c6f8d8cc7237d2e6b): bf8cce85c3
    - nuttx current upstream: e3b5b667ae
    - Changes: bf8cce85c3...e3b5b667ae

e3b5b66 2018-08-31 Daniel Agar - [BACKPORT] Merged in dagar/nuttx/pr-stm32f7_stackcheck-upstream (pull request #714)
2018-08-31 18:44:34 -04:00
David Sidrane 1b6e933176 Make.defs.in:Runtime Stack Checking in Nuttx Build
Use CONFIG_ARMV7M_STACKCHECK to add the instrumentation
  for runtime stack checking
2018-08-31 13:03:39 -07:00
David Sidrane 4f2aa51767 px4_impl_os:Use the defconfig CONFIG_ARMV7M_STACKCHECK
To enable coherent runtime stack checking use the boards
  CONFIG_ARMV7M_STACKCHECK setting
2018-08-31 13:03:39 -07:00
Beat Küng e26bfd2e79 SITL: remove config_sitl_rcS_dir
Not needed anymore
2018-08-31 14:21:56 -04:00
Beat Küng 4e6139d9fb Posix: add '#pragma GCC poison exit'
Generally exit() should not be used on Posix, because it exits the whole
program instead of only the task.
2018-08-31 18:11:58 +02:00
Daniel Agar 8ddb99971f tests template skip mavlink except for mavlink test 2018-08-30 11:13:24 -04:00
Bram Strack van Schijndel 918c397ae7 fixup! [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel b678f8bc5b [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Daniel Agar 658b957888
Jenkins build and archive all packages (#10332) 2018-08-29 12:31:14 -04:00
PX4 Build Bot 2164ef8fb6 Update submodule nuttx to latest Sat Aug 25 15:12:57 UTC 2018
- nuttx in PX4/Firmware (72792cef43): bf8cce85c3
    - nuttx current upstream: bf8cce85c3
    - Changes: bf8cce85c3...bf8cce85c3
2018-08-25 11:23:25 -04:00
Daniel Agar 72792cef43
posix-configs shell scripts use /bin/sh to maximize compatibility (#10292)
- fix ocpoc line endings
2018-08-25 11:02:37 -04:00
David Sidrane e79b9a2c1b Update nuttx with backport Kinetis i2c fix (#10325) 2018-08-25 10:10:02 -04:00
David Sidrane 790356ef6d NXPHlite-v3:Ensure bin file sizes in mtpl of 8 2018-08-23 14:26:32 -07:00
David Sidrane 19d3e562e9 NXPHlite:Track kinetis upstream CONFIG changes 2018-08-23 14:26:32 -07:00
David Sidrane add7484083 Nuttx with Missing Backports 2018-08-23 14:26:32 -07:00
Daniel Agar 01744a9efc Jenkins px4fmu-v2 hardware test 2018-08-14 23:12:26 -04:00
Daniel Agar a2059acde5 NuttX stm32f7 configs unset ADC1 DMA 2018-08-14 20:32:28 -04:00
David Sidrane 03000bb0ef Updated apps nuttx of platforms/nuttx 2018-08-14 09:38:15 -04:00
David Sidrane 4d3aff23d7 NXPflite-v3:Hack-Fixes USB not enumerating on Virtual Box VM 2018-08-14 09:38:15 -04:00
David Sidrane 346224a0c6 NXPhlite:Fix init stack warning 2018-08-14 09:38:15 -04:00
David Sidrane 0e382aec71 Update NuttX with Kinetis Backports 2018-08-14 09:38:15 -04:00
David Sidrane f0663fb143 nxphlite-v3:Match probes to V3 HW 2018-08-14 09:38:15 -04:00
David Sidrane 5c7cbc4d30 nxphlite-v3:Add uavcan 2018-08-14 09:38:15 -04:00
David Sidrane c6cab03319 nxphlite-v3:Add Probes to defconfig 2018-08-14 09:38:15 -04:00
David Sidrane b9f2530688 Update nuttx submodule with FlexCan and PIT contrib 2018-08-14 09:38:15 -04:00
David Sidrane 9f96aa7a1e nxphlite-v3:Match bootloader VENDORSTR 2018-08-14 09:38:15 -04:00
David Sidrane 5044426949 nxphlite-v3:Use non data time RTC configuration.
One a 32.768 is added (RC16) to the board this will keep time.
2018-08-14 09:38:15 -04:00
David Sidrane f0c981312f nxphlite-v3:SDIO DMA working.
The fix ix in nuttx. This is just the defconfig changes to use
   it.

   There were 2 problems. The first was that the interrupt did
   test DINT and raise a completion events. But since DINT is
   just an indication of DMA completion, TC is a valid way to
   determine that the transfer is complete.

   The second problem is that Software Reset For DAT Line
   SDHC_SYSCTL[RSTD] clears the bits 24-0 in SDHC_PROTO
   this looses the wide bus setting DTW
2018-08-14 09:38:15 -04:00
David Sidrane 26bc2d90d8 Upates nuttx Submodule - backport USB fix 2018-08-14 09:38:15 -04:00
David Sidrane f8085423fe Updated platforms/nuttx/NuttX/nuttx:as rebased on px4_firmware_nuttx-7.22+ 2018-08-14 09:38:15 -04:00
David Sidrane 9ccb9345be nxphlite-v3:bin file must be padded to multiple of 8
Flash programing on the K66 has to be units of 8 bytes. So we cache
   the write of words until there are 2 written. Then the 2 words are
   written to FLASH. This change ensure the bin file has an even
   number of (4 byte) words by padding the last section in progflash
   with 0xffffffff if needed.
2018-08-14 09:38:15 -04:00
David Sidrane cb58fa5131 NXPHlite-V3:Prep for bootloader of 24K load address is 0x6000 2018-08-14 09:38:15 -04:00
David Sidrane 881fbd2197 Prep for Bootloader - Use NXP's VID and PID=board_id of 28 2018-08-14 09:38:15 -04:00
David Sidrane a1a03bd6ae update nxphlite-v3.prototype to use original unused board_id
Since nxphlite V1 was never released, we reused that code point.
2018-08-14 09:38:15 -04:00
David Sidrane 5726352040 NXPhlite grow init stack 56B 2018-08-14 09:38:15 -04:00