Commit Graph

700 Commits

Author SHA1 Message Date
Ville Juven 6cb2c176d5 events: Move implementation of events::send() to lib/events
Events have a global, system-wide sequence number, which must be handled
atomically, (fetching and incrementing the sequence AND sending the event
to uORB must be atomic). Currently in FLAT mode, only one instance of this
sequence number exists, so it is OK to have it in px4_platform.

However, in PROTECTED mode px4_platform is instantiated both in kernel-
and user spaces, which makes two instances of this sequence number, which
causes problems in the mavlink event handling logic.

When mavlink receives and handles events, it expects that:
- The sequence numbers arrive in order (seq n is followed by n+1 etc)
- It increments by 1
- There is only one instance of the sequence number

In PROTECTED mode this is violated, as the kernel and user sequence
numbers run freely on their own. This patch fixes the issue by moving
the event backend to the kernel and by providing user access to it via
ioctl.
2023-09-25 09:54:11 +02:00
Igor Mišić c1dbe177b8
boards: move FRAM emulated sector size to the 32-byte granularity (#21204) 2023-09-20 16:50:36 -04:00
David Sidrane e5f4a6b074 NuttX backports acculated prio to V1.14 release
c23b72dffe [BACKPORT] sched/semaphore: Remove restriction to use nxsem_trywait from ISR
fd47cd20a2 [BACKPORT] imxrt:Serial Preserve all but W1C bit in SR
c55f0fd3ac [BACKPORT] imxrt: lpspi dma invalidate cache after exchange
198c7caecb [BACKPORT] imxrt:lpi2c fix status handeling & race
cbd2e44c10 [BACKPORT] s32k3xx: lpspi dma invalidate cache after exchange
e71618d60e [BACKPORT] s32k3xx:lpi2c fix status handeling & race
6f59cc3659 [BACKPORT] s32k1xx:lpi2c fix status handeling & race
1e316d7e32 [BACKPORT] imxrt: flexcan use hpwork for receiving frames
67c1c59865 [BACKPORT] net/can can_readahead_timestamp always free iob
8be831a4ff [BACKPORT] imxrt: fix txdeadline add ecc/fd support
00a68b7668 [BACKPORT] fs/cromfs: Fix faulty DEBUGASSERT() check
d5cf545d6e [BACKPORT] S32K3XX EMAC MCAST support Fix compile warning when ioctl is not enabled
4265c830fa [BACKPORT] imxrt:edma {s|d}last needs to be total xfer size
24b4d44896 [BACKPORT] s32k3xx:edma {s|d}last needs to be total xfer size
eed0482f64 [BACKPORT] s32k1xx:edma {s|d}last needs to be total xfer size
36aab4146a [BACKPORT] kinetis:edma {s|d}last needs to be total xfer size
a0faf31f6f [BACKPORT] arch/stm32f7: fixes for pinmap
eb8255121d [BACKPORT] stm32h7:sdmmc It is not an error if no wait was needed
062044fe41 [BACKPORT] board nucleo-h743zi:Rework board.h not use CONFIG_STM32_USE_LEGACY_PINMAP
e03f9d3917 [BACKPORT] board olimexino-stm32:Rework board.h not use CONFIG_STM32_USE_LEGACY_PINMAP
4c3a467415 [BACKPORT] stm32l5:pinmap Add suffix to all pins and add legacy pinmap
153069ed40 [BACKPORT] stm32wb:pinmap Add suffix to all pins and add legacy pinmap
d84d737f89 [BACKPORT] stm32f0l0g0:stm32f0{3|5|7|9}x_pinmap & stm32g0_pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
5fc7071ac1 [BACKPORT] stm32l4:stm32l4x{3|4|5|6|r}xx_pinmap pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
20061c2aab [BACKPORT] stm32:stm32f10{0|2|3{c|r|v|z}|5{r|v}|7v}_pinmap refactor
4d1f83d484 [BACKPORT] stm32:stm32l15xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
2dfa3f2601 [BACKPORT] stm32:stm32g4xx{c|k|r|m|v|q} pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
d206327809 [BACKPORT] stm32:stm32f3{0|3|7}xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
95e66ab508 [BACKPORT] stm32:stm32f20xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
d2fd9178ad [BACKPORT] stm32:f4/f412 pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
a9df45166d [BACKPORT] stm32f7:pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
07dd2b424e [BACKPORT] stm32h7:pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
1e3065344f [BACKPORT] stm32u5:stm32u585xx_pinmap Fix typo
0a05365a90 [BACKPORT] stm32wl5:pinmap Fix typo
e3834138dc [BACKPORT] tools:Add STM32 Pin migration tool
df851a8768 [BACKPORT] stm32h7/rcc: make VOS0 configurable from board.h also for stm32h7x7xx
d75dfcf1e9 [BACKPORT] stm32h7/rcc: make VOS0 configurable from board.h
963f35f4fc [BACKPORT] {stm32,stm32f7,stm32h7,stm32l4,efm32}/otg: rasie an assertion if IN request is not possible to transfer
de2fcc6668 [BACKPORT] {stm32f7,stm32h7,stm32l4}/sdmmc: callback support requires HPWORK
6929144fc2 [BACKPORT] stm32h7/otgdev: FS transceiver must be enabled if OTGFS enabled
a2078afaea [BACKPORT] stm32h7/otg: add support for external ULPI
26e1246c86 [BACKPORT] stm32h7/rcc: OTGHS ULPI works only in VOS0
cd6daa185e [BACKPORT] stm32h7: update ULPI pins
c73c261ae3 [BACKPORT] arch/boards: fix stm32f411-mininum:nsh compilation failure after enabling IRQMONITOR
8078f134ef [BACKPORT] arch/stm32/stm32.h: do not include stm32_usbdev.h if not supported
60e884fa92 [BACKPORT] {stm32,stm32l4,stm32f0l0g0}/otg: move STM32_NENDPOINTS definitions to header files
dda297cb78 [BACKPORT] arch/arm/src/stm32/hardware: Fix register define
362b976b0e [BACKPORT] arch/arm/src/stm32/hardware: Add stm32g4 rcc apb1 timer enable compatibility
434fd71f2c [BACKPORT] {stm32/stm32l4/stm32f7/stm32h7/efm32}/otgdev: remove invalid use of the priv field for EP
2476d24e8c [BACKPORT] {stm32f7,stm32h7}/otg: fix compilation for USBDEV when USB_DEBUG=y
eb43c582ea [BACKPORT] drivers/mtd/ramtron: change nsectors size to uint32
20f61ff0d5 [BACKPORT] fs/littlefs: add full support for LittleFS block device cfg in Kconfig
60471fbf8c [BACKPORT] drivers/mtd: add Kconfig options for RAMTRON emulated page & sector size
2023-09-13 13:14:18 -04:00
Niklas Hauser af40d5befd nsh: check nsh_consolemain return value
Starting a new console allocates memory dynamically, which can fail.
2023-08-29 10:55:01 -04:00
Jukka Laitinen 485ec14246 px4_init.cpp: Properly check the return value of mounting procfs
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-07-21 07:30:15 +02:00
Igor Mišić bfa72a1bee rc.board_arch_defaults: add the silent flag for EKF2_MULTI_IMU 2023-07-03 10:08:26 +02:00
Peter van der Perk e739afe362 MR-CANHUBK3 ADAP board support, add ADC support 2023-06-27 07:24:07 -04:00
Niklas Hauser 8fe65c6722 Driver: Refactor MCP23009 GPIO expander into uORB driver 2023-06-19 07:58:21 +02:00
Beat Küng 1bfca24fa9 refactor param: move autosave to px4::wq_configurations::lp_default work queue
Changes initialization order as param_init now depends on wq manager
2023-05-31 07:45:20 +02:00
Daniel Agar bb0f2875a9 ekf2: disable multi-EKF across mags by default (H7 & SITL) for now
- re-enable once the estimator selector respects configured mag
priority (at least initially) or is otherwise able to automatically
prefer an external mag over internal
 - for SITL disabled because the full matrix of esitmator instances
(IMUs X mags) was too many topics for logger currently
2023-05-19 18:35:57 -06:00
Julian Oes 50f8c30f10 fmu-v2/v3: refactor detection function
This consolidates the version/revision detection function.

This should allow for actual changes in a follow up commit.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-04-01 10:34:24 -07:00
Jukka Laitinen b26669b085 Add crypto_deinit function for crypto_backend module
Bootloader needs to have a mechanism to de-initialize crypto, in case some HW accelerator
is being used. This adds the needed function for it

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-03-20 21:54:40 -04:00
David Sidrane 1fb6b003fc NuttX with backport ioexpander/gpio:Add gpio_pin_register_byname 2023-02-20 04:14:01 -08:00
David Sidrane d291207b9f NuttX with mmcsd backports to prevent system hang on error 2023-02-17 10:16:15 +01:00
Christian Rauch 5880fe4153 remove deprecated check for CONFIG_STM32_STM32F4XXX in STM32F1 micro_hal.h 2023-02-14 08:08:24 +01:00
Christian Rauch ef5761c223 add SPI to stm32f1 2023-02-07 07:54:38 +01:00
小光 849fbabc47
px4_mtd: the address of 'instances' will never be NULL (#21039)
Signed-off-by: AuroraRAS <chplee@gmail.com>
2023-02-02 08:06:00 +01:00
Daniel Agar 2be701f902 platforms/nuttx: cmake debug pass GDB path and set RTOS plugin file extension 2023-01-30 20:19:38 -05:00
PX4 BuildBot d6d41af9a4 Update submodule nuttx to latest Wed Jan 25 12:38:18 UTC 2023
- nuttx in PX4/Firmware (d3b7112dd9): f80785664f
    - nuttx current upstream: 35997053c5
    - Changes: f80785664f...35997053c5

    35997053c5 2023-01-23 David Sidrane - [BACKPORT] s32k1xx:serial Do not use TC use TDRE & TIE
2023-01-25 14:48:22 -05:00
Daniel Agar 0bdec5bcc0 cmake: nuttx fix jlink-nuttx dependency 2023-01-25 09:06:35 -05:00
PX4 BuildBot d2240c0c48 Update submodule nuttx to latest Thu Jan 19 12:39:05 UTC 2023
- nuttx in PX4/Firmware (0e2eed62f9a9b44cefc9765fd21aac1a368e4314): d43edd7879
    - nuttx current upstream: f80785664f
    - Changes: d43edd7879...f80785664f

    f80785664f 2023-01-16 Julian Oes - [FIX] Add missing define condition
1751c2c7cb 2023-01-16 Julian Oes - [BACKPORT] stm32h7: add SMPS PWR option for STM32H7X7
2023-01-19 12:33:27 -05:00
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 45912066d2 fix copyright header year range 2023-01-14 09:16:16 -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
Peter van der Perk fa87375d0c Add hardfault log progmem flash backend 2023-01-04 12:52:01 -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
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
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
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
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
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
Igor Mišić 815eed2c6d mtd: add support for extended HW revision 2022-11-10 07:45:44 +01:00
Peter van der Perk 1fc1a81d8f UCANS32K146 Add support for 2nd PWM 2022-11-03 06:26:52 -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
David Sidrane 3be8d52c8e imxrt:io_timers Support 1 channel per group (timer) 2022-10-13 08:17:51 +02:00