Commit Graph

1083 Commits

Author SHA1 Message Date
Beat Küng f22dc80ecc system: add missing includes (added indirectly via visibility.h for normal builds) 2022-07-20 01:14:04 -04:00
Peter van der Perk 47aaa38d5f Added DroneCAN SocketCAN driver Skeleton 2022-07-20 01:12:43 -04:00
Roman Dvořák ed14151734
Update Flight-gear bridge, Add support of TF-G2 autogyro flight-gear model (#19122)
* Add Transfer of RPM from FG to PX4,
	-switch FG_bridge module to ThudnderFlyaerospace

* Add TF-G2 flightgear sim target

* Add simulator support, fix astyle

* Update SITL TF-G2 airframe, update fg bridge

Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2022-07-19 09:11:44 +02:00
Daniel Agar a73efd9c4f NuttX carry minimal c++ cmath (replacing Matrix stdlib_imports.hpp) 2022-07-12 08:05:06 -04:00
Beat Küng 6f8663ac62 mcp23009: add drivers__device cmake dependency
needed for device::I2C
2022-07-06 07:50:18 -04:00
Igor Mišić dff946c39a usr_mcu_version: add missing headers 2022-07-05 09:29:26 +02:00
Igor Mišić 4b503c310e Merge PR #19575 (changes to pr-extendend_hw_ver_rev_format)
- 4096 of 3 hex digits each for rev and ver is enough.
    #defines used in SPI versions do not be long format, use use the macro
 - Board provides a prefix and the formatting is sized and built in
 - No need for funky board_get_base_eeprom_mtd_manifest interface
    Original mft is used where the abstraction is done with the MFT interface

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2022-07-05 09:29:26 +02:00
David Sidrane 00e82c9060 board_hw_eeprom_rev_ver:Versioning hierarchy 2022-07-05 09:29:26 +02:00
Igor Mišić ec1614d156 boards: update id string from V5X{0-a}{0-a} to V5X{xxxx}{xxxx}
boards: new format for hwtypecmp string
boards: update manifest.c to follow the new hw_ver_rev format
2022-07-05 09:29:26 +02:00
David Sidrane 49d63958a8 platforms/common/spi:Support 16 bit of VER and REV 2022-07-05 09:29:26 +02:00
Igor Mišić b938215c2b board_hw_info: add set and get functions for hw_version to/from eeprom 2022-07-05 09:29:26 +02:00
Igor Mišić cc63c49a51 px4_manifest: add function declaration for get base EEPROM mtd 2022-07-05 09:29:26 +02:00
Igor Mišić 3463b725a5 px4_manifest: fix px4_mft_s to accept multiple manifests 2022-07-05 09:29:26 +02:00
Igor Mišić 432b664acc px4_mtd: fix instantiation for multiple mtds 2022-07-05 09:29:26 +02:00
Igor Mišić 08a9e49f3e px4_mtd: update eeprom at24c driver to initialize multiple instances 2022-07-05 09:29:26 +02:00
Daniel Agar c9b6047124
platforms/nuttx/CMakeLists.txt add STM32H743VI SVD/debug 2022-07-03 11:38:01 -04:00
Bruce Meagher 714234ca90
posix: add mavlink shell for posix targets (#19800) 2022-06-20 11:51:47 +02:00
Thomas Debrunner 46c9d1e288
SIH in SITL with lockstep (#19028)
* sih: Move sih out of work queue
This reverts commit bb7dd0cf00.

* sih-sim: Enable sih in sitl, together with lockstep

* sih-sim: new files for sih: quadx and airplane

* sih: Added tailsitter for sih-sitl simulation

* sitl_target: Added seperate target loop for sih

* jmavsim_run: Allow jmavsim to run in UDP mode

* lockstep: Post semaphore on last lockstep component removed

* sih-sim: Added display for effectively achieved speed

* sih: increase stack size

* sih-sim: Improved sleep time computation, fixes bug of running too fast

* sitl_target: place omnicopter in alphabethic order

Co-authored-by: romain-chiap <romain.chiap@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-06-09 09:52:34 +02:00
Jaeyoung-Lim bf68d3433e Add omnicopter SITL model
F
2022-06-04 07:40:29 +02:00
Daniel Agar 0420d697e5 update NuttX and apps to latest with sem holder fixes and updated ostest 2022-05-29 13:41:16 -04:00
David Sidrane 645f4c3428 flash_cache:Flush complete cache line 2022-05-27 14:25:25 -04:00
David Sidrane 9d0e57230a
boards: new px4_fmu-v6c board support (#19544) 2022-05-20 15:49:06 -04:00
Daniel Agar 15296ab453 cmake: NuttX check that CONFIG_ARCH_BOARD_CUSTOM_DIR is in PX4_BOARD_DIR 2022-05-09 15:23:18 -04:00
Daniel Agar 6f87a4546d platforms/nuttx: cdc_acm_check implement mavlink reboot directly 2022-04-22 21:16:07 -04:00
Daniel Agar 1d66f2cf83 posix: HRT hrt_lock() sem_wait try again if error returned 2022-04-12 12:46:29 -04:00
CUAVmengxiao f540335998 spi: get the correct version revision 2022-03-29 17:09:34 -04:00
Jacob Schloss 5ae4cae073
orb_advertise_multi: might return nullptr (#19387) 2022-03-24 07:47:48 +01:00
David Sidrane 1a17e9df4d board_hw_rev_ve:Use 97.50% for ADC ref for "High" detection 2022-03-22 21:15:03 -04:00
David Sidrane ebc8ecdee6 board_hw_rev_ve:ADC returns 32 bits 2022-03-22 21:15:03 -04:00
David Sidrane 1c224be8f6 stm32h7:ADC fix CCr Access 2022-03-22 21:15:03 -04:00
Thomas Debrunner 5b0fc8f507 print_load: Removed unused variable to fix compilation on macos 2022-03-18 10:42:19 +01:00
Jukka Laitinen 4658a627d7 Separate i2c and spi board bus configuration into and own library for protected build target
This info is needed on both kernel and user sides, and is just data.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
Jukka Laitinen 56c6120e83 Use IOCTL for board_read_VBUS_state in NuttX protected builds
Direct gpio read is not possible from user side applications, so use boardctl
interface instead.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
Jukka Laitinen 005095d199 Add gran allocator also to user side in protected build
This is needed for DMA capable memory for fat also in the user side;
the file system doesn't seem to work reliably without.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
Jukka Laitinen c43c71f4af platforms/nuttx/src/px4/common/board_ctrl: Add handlers for vbus & shutdown lockout
Add kernel side ioctls and handlers for vbus state and managing shutdown lockout

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
Jukka Laitinen 4a74d266be Initialize cxx static variables also in kernel side
For protected/kernel builds the cxx static initializations
needs to be done also in kernel side, since px4 creates
c++ objects in kernel

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
Jukka Laitinen c1a7b8df1d Add a px4 userspace initialization in protected build
The px4_userspace_init function is called from userspace
entrypoint before starting NSH

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-17 08:01:51 +01:00
wangwwno1 746c16400a Typo Fix: ChangeWorkQeue
Fix the typo of 'WorkItem::ChangeWorkQeue' to 'WorkItem::ChangeWorkQueue'
2022-03-15 13:31:52 -04:00
Jukka Laitinen 0d31aadcc3 src/lib/paramters: Add a new interface library for protected build user side
Implement an interface for protected build to access parameters.

The implementation only does IOCTL calls to the kernel, where the parameters
live.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-15 07:52:26 +01:00
Daniel Agar 52221b0bb7
vscode: add stlink debug config (#19269)
Co-authored-by: Jacob Crabill <jacob.crabill@gmail.com>
2022-03-01 09:47:22 -05:00
Jukka Laitinen aae0876d82 platforms/rpi: Clean away the removed hrt_elapsed_time_atomic
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen 77f71e61d2 Add a generic hrt driver userspace interface
This adds a nuttx userspace interface for hrt driver, communicating with
the actual px4 hrt driver via BOARDCTL IOCTLs

This is be used when running PX4 in NuttX protected or kernel builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen 9f049b4dca Inline ts_to_abstime and abstime_to_ts
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen caaa13ddc0 uORB performance updates
Move some logic from Subscriber into uORBManager. This reduces calls from the
modules to the uORB manager, improving performance in protected build.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-24 11:50:05 -05:00
Charles Cross f31f3370ef
Add support for Timer15 on H743 boards (#19228)
* Adds Timer15 to stm32_common, if the timer base is defined
* Adds Timer15 logic for DMA and AltFunc config on stm32h7 boards
* Adds TIM15 BDTR->MOE support in stm32_common timer init
* Adds support for TIM15 pwm channels on Matek H743 Slim
2022-02-21 16:52:38 -05:00
David Sidrane c0facec889 cdc_acm_check:Prevent USB disconect on param save
If the hardware support RESET lockout that has nArmed ANDed with VBUS
   vbus_sense may drop during a param save which uses
   BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE to prevent external resets
   while writing the params.  If we are not armed and nARMRED is low
   we are in such a lock out so ignore changes on VBUS_SENSE during this
   time.
2022-02-21 10:56:41 +01:00
Jukka Laitinen dab7b007de Auto-generate a list of kernel-side built-in modules(drivers)
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:58:58 +01:00
Jukka Laitinen 6071b87afc platforms/common/uORB: Separate IOCTLs going through boardctl interface from the original ones
It was a mistake to mix these two together, it is simpler to implement the boardctl interface
for the protected build, if the boardctl ioctls are different

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00
Jukka Laitinen f0d9f44f45 Add an ioctl handler to launch built-in modules in kernel side
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00
Jukka Laitinen db3baf6c26 Add an ioctl interface for userspace to kernel calls
This adds an ioctl interface for NuttX protected build, allowing
system calls from user space to kernel for uORB, HRT and crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00