Commit Graph

359 Commits

Author SHA1 Message Date
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
Jan Okle 0754b3566c Enable DMA based serial driver and add polling serial driver for more data. 2018-08-14 09:38:15 -04:00
Beat Küng 9d66bcefd3 posix main: print script failure as an error instead of a warning 2018-08-13 21:50:14 -04:00
Beat Küng 9ba2e91fa1 ROMFS: avoid empty 'then else' clause, it's an error in bash
Use 'if ! <cmd>' instead.
2018-08-13 21:50:14 -04:00
Beat Küng 1318e614ad SITL: handle 'make posix_sitl_shell' via unified rcS
The command is now: 'make posix none_shell'
which means: don't start a simulator and run a minimal shell only.
2018-08-13 21:50:14 -04:00
Beat Küng ab7f68f2ad ekf2 replay: refactor to use unified rcS scripts 2018-08-13 21:50:14 -04:00
Daniel Agar 34f1bbeb44 px4fmu-v2 disable errno strings 2018-08-13 22:45:34 +02:00
Beat Küng e5ed05766d px4_daemon server: fix startup race condition
The FIFO was created in the server thread, and the PX4 main thread could
already have continued and started to execute the bash script.
In that case the client tried to open the FIFO but it did not exist yet.

Client error:
ERROR [px4_daemon] pipe open fail
ERROR [px4_daemon] Could not send commands
2018-08-13 14:26:41 +02:00
Beat Küng 52168f9665 px4_daemon client: improve error output 2018-08-13 14:26:41 +02:00
Beat Küng 30fb82d9b4 fmu-v5 defconfig: increase USART3 from 1500 to 3000
This is needed for companions with high baudrate and high data rate.
Tested with 1500000 Baudrate and mavlink TX rate of ~120KB/s: no drops.

I did not test the exact limit, something like 2500 might be enough. But
we (still) have enough free RAM on FMU-v5.
2018-08-10 07:11:07 +02:00
Beat Küng ffffcaeb0f px4-alias.sh_in: move to platforms/posix/src/px4-alias.sh_in 2018-08-08 21:09:39 +02:00
Beat Küng 23b12f02e7 cmake: fix install target (add bin dir which includes the symlinks and px4-alias.sh) 2018-08-08 21:09:39 +02:00
Beat Küng 5363aff879 fixes for integration and unit tests
Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
2018-08-08 21:09:39 +02:00
Beat Küng 0edd7c93e1 posix main: check for ROS argument 2018-08-08 21:09:39 +02:00
Beat Küng a5de82aaa8 cmake: add documentation for px4_posix_generate_alias and px4_posix_generate_symlinks 2018-08-08 21:09:39 +02:00
Beat Küng ec09379813 px4_daemon: fixes for clang-tidy
Also ignore the warning:
error: calling 'system' uses a command processor [cert-env33-c,-warnings-as-errors]
2018-08-08 21:09:39 +02:00
Beat Küng efb202106f bbblue: required changes for posix shell 2018-08-08 21:09:39 +02:00
Beat Küng e6d71680ab px4_daemon server: fix packet reading
By reading sizeof(packet), it could have happened that 2 packets at once
were read, and the second one was then ignored.
This makes sure that only one packet at a time is read.

The other 2 changes are for efficiency.
2018-08-08 21:09:39 +02:00
Beat Küng 1f0655302c px4_daemon: fix locking
It was not enough to lock individual accesses to the maps.
For example it could happen that a thread was started and exited very
quickly, before the pthread_t item was inserted into the map, such
that when the cleanup method was called, the thread and pipe fd were not
found (and fd=0=stdin was closed).
2018-08-08 21:09:39 +02:00
Beat Küng 5b171bd614 px4_daemon: fixes for packet length computation
The enum change from uint8_t to an int avoids uninitialized bytes,
which led to valgrind warnings (no error though).
2018-08-08 21:09:39 +02:00
Beat Küng d90ac975a7 posix shell: required updates for RPi, bepob, ocpoc, eagle & exxcelsior
- RPi works
- the rest is not tested, and requires a bit more
  (such as uploading the bin/ directory)
2018-08-08 21:09:39 +02:00
Beat Küng d05b268d19 posix shell: allow to run multiple instances 2018-08-08 21:09:39 +02:00
Beat Küng 7822e5b5c3 posix shell: lots of cleanup and fixes
- move posix-configs/SITL/init/{rcS,10016_iris,6011_typhoon_h480} to ROMFS/px4fmu_common/init.d-posix
  allows for easier unification, only one symlink is required.
  - rcS: add AUTOCNF support. Update scripts to match with behavior of PX4
    master (parameter values, some sitl driver got removed)
- add alias to allow 'set variable value' syntax in scripts to px4-alias.sh
- use px4_getopt
- use separate argument for the test_data directory
- append PATH from within the px4 binary: this simplifies the usage
  w/o the sitl_run.sh script.
- add 'source px4-alias.sh' to all existing sitl startup scripts
- move sitl mixers to ROMFS/px4fmu_common/mixers-sitl
  makes it easier to use existing mixers and sitl-specific ones.
- remove unused rcS_gazebo_delta_wing
2018-08-08 21:09:39 +02:00
Beat Küng 413c09e20e posix main: some cleanup & fixes
- argv[0] can have the form ./px4-commander
- create eeprom directory
- fix fpe signal handler
2018-08-08 21:09:39 +02:00
Julian Oes 0c5c741b1a add posix shell
squashed & rebased version, not including:
- listener changes
- src/firmware renaming

Commits:

tag_to_version.py: fix Python3 error

subprocess.communicate returns bytes instead of a str which is not the
same for Python3. Therefore, we need to decode the bytes.

cmake: remove folder src/firmware

The folder src/firmware was not intuitive. Why would the binaries for
SITL be inside a src and why even inside a src/firmware folder. Also,
the rootfs was put there which made it even more confusing.

The CMakeLists.txt files are moved into cmake/ and get now called from
the main CMakeLists.txt.

qshell: support for return value

Instead of just sending commands, qshell will now also wait until
the command has finished on QURT and sent back a return value. This will
allow all modules on the DSP side to be spawned from the Linux side
meaning that we only need one config/startup file instead of two.

adb_upload: create folders before pushing

Previously the script failed if the folder on the destination was not
already existing. This therefore makes pushing easier.

posix: spawn PX4 modules in bash

This adds the possibility to spawn PX4 modules out of bash. Basically,
the main executable can now be started as a server/daemon or as a
client.
The server replaces the existing functionality of the main exe with
the pxh shell, however, it also opens a pipe that clients can talk to.

Clients can run or spawn PX4 modules or commands by connecting to the
server over the pipe. They clients will get the stdout and return value
of their commands via a client specific pipe back.

This work will allow to start all modules using a bash script similar to
the way it is done in NuttX where the NuttShell scripts the startup
scripts and starts the modules.

SITL: use new client shell in SITL

This is a first step to use the new shell capabilities for SITL.
The new startup bash script rcS merges (and therefore replaces) the two
existing scripts rcS_gazebo_iris and rcS_jmavsim_iris.

More cleanup will be necessary for the rest of the SITL startup scripts.

Snapdragon: use new shell to start all modules

Instead of different mainapp.config and px4.config files, we can now use
a unified rcS bash script which starts all the modules based on
parameters, mainly the SYS_AUTOSTART param.

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

The comment was wrong that argv needs an additional 0 termination.
Instead it needs a nullptr at the end.

px4_posix_tasks: variable cleanup

The px4_task_spawn_cmd function got a cleanup while debugging, however,
no functional changes.

Snapdragon: move some drivers to 4100 config

These drivers are supported by the community, so they go into the 4100
config.

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

apps.h_in: fix string printf: use .c_str()

px4_daemon: \b -> \n in printf

px4_daemon: handle error in generate_uuid (close the file on error)

posix main: some clarifications in comment (it's the symlinks not the script aliases)

cmake: remove new install command again

This one was probably wrong and untested. Installing needs revisiting.

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

Instead of using non-working install commands, the mixer and startup
files are now copied as part of the build in cmake.

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

chroot is removed because it hasn't been used anywhere and seems
untested.

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

The client pipe is supposed to be specific (by UUID), so the path
shouldn't exist already.

history: limit the number of history entries

This is a protection to avoid filling the memory if we are entering a
lot of commands (e.g. auto-generated).

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

Sometimes the client ends up reading more than one packet in one read.
The parsing is not made for this and would require a (ring)buffer for
it.

The solution of this commit just reads as much as needed from the pipe
which avoids having to do buffering and parsing.

posix: changes sitl_run.sh and main.cpp cleanup

This changes the paths in sitl_run.sh quite a bit to allow the px4
binary to run in the rootfs directory which should make it convenient
and very close to the NuttX variant.

Also main.cpp got a big cleanup after the big rebase with some
conflicts. Quite some functionality was removed but it has yet to be
seen if it needs to be re-added.

px4_log: cleanup log levels, now they make sense

Before DEBUG and INFO log levels where inverted which didn't make much
sense in my eyes.

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

- Support for different models using the unified startup
script rcS.
- Support to choose the estimator by setting the environment variable
  PX4_ESTIMATOR.
- Support to choose the logger by setting the environment variable
  PX4_LOGGER.

rcS: fix string comparison

listener: use template file

Instead of having all of the C++ code inside the Python file it is
nicer to have a separate template file with the C++ headers, etc.

px4_log: add PX4_INFO_RAW for raw printfs

This allows to do custom formatting but is still transported over
sockets to clients.

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

Hopefully this makes it easier to read and change in the future.

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

px4_daemon: fixes after rebase of apps.h/cpp fix

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

This makes the unit test compile and link again after the bash changes.

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

The shutdown command needs to be a proper systemcmd, otherwise the alias
and symlink generation doesn't work and we end up calling shutdown of
the host computer which is to be avoided.

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

There is no good reason to use a specific test mixer, except more cmake
code around it. Therefore just use the same mixer as default, and at
some point px4fmu_test and px4fmu_default can get merged

POSIX: cleanup, dir and symlink fixes

This cleans up the logic behind the symlinking and creating directories.

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

sitl_run.sh: try to make this run on Mac as well

cmake: try to make jenkins happier

Path cleanup, the bin is no longer in src/firmware

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

This was fine with cmake 3.6 but did not work with cmake 3.2.2

cmake: use cp instead of cmake -E copy

cmake -E copy does not support copying multiple files with versions <
3.5. Therefore, just use cp for now.

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
David Sidrane 5da93ad7c5 px4fmu-v4pro:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
Bob-F cc3727bfbd skip creation of self-pointing link 2018-08-06 13:32:36 +02:00
Bob-F e056aa3204 Roll back change that handles absent test_data directory 2018-08-06 13:32:36 +02:00
Bob-F 082ef85773 handled a document issue and the case of absent test_data directory 2018-08-06 13:32:36 +02:00
Bob-F 627ea3b23e update according to pull request review comments 2018-08-06 13:32:36 +02:00
Bob-F 2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
Daniel Agar b1d3bb0403
stop ignoring Wmissing-field-initializers and fix (#9912) 2018-07-22 12:45:52 -04:00
David Sidrane 7a4ac739f1 Fix Stack warning 2018-07-20 18:29:58 +02:00
Dennis Mannhart 9c7c60ddc8 remove mc_pos_control_tests 2018-07-20 09:26:18 +02:00
vkotaru 96920e0370 AUTOPILOT_HOST address for Raspberrypi2/3 included in posix CMakeLists.txt 2018-07-18 22:31:32 +02:00
Beat Küng 6dda641cc0 omnibus-f4sd defconfig: change USB vendor & product strings to match with the bootloader
This fixes automatic upload. Since ed95dced0f the NuttX string
is used for device detection, but Linux uses the bootloader's USB vendor
and product strings.
So the NuttX strings must match with the ones from the bootloader.
2018-07-18 22:30:45 +02:00
David Sidrane 6f3783221f px4fmu-v5:Enable CONFIG_STM32F7_USART_SINGLEWIRE
FMUv5 has singlewire support
2018-07-17 08:53:29 +02:00
David Sidrane 657af126b0 Update nuttx submodule with USART_SINGLEWIRE support on f7 2018-07-17 08:53:29 +02:00
Beat Küng 3f0a398a25 Omnibus F4 SD: fix UART4
- do not configure RSSI GPIO pin
- disable serial console on UART4
2018-07-10 19:39:50 +02:00
Daniel Agar 00c34d8a2b AV-X board support 2018-07-08 10:18:13 -04:00
Daniel Agar 8599495082 uORB add ORB_COMMUNICATOR define to enable remote uORB 2018-07-01 16:03:03 +00:00
Daniel Agar 11d348ec4f microbench split into hrt, math, matrix, uorb 2018-07-01 09:25:22 +00:00
Daniel Agar 3ba97297d5 tests simple timing microbenchmark 2018-07-01 09:25:22 +00:00
Daniel Agar 7efdec1469 cmake nuttx skip upload helper without cdcacm 2018-06-28 19:35:36 +00:00
Daniel Agar ed95dced0f cmake nuttx upload use vendor and product string 2018-06-28 19:35:36 +00:00
PX4 Jenkins 18abeb1118 PX4-NuttX/nuttx branch test: px4_firmware_nuttx-7.22+
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4_firmware_nuttx-7.22+
 - d5c12b24fa

Changes from PX4-NuttX/nuttx (f57752b6f1) in current PX4/master (bb8e653469)
f57752b6f1...d5c12b24fa

d5c12b2 (HEAD, origin/px4_firmware_nuttx-7.22+, origin/HEAD, px4_firmware_nuttx-7.22+) [BACKPORT] stm32f7:I2C reset Configure I2C pins as GPIO output

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4_firmware_nuttx-7.22+
 - 36806ba3d8

Changes from PX4-NuttX/apps (36806ba3d8) in current PX4/master (bb8e653469)
36806ba3d8...36806ba3d8
2018-06-27 20:21:02 -04:00
PX4 Jenkins a5d5d5e38e Update submodule nuttx to latest Mon Jun 25 21:26:34 EDT 2018
- nuttx in PX4/Firmware (537fe886015be0ccb6b691a8a2802fb29d17c410): 63775322bf
    - nuttx current upstream: f57752b6f1
    - Changes: 63775322bf...f57752b6f1

    f57752b 2018-06-25 Daniel Agar - Merged in dagar/nuttx/pr-fixCompileError (pull request #660)
2018-06-26 06:42:42 +02:00
Daniel Agar 6b02fc083e cmake PMP fetch FlameGraph to build directory 2018-06-23 15:00:51 +02:00
korigod 4dfd77a0cd cmake: add nuttx force-upload target (#9717)
If the PX4FMUv2 board does not have the v5 uploader, it's not possible
to check the silicon revision to make sure it's safe to upload the
firmware which is more than 1 MB. However, if the user is sure the
silicon revision is not affected by this errata, he can upload the
firmware using px4_uploader.py with --force argument. This commit adds
`force-upload` make target to do it more convenient way.

Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2018-06-20 10:37:01 -04:00
PX4 Jenkins af07d4b37b Update submodule apps to latest Fri Jun 15 15:25:42 UTC 2018
- apps in PX4/Firmware (1bc4a73eaacdb40f7d3f5ebd11882913b541b419): 7e2f17db4e
    - apps current upstream: 36806ba3d8
    - Changes: 7e2f17db4e...36806ba3d8

    36806ba 2018-06-06 Beat Küng - nsh_parse.c: fix 'while' and 'until' loop condition
2018-06-15 11:56:15 -04:00
David Sidrane 3098b09bbd Updated submudule platforms/nuttx/NuttX/nuttx
to include [BACKPORT] Merged in kekiefer/nuttx/stm32f7-serial-fix-tiocssinglewire-upstream
2018-06-14 17:25:24 -04:00
Beat Küng 036b59f3de posix main: convert c to a char when extending add_string 2018-06-13 16:19:34 +02:00
Beat Küng 4eda0ed782 posix main shell: fix getchar() return value and check for EOF to avoid busy loop 2018-06-13 16:19:34 +02:00
Daniel Agar b183764dc7 cmake nuttx fix upload target 2018-06-12 16:46:21 -04:00
PX4 Jenkins 55728ab129 Update submodule nuttx to latest Tue Jun 12 15:14:01 CDT 2018
- nuttx in PX4/Firmware (ed7eb8b4b4f792b8c373692812c8e255669f482e): 0ac630e6d0
    - nuttx current upstream: 80e58380a8
    - Changes: 0ac630e6d0...80e58380a8

    80e5838 2018-06-07 David Sidrane - [REJECTED] When console is absent preserve stdio fd numbering.
2018-06-12 13:43:03 -07:00
Daniel Agar 4d3ad1b5c3 cmake consistency with build directory and and nuttx binary naming 2018-06-12 10:14:03 +02:00
Elia Tarasov 981db0e21d add iris_vision sitl model 2018-06-10 21:26:44 -04:00
MaEtUgR 01afeed967 cmake nuttx upload: add verbatim parameter
to disable automatic evaluation of /dev/ttyS* expression in cygwin.
On linux verbatim seems to be default anyways. At least it doesn't get
evaluated on linux.
2018-06-06 12:32:03 +02:00
Beat Küng 537451c2a0 Debug/Nuttx.py: fix 'mon reg' does not exist
Also there was no register xPSR.

Stack usage calculation is still broken...
2018-06-01 19:27:30 +02:00
Beat Küng f8dd833a14 onmibus-f4sd: add ADC support 2018-05-31 19:13:00 +02:00
Daniel Agar 6ca078425e Jenkins archive nuttx bin file 2018-05-31 07:38:07 +02:00
Daniel Agar 3e843ba2d2 posix main add SIGSEGV handler 2018-05-28 08:40:05 +02:00
Anthony Lamping 780d147c01 cmake: package don't use bin and share dirs 2018-05-25 01:32:26 -04:00
Anthony Lamping ef5de4de87 cmake: package create tarball 2018-05-25 01:32:26 -04:00
Anthony Lamping 0e80210f33 cmake: package px4 with sitl_gazebo plugins for jenkins ROS tests 2018-05-25 01:32:26 -04:00
Joshua Whitehead 3b6b1ee066 Use Nuttx defconfig defines to determine arch (#9516)
These hard coded paths assume all Nuttx targets are ARMv7-M targets. Updating them to use ${CONFIG_ARCH} and ${CONFIG_ARCH_FAMILY} instead allows for the architecture defined by the incoming Nuttx defconfig to be correctly targeted.
2018-05-23 15:20:39 -04:00
Roman 464db32567 removed error message in qurt stub implementation of putchar
Signed-off-by: Roman <bapstroman@gmail.com>
2018-05-23 10:08:28 -04:00
Daniel Agar 305e1b7b95 qurt cmake dependency fixes 2018-05-23 10:08:28 -04:00
Daniel Agar 48724e44dd NuttX build use 'all' target within each lib 2018-05-22 15:17:21 -04:00
DanielePettenuzzo b822966e8e crazyflie: support for sd card board via SPI 2018-05-22 12:21:45 +02:00
nathan 5483b59674 bring omnibusf4 defconfig up to date via menuconfig 2018-05-20 11:54:17 +02:00
nathan f754d092f8 Initial omnibusf4sd target support
Flight tested: ekf2 w/ mag and compass by @nathantsoi: https://logs.px4.io/plot_app?log=79b81031-cf1e-41f0-890b-d6cd7d559766

NOTE: external I2C devices need a pullup. I have tested with a 3.3v 2.2k pullup.

Working:
 - mpu6000, bench tested and verified via nsh
 - fmu
 - all 6 ch output bench tested w/ pwm and oneshot via nsh
 - ppm input bench tested
 - dsm input bench tested
 - bmp280, bench tested and verified via nsh
 - hmc5883, bench tested and verified via nsh, but requires an external i2c pullup
 - gps on uart6
 - startuplog, nsh, mavlink on uart4, but params are not sent for some reason. RSSI pin is TX, MOTOR 5 is RX (normal mode, 57600 baud)
 - rgbled over i2c, bench tested and workingp
 - sbus via the shared sbus/ppm pin (which includes an inverter to the mcu SBUS in pin), remove the solder bridge or jumper to the ppm pin before use

Not yet implemented:
  - ADC
  - OSD: passthrough video is untested, use at your own risk until a basic driver is implemented.
2018-05-20 11:54:17 +02:00
Daniel Agar dc1e91137a cmake add bloaty helpers for nuttx and use in Jenkins 2018-05-17 18:27:00 -04:00
Matthias Grob 58dd7be12a Cygwin: enable arm nuttx upload within cygwin
In the Cygwin environment the native Windows serial COM# ports get mapped
to /dev/ttyS# for POSIX compatibility. While # is one number lower inside
the environment than the COM port number because it's 0 indexed instead
of 1.

I added the necessary handling to all the dependent parts I found which
allows uploading to /dev/ttyS# when the cygwin platform is detected.
Now the usual "make px4fmu-v4 upload" and
"./Tools/upload.sh build/px4fmu-v4_default/px4fmu-v4_default.px4" work.
2018-05-09 11:31:42 +02:00
Beat Küng 9772380779 posix main: avoid declaring px4_main_t, include the correct header instead 2018-05-09 07:59:46 +02:00
Daniel Agar 5de5d6ea49 Jenkins simple mission code coverage build 2018-05-05 19:49:50 -04:00
David Sidrane cc061885f0 nxphlite-v3:Remove OTG config qualifier
This board supports USB but not doen not support OTG.
2018-05-01 11:33:29 -07:00
PX4 Jenkins 1d9bf83c51 Update submodule nuttx to latest Mon Apr 30 20:26:28 CDT 2018
- nuttx in PX4/Firmware (8404889098): 65b87d092a
    - nuttx current upstream: 0ac630e6d0
    - Changes: 65b87d092a...0ac630e6d0

    0ac630e 2018-04-28 David Sidrane - [BACKPORT] Merged in david_s5/nuttx/master_kinetis_usb_fixes (pull request #634)
2018-05-01 11:33:29 -07:00
Daniel Agar 8404889098 delete unused ADCSIM
- set BOARD_NUMBER_BRICKS to 0 for boards without analog power bricks
2018-04-29 21:48:54 -04:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Daniel Agar 5f175f9712
Update submodule nuttx to latest px4_firmware_nuttx-7.22+ (#9354)
- Changes: fe0dc6c41a...65b87d092a

    65b87d0 2018-04-19 Daniel Agar - [PX4 BACKPORT] Merged in dagar/nuttx/pr-stm32f777_typo (pull request #628)
2018-04-23 00:18:19 -04:00
Daniel Agar 90b81cf4c4 move check stack to cmake and run in Jenkins 2018-04-13 23:24:34 -04:00
Daniel Agar 036d920070 NuttX cleanup debug helpers and add profile target 2018-04-09 12:07:05 -04:00
Daniel Agar 735c5544ae tests add ctlmath and use float FLT_EPSILON 2018-04-09 02:23:26 -04:00
barzanisar 7ac3c97aad Improve the Crazyflie MAVLink tunnel to increase efficiency
This change fragments MAVLink packets more efficiently and therefore increases the net throughput. This in turn makes the connection significantly more stable and the Crazyflie experience overall more usable.
2018-04-05 18:11:03 +02:00
Lorenz Meier 8c28591f2d FMUv5: Swap debug and PX4 IO serial ports to avoid DMA channel resource overlap
This is necessary to be able to use DMA on the IO link. We free one channel by disabling DMA entirely on the debug console.
2018-04-04 12:08:34 +02:00
Daniel Agar 68a9d213d2 NuttX track px4_firmware_nuttx-7.22+ branch 2018-04-02 15:58:04 -04:00
barzanisar 691a5c6532 Beat's changes in syslink work so reverting this
No need for this since beat's changes in syslink_main.cpp work for connecting crazyflie to QGC. 
Will open a separate PR for it.
2018-03-16 14:13:21 +01:00
barzanisar 0f79222ff9 This makes QGC connect with crazyflie
Discussed in https://github.com/PX4/Firmware/issues/8924
2018-03-16 09:31:58 +01:00
Daniel Agar bb7466c596 move rgbled i2c address into driver 2018-03-14 14:38:40 -04:00
Jan Okle 63121b74df NuttX update - fix kinetis transmission status handling in the serial interrupt (#8944)
efc3d9e92b
2018-03-12 11:56:59 +01:00
Simone Guscetti dbdb2c9c22 px4-fmuv5: config fix stm32f7 max SD card speed
In the stm32f7 the configuration variable for SD card with DMA changed from CONFIG_STM32_SDIO_DMA to CONFIG_STM32F7_SDMMC_DMA
the maximum clock speed of 16MHz can now be achieved.
2018-03-09 14:54:54 +01:00
Daniel Agar 38f5f60a1e pwm_out_sim cleanup
- move to ModuleBase
 - strip down to PWM 8 and 16 modes only
 - remove all dead code
 - implement missing pwm ioctls (current value, rates, etc)
 - default rate 50Hz -> 400Hz
2018-03-04 14:12:15 -05:00
Roman 2886fe8da3 posix-configs: added sitl startup script for gazebo quad tiltrotor model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Daniel Agar f7a17ad5e5
cmake improve ROMFS dependencies for px4io inclusion (#8860)
- fixes #8858
2018-02-09 12:57:34 -05:00
Daniel Agar 102c0ead53 cmake consolidate px4 executable builds and upload 2018-02-01 09:00:13 -05:00
Daniel Agar 2ff81393bc move posix, nuttx, qurt components into platforms 2018-01-31 17:17:07 +01:00
Matthias Grob 463217a5f9 Cygwin: repair NuttX build (#8737)
* Cygwin: repaired NuttX build after 1f63d85869
all the NuttX specific WINTOOL define handling was skiped in cmake Make.defs generation
The Nuttx build is makfile based and needs its cygwin treatment

Additionally the ${PX4_SOURCE_DIR}/src/include which was added through cmake needs path conversion

The two root causes for the special handling are:
- ARM GCC for Windows doesn't support cygwin paths passed as an argument
  so they need to be either relative or converted via cypath tool
- Symbolic links are totally different under Windows and because NuttX uses them extensively
  it has special handling scripts that need to be fed with the correct defines

* Cygwin: NuttX include paths all converted in Make.defs.in

differentiate between WINTOOL define (MSYS & cygwin) and cygwin using uname command:
- MSYS needs symbolic link handling for ARM GCC but no path conversion
- Cygwin needs both
2018-01-20 23:26:12 -05:00
Daniel Agar 5ab6834fed NuttX Make.defs.in ignore -Werror=logical-op
This is a temporary workaround for equal expressions in chip/sam_xdmac.c
and can be reverted once fixed properly in NuttX. Needed for the GCC 7
upgrade in #8551.
2018-01-15 12:57:29 -05:00
Nicolas de Palezieux f600cfbb9f Add support for testing precision landing in SITL simulation 2018-01-15 10:27:23 +01:00
Daniel Agar 1f63d85869
NuttX generate Make.defs per config from PX4 cmake (#8573) 2018-01-05 22:47:10 -05:00
Matthias Grob c0c0666d5c Cygwin: use absolute path with cygpath conversion to the linker script again
because the relative path is interpreted differently on linux, mac and windows
2018-01-05 14:47:33 -05:00
Daniel Agar 275f462136 cmake determine relative path for firmware linking 2018-01-05 14:47:33 -05:00
Daniel Agar bf84cf0dcf Cygwin: use relative paths where needed 2018-01-05 14:47:33 -05:00
Matthias Grob be8adbfdf3 Cygwin: refactored & simplified some of the OS define logic 2018-01-05 14:47:33 -05:00
Matthias Grob 2186f7b1b1 Cygwin: Enable ARM build of px4fmu-vX_default under Windows Cygwin Environment 2018-01-05 14:47:33 -05:00
Matthias Grob 70de169f15 Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build.
- New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
- added all necessary exeptions to the defines
- disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems
  not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
  with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
2018-01-05 14:47:33 -05:00
Daniel Agar 02c4ec9b2a move nuttx-configs to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar 62c2fbb443 move Images to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar 2dcd617a8f move Debug to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar f2cd5e3e9f move src/firmware/ to platforms 2018-01-05 14:21:31 -05:00
Daniel Agar 678e2c415d move cmake/${OS} to platforms 2018-01-05 14:21:31 -05:00
Daniel Agar b4f570e459 NuttX update to latest 7.22+ with pipes poll fix
https://github.com/PX4-NuttX/nuttx/pull/7
2017-12-07 14:09:59 -05:00
Daniel Agar 1a9e2ac789 cmake NuttX wrapper work around windows cygwin path issues 2017-12-01 02:04:28 -05:00
Daniel Agar d1a4c2dcd0 cmake handle git submodule depdencies 2017-11-23 00:22:45 -05:00
Daniel Agar 1a4f4b083c
cmake nuttx keep builtins generated by nuttx apps (#8323) 2017-11-20 20:20:05 -05:00
Daniel Agar c1c176d65b cmake nuttx build net if enabled 2017-11-18 20:52:10 +01:00
Daniel Agar 7608cec1ed cmake NuttX improve builtin generation dependencies 2017-11-18 11:52:55 -05:00
Daniel Agar d35de9b4e3 cmake nuttx copy source into build with relative paths
- this works around cygwin path issues on windows
2017-11-18 11:52:55 -05:00
Lucas De Marchi 3a84d4cfeb build: fix NuttX menuconfig
There was and extra "nuttx" dir:
	cp: cannot stat '/home/lucas/p/dronecode/PX4/Firmware/build/aerofc-v1_default/NuttX/nuttx/nuttx/.config': No such file or directory
	FAILED: NuttX/CMakeFiles/menuconfig

And the board fixup being executed from the wrong working directory:
	nuttx-configs/aerofc-v1/nsh/defconfig
	fatal: Path 'nuttx-configs/aerofc-v1/nsh/defconfig' does not exist in 'HEAD'
2017-10-12 10:00:51 +02:00
Daniel Agar 8d07c647f7 NuttX improve apps builtins dependencies 2017-10-05 11:28:10 -10:00
Daniel Agar 9ce3412a93 NuttX board build not needed (#8029) 2017-09-29 06:48:25 -10:00
David Sidrane 95cea13090 Updated nuttx and apps submodules for 1.7 Release
Tied to nuttx, apps  px4_firmware_nuttx-master
     rebased on upstream nuttx master @ 3647ace55958c094cfe93f07092d308a768f5ca3
     rebased on upstream apps master @ 21c9b793e2ca6f4e86388c80d7af5c466de5e71c
2017-09-29 10:13:51 -04:00
Daniel Agar 2113772443 improve nuttx verbose build 2017-09-29 10:13:51 -04:00
Daniel Agar 03784c6b01 nuttx fix px4 builtin generation dependency 2017-09-29 10:13:51 -04:00
Daniel Agar e38136fc9f NuttX build re-enable hard link copy and improve builtin_list 2017-09-29 10:13:51 -04:00
David Sidrane bb71e47ddf Updated nuttx submoulde 7.22+ w/i2c fix ==px4_firmware_nuttx-master
Latest nuttx 7.22+ with PX4 contrib for stm32 f4 I2C hang.
2017-09-29 10:13:51 -04:00
David Sidrane 0f028fda3b Update nuttx and apps submodule to 7.22+ ==px4_firmware_nuttx-master
Prep for Nuttx Upgrade - still needs i2c fix
2017-09-29 10:13:51 -04:00
David Sidrane 3c384f1890 Updated nuttx and apps submudule 7.22+ ==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane f83df2a9a6 Updated nuttx submodule 7.22+
Updated to latest upstream with PX4 contrib for STM32 I2C that
  fixes an hang in driver.
2017-09-29 10:13:51 -04:00
David Sidrane 1c6dc4b84c Updated nuttx and apps submodules to Nuttx 7.22+ ==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane 822b390420 Update nuttx and apps submodule 7.21+==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane f641c1e15e Updated nuttx submodule 7.21+ ==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane 8b2ee2cb33 Updated nuttx submodule 7.21+ 2017-09-29 10:13:51 -04:00
David Sidrane 929c5d9b5e Updated NuttX submodule with upstream 7.21+ 2017-09-29 10:13:51 -04:00
Daniel Agar 01b3e6fd25 NuttX upgrade cmake wrapper (#7873)
* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
2017-09-29 10:13:51 -04:00
Lorenz Meier f36f54c621 Restructuring of generic middleware support files, wrapping of the main ROS calls, skeletons for publishers / subscribers 2014-11-09 11:57:34 +01:00
px4dev b80575fcff Break up the firmware build into a 'make export' phase for NuttX on a per-board basis, and then a separate per-config phase that allows us to avoid re-building NuttX all the time, and ship more than one firmware config for a given board.
This is a first cut; it builds one firmware for each of FMU and IO.
2013-02-23 22:00:58 -08:00