Commit Graph

1239 Commits

Author SHA1 Message Date
alexklimaj 7c2da8d1ef Enable ARKV6X SPIX SYNC, enable icm426889 and iim42652 CLKIN 2023-01-18 21:52:11 -05:00
Siddharth Bharat Purohit 1c63d5666b
boards: add support for CubeOrange+ (#20304)
Co-authored-by: Julian Oes <julian@oes.ch>
2023-01-17 20:55:57 -05:00
Daniel Agar 6991ac014c
rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
Daniel Agar 45912066d2 fix copyright header year range 2023-01-14 09:16:16 -05:00
Peter van der Perk 7d92d4893e VSCode C/C++ include path and config hints 2023-01-13 20:03:53 -05:00
Eric Katzfey ac80dcd7a8
Voxl2: add qurt i2c driver support and first i2c driver voxlpm 2023-01-13 19:59:41 -05:00
Eric Katzfey 2a315f86ca
Qurt specific drivers for testing and some updates to the startup process (#20917)
* Added a couple of Qurt specific drivers for testing and some updates to Qurt startup code
2023-01-12 20:17:30 -05:00
Daniel Agar 635daeed8a NuttX push jlink-nuttx into cmake and enable CONFIG_DEBUG_TCBINFO by default 2023-01-12 09:05:26 -05:00
Peter van der Perk 8b5f35b3fe Add S32K3 vscode support add Jlink rtos vscode support 2023-01-11 16:15:13 -05:00
Eric Katzfey 89180ac0f9 Fixed Kconfig and px4board files for voxl2 2023-01-11 09:53:18 -05:00
Daniel Agar 618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 75125da34c SITL sihsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 95a6eba36c SITL jmavsim make airframes simulator specific
-cleanup and simplify jmavsim SITL launch and debug
2023-01-07 17:00:35 -05:00
Peter van der Perk fa87375d0c Add hardfault log progmem flash backend 2023-01-04 12:52:01 -05:00
Peter van der Perk 4c2c06060d PX4Board kconfig add dependency chain for QURT & POSIX modules 2023-01-04 09:40:17 -05:00
Daniel Agar f37eb55e19 platforms/nuttx: FATAL error if NSH enabled and SET disabled 2022-12-29 12:50:37 -05:00
Peter van der Perk f7c183edd3 Update NuttX kernel for K3 changes 2022-12-28 10:21:58 -05:00
Peter van der Perk beabe56253 S32K3XX call functional reset on board_reset 2022-12-27 08:33:24 -05:00
Eric Katzfey c3e70b03aa
Add more to Voxl2 build and fix associated build errors (#20821)
- Do not pull in PWM parameters when DISABLE_PARAMS_MODULE_SCOPING is TRUE since VOXL2 has no PWM nor any of the required timer_config files that go along with that
 - Replace non-standard M_PI constants with PX4 defined M_PI_F constants
 - Include missing header file for function hrt_absolute_time declaration
 - Add new PX4_SOC_ARCH_ID for the VOXL2 board
2022-12-22 15:44:19 -05:00
David Sidrane b7ea31ceed s32k1xx:Add gpiosetevent 2022-12-20 09:31:05 -05:00
David Sidrane 022e941ebe NuttX with s32k3 Serial DMA 2022-12-20 09:27:40 -05:00
Eric Katzfey 678607117a
Qurt UART ESC driver support (#20784) 2022-12-20 01:25:12 -05:00
Peter van der Perk d945e87e4f S32K3 DRDY less ambigious 2022-12-16 12:02:44 -05:00
Peter van der Perk 05dd43a8de S32K3 Correct pinirq pinset for external interrupt 2022-12-16 12:02:44 -05:00
Peter van der Perk 52c0cba24b NuttX with TXAVAL merged
nxp_ucans32k146:Use txavail NuttX

   Fix Stack Size
   Expose some K1 debug features
2022-12-15 08:29:10 -05:00
Peter van der Perk f3fe10f63e S32K Dynamic periphclocks 2022-12-14 10:44:42 -05:00
Eric Katzfey e17ddcc0e5
Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt)
 - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
2022-12-12 22:02:23 -05:00
Eric Katzfey 9b3feee6ee
worker and HRT threads for Qurt platform (#20739)
* Getting work manager and hrt threads ready for Qurt platform
2022-12-12 14:25:28 -05:00
alexklimaj 29ade6c472 Increase SPI stacks by 16 bytes 2022-12-10 10:54:20 -05:00
Zachary Lowell e4f641e9b5
Qurt qshell implementation (#20736) 2022-12-09 16:49:41 -05:00
Zachary Lowell 643eed51cb
Qurt lightweight parameter implementation (#20735) 2022-12-09 09:55:49 -08:00
Peter van der Perk 5b7a2230fc Update NuttX kernel 2022-12-09 06:36:40 -05:00
Peter van der Perk 3b5f0e21bc Add Sysview support in conjunction with PX4 cpuload note driver 2022-12-09 06:36:40 -05:00
Beat Küng a502146d73 board_hw_rev_ver: fix hex printf 2022-12-09 07:52:50 +01:00
Beat Küng 8bde2a7a28 board_hw_rev_ver.c: check for 'rv == OK' before reading the revision
Otherwise a potential failure reading the hw version can get overwritten.
2022-12-09 07:52:50 +01:00
Daniel Agar 8114aad983
initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
2022-12-08 23:03:44 -05:00
Daniel Agar 72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
PX4 BuildBot 9c8bf0b4e0 Update submodule apps to latest Tue Dec 6 23:41:48 UTC 2022
- apps in PX4/Firmware (351bd1768a4a862f81b2a262225e945c0e4fe4fa): e04333c986
    - apps current upstream: a489381b49
    - Changes: e04333c986...a489381b49

    a489381b4 2022-10-17 Peter van der Perk - [REJECTED] Backport 0d06c1c netinit:Network Monitor add a polled option
7b7cd332e 2022-09-12 Peter van der Perk - [REJECTED] Backport dbcb783671cee8a8c97b5909d9eb818c3864ca93 FAT DMA fix
2022-12-06 19:37:39 -05:00
Zachary Lowell 91acd494a3
Qurt uORB communicator fixes (#20705)
- there was an issue sending a message from slpi to apps. Seems the code was stuck in an loop and crashed when the message was sent from slpi to apps
2022-12-06 10:33:19 -05:00
Peter van der Perk 45244e610f NXP MR-CANHUBK3 Support 2022-12-06 06:49:28 -05:00
alexklimaj b78b896498 Adjust min and max can bootloader timing for ardupilot compatibility 2022-11-29 10:21:28 -05:00
Daniel Agar 2cb4ef0629
NuttX 10.3+ upgrade (#20190)
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-11-20 20:28:07 -05:00
Jukka Laitinen ff3a3dac01 cdc_acm_check.cpp: Add missing #includes
- Include board_config.h for BOARD_GET_EXTERNAL_LOCKOUT_STATE etc. macros
- Include fcntl.h for "open"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-11-18 07:10:27 +01:00
Zachary Lowell 52b16d062c
uORB Remote Manager Update (#20623) 2022-11-17 13:51:01 -08:00
Eric Katzfey 796fa8bd72
boards/modalai: separate voxl2 builds into two board builds instead of single board build with different variants
* Made voxl2 apps processor and slpi dsp processor builds into separate board builds so that they can
more easily be configured independently.

* Removed board specific link library command from px4_config.cmake and moved it to a more generic
board specific solution that can be used by any board that needs custom link libraries.

* Removed redundant cmake command for Qurt

* Removed unused definition from Qurt cmake file

* Removed unnecessary QURT_LIB cmake function

* Reorganized the voxl2 build structure to avoid 4 level board directories.

* Reverted cmake files to remove 4 level board naming code

* Updated documentation
2022-11-15 13:09:04 -05:00
Igor Mišić 815eed2c6d mtd: add support for extended HW revision 2022-11-10 07:45:44 +01:00
Zachary Lowell ee11b57e75
Qurt platform configuration cleanup (#20583) 2022-11-09 11:24:00 -08:00
Zachary Lowell a9989df36c
Qurt uORB SLPI Implementation (#20538)
- allow uORB to be compiled and run on the qurt architecture.
2022-11-08 12:30:36 -05:00
tanja 2eed5306c0 SPI: use official HW_VER_REV function 2022-11-08 07:48:21 +01:00
Peter van der Perk 1fc1a81d8f UCANS32K146 Add support for 2nd PWM 2022-11-03 06:26:52 -04:00
Zachary Lowell a2d0199516
Uncommenting Qurt platform task code (#20533) 2022-11-01 15:35:20 -07:00
Zachary Lowell 6d2dd798a0
Qurt drv_hrt Implementation (#20528) 2022-10-31 15:40:29 -07:00
Zachary Lowell 82f63475d7
Qurt work_queue Implementation (#20522) 2022-10-31 09:59:10 -07:00
Eric Katzfey 34c852255e
Changed M_PI to M_PI_F in the matrix library since M_PI is non-standard. (#20458)
* Changed M_PI to M_PI_F in the matrix library since M_PI is non-standard.

* Added a new M_PI_PRECISE constant definition to px4_platform_common/defines.h to be
used in places when M_PI is desired but shouldn't be used because it is not C standard.

* Added the px4_platform_common/defines.h include to the matrix library math.hpp header to pull
in some non-standard M_PI constants and updated the test files to use those constants.

* Fixed PI constants in matrix helper test to prevent test failure
2022-10-31 11:51:23 -04:00
Zachary Lowell 824e02a8b6
Qurt tasks implementation (#20499) 2022-10-27 14:46:47 -07:00
Zachary Lowell eb16730400
Qurt IOCTL dependency addition (#20480) 2022-10-26 12:09:07 -07:00
Zachary Lowell 740d2fccb1
qurt: update for functional logger 2022-10-25 21:07:15 -04:00
Zachary Lowell bcae7e550b
Qurt platform/common dependency fixes 2022-10-25 21:06:00 -04:00
Eric Katzfey 4afd19f037 Moved the bad-function-cast compiler warning option out of the common flags and into
the nuttx and posix specific options files since this option cannot be used with
the qurt platform. There are header files in the hexagon sdk that fail this check.
2022-10-20 18:18:40 -04:00
Daniel Agar cea185268e
msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00
David Sidrane 3be8d52c8e imxrt:io_timers Support 1 channel per group (timer) 2022-10-13 08:17:51 +02:00
Beat Küng 3fcdf40a47 events: use PRIx32 to print uint32 2022-10-11 22:31:20 -04:00
Beat Küng 31dfdea12e commander: remove state_machine_helper tests 2022-10-11 22:31:20 -04:00
Zachary Lowell 4520186878
qurt: replacing qurt threads with pthread 2022-10-03 18:01:04 -04:00
Benjamin Perseghetti f9522e831c
Gazebo Simulation Enablement (#20319) 2022-09-29 13:49:31 -04:00
David Sidrane 99ef597719 Nuttx with backport of stm32h7:SDMMC fix unaligned access 2022-09-29 07:56:46 +02:00
Ville Juven 59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Daniel Agar 462d0af384 uORB: fix static orb_exists call for protected build
- unify ORBSet to maximum code coverage
2022-09-26 12:38:58 -04:00
Daniel Agar e58275e6f5 platforms/posix: restore none SITL helper target for replay 2022-09-23 19:20:01 -04:00
Eric Katzfey d30ccb2b1d
initial board and platform support for the ModalAI VOXL 2 (POSIX + QuRT) 2022-09-23 12:03:05 -04:00
Julian Oes 8080ca966a boards/platform: remove confusing override
This removes the odd px4_i2c_bus_external override which was confusing
me and lead to odd and inconsistent results.

The function is now only available with an int as the argument.
2022-09-23 20:54:08 +12:00
Daniel Agar a47895e809 [DO NOT MERGE] px4_i2c_device_external hacks 2022-09-20 10:31:26 +12:00
Beat Küng c707997b9e
lockstep_scheduler: use PRIu64 for timestamp printf 2022-09-19 10:04:31 -04:00
Daniel Agar 3440f543f1 simulator_ignition_bridge: wait for first clock set before returning successfully 2022-09-16 21:37:09 -04:00
Ville Juven f300ec1da2 px4_platform_common/atomic.h: fetch_add/sub were really fetch_inc/dec
fetch_add/sub were really inc/dec for the __atomic_always_lock_free == true
branch. This fixes them so that the arg "num" is actually used.
2022-09-15 21:11:08 -04:00
Ville Juven 3b9936edd2 hrt_ioctl: Move common code under /common folder
The HRT ioctl is common code, so move it out of chip specific code
2022-09-15 17:57:40 -04:00
Bruce Meagher b1c7098c54 Initial version of log history support. 2022-09-15 14:15:34 -04:00
Ville Juven 328bc5b8c2 image_toc.c: Check that the ToC actually lies within the first entry
As the first entry is used to sign / authenticate the ToC, make sure
the ToC is actually in the first entry.
2022-09-15 13:32:08 -04:00
Junwoo Hwang e3dff5c074 board_identity: Add UUID/MFGUID/GUID unit tests
- To check stack smashing (buffer overflow)
- To check if the buffer without enough length gets appropriate values
filled
- To check if the format has expected length
2022-09-15 13:06:15 -04:00
Junwoo Hwang f5215e8207 board_identity: Fix UUID format function buffer overflow bug
- Previously, not having a proper boundary check caused overflows in the
buffer (wrong memory access)
- Moreoever, negative size values getting introduced to snprintf &
strncat were also being truncated to unsigned value, hence causing
overflow, so index check needed to be added before both functions
- Fixed typo in board_common.h
2022-09-15 13:06:15 -04:00
Daniel Agar b8fb5dfa51
merge px4_sitl_ign into px4_sitl_default (#20188)
- for convenience merge px4_sitl_ign into px4_sitl_default, but allow simulator_ignition_bridge to quietly skip inclusion if ignition-transport isn't available
 - simulator_ignition_bridge only try setting the system clock in
lockstep builds
 - this simplifies usage and CI system dependencies
2022-09-10 16:18:02 -04:00
Daniel Agar 9d1aeb6aa7 platforms/posix: cleanup macos legacy 2022-09-09 13:05:06 -04:00
Daniel Agar ce337a3d80 delete unused PWM IOCTLs 2022-09-09 09:14:09 -04:00
Daniel Agar 5dd1e5a018 delete systemcmds/mixer 2022-09-09 09:14:09 -04:00
Julian Oes 6bd020e848 platforms: decrease flash usage by type for bus id
My assumption is that the bus are numbered < 127.
This saves about 100 bytes of flash.
2022-09-08 20:54:19 -04:00
Ville Juven 9c204774f1 px4_userspace_init: Fix NULL dereference for px4_spi_buses in user space
For targets that define the SPI buses via px4_spi_buses_all_hw, a call
to px4_set_spi_buses_from_hw_version() is needed. Otherwise a NULL
de-reference will occur when trying to access px4_spi_buses.

Fixes a system crash in px4_fmu-v5_protected:
up_assert: Assertion failed at file:armv7-m/arm_memfault.c line: 101 task: wq:lp_default
2022-09-08 07:05:11 +02:00
Ville Juven 9ed35debec board_ctrl: Clean up usage of VBUS, nARMED from user/kernelspace
Move logic implemented in the header files to source files, this way
it will be simpler to define which is compiled to kernel space and
which to user space

Also allows to remove some headers that pull in half the universe
from the board definitions (which should just be pin definitions and
no functionality)
2022-09-05 07:37:28 +02:00
Daniel Agar f66b5ce204
simulation: ignition bridge allow IMU or pose callbacks to update system time if newer than clock
* requires HRT lockstep changes to eliminate offset (PR #20146)
2022-09-01 20:42:21 -04:00
Daniel Agar c52f2143d2 posix lockstep remove HRT offset and use full sim time 2022-09-01 20:40:37 -04:00
Beat Küng 1370cc0d74 log.h: add PRINTF_LOG option for direct printf to reduce dependencies 2022-09-01 17:07:23 -04:00
Jukka Laitinen d6a4e158cf Add call-gates to px4_crypto for protected build
This adds kernel-userspace interfaces to crypto layer

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-08-31 09:48:49 +02:00
Beat Küng ad222760dd platforms: move CONFIG_FS_PROCFS_MAX_TASKS definition to cpuload.h
So it's used for both cases
2022-08-25 22:02:15 -04:00
Beat Küng 4230eee24f commander: print 'ready for takeoff' to console for sitl after startup 2022-08-25 22:02:15 -04:00
Beat Küng c95192d050 orb_print_message_internal: handle 64 bit bitsets 2022-08-25 22:02:15 -04:00
Beat Küng 04f7df3848 SubscriptionMultiArray: use Subscription instead of SubscriptionInterval
Saves ~3KB RAM on fmu-v5.
2022-08-25 22:02:15 -04:00
Ville Juven f60f6d2425 Remove px4_work_queue from the kernel side LD command
The comment is right, it is not needed -> get rid of it
2022-08-25 13:30:11 -04:00
Daniel Agar 4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
Ville Juven 213d5dac2a platforms/nuttx: Fix hard coded path for karch library
Use CONFIG_ARCH instead of arm
2022-08-23 21:05:41 -04:00
Daniel Agar cfc579542e
new Ignition Gazebo simulation interface architecture (#20057)
- much simpler direct interface using Ignition Transport 
 - in tree models and worlds
 - control allocation output configuration, no more magic actuator mapping to mavlink and back
 - currently requires no custom Gazebo plugins (keeping things as lightweight and simple as possible)

Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
2022-08-22 10:58:19 -04:00
Thomas Debrunner 44a18acd51
Fix race condition in px4io serial driver (#20005)
* px4io: prevent memory corruption on corrput io data

* px4io_serial: Prevent race between handling wait timeout case and interrupt posting semaphore
2022-08-18 17:46:47 +02:00