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>
This commit is contained in:
Daniel Agar
2022-11-20 20:28:07 -05:00
committed by GitHub
co-authored by Peter van der Perk David Sidrane alexklimaj
parent 45b390b0bf
commit 2cb4ef0629
249 changed files with 2850 additions and 632 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ int px4_shutdown_unlock()
return ret;
}
#if defined(CONFIG_SCHED_WORKQUEUE) || (!defined(CONFIG_BUILD_FLAT) && defined(CONFIG_LIB_USRWORK))
#if defined(CONFIG_SCHED_WORKQUEUE) || (!defined(CONFIG_BUILD_FLAT) && defined(CONFIG_LIBC_USRWORK))
static struct work_s shutdown_work = {};
static uint16_t shutdown_counter = 0; ///< count how many times the shutdown worker was executed
+10 -2
View File
@@ -72,7 +72,7 @@ if (NOT DEFINED CONFIG_BUILD_FLAT AND "${PX4_PLATFORM}" MATCHES "nuttx")
${SRCS_COMMON}
${SRCS_KERNEL}
)
target_link_libraries(uORB_kernel PRIVATE cdev uorb_msgs)
target_link_libraries(uORB_kernel PRIVATE cdev uorb_msgs nuttx_mm)
target_compile_options(uORB_kernel PRIVATE ${MAX_CUSTOM_OPT_LEVEL} -D__KERNEL__)
# User side library in nuttx kernel/protected build
@@ -80,9 +80,17 @@ if (NOT DEFINED CONFIG_BUILD_FLAT AND "${PX4_PLATFORM}" MATCHES "nuttx")
${SRCS_COMMON}
${SRCS_USER}
)
elseif("${PX4_PLATFORM}" MATCHES "nuttx")
# Library for NuttX (flat build, posix...)
px4_add_library(uORB
${SRCS_COMMON}
${SRCS_KERNEL}
)
target_link_libraries(uORB PRIVATE cdev nuttx_mm)
else()
# Library for all other targets (flat build, posix...)
# Library for all other targets (posix...)
px4_add_library(uORB
${SRCS_COMMON}
${SRCS_KERNEL}
-1
View File
@@ -102,7 +102,6 @@ FLAGS = $(MAXOPTIMIZATION) -g2 \
-fno-strict-aliasing \
-fomit-frame-pointer \
-Wall \
-Werror \
-Wextra \
-Wlogical-op \
-Wno-cpp \
@@ -31,7 +31,7 @@
*
****************************************************************************/
#include "arm_arch.h"
#include "arm_internal.h"
#include "lib/systick.h"
#include <nvic.h>
@@ -286,7 +286,7 @@ static void mavlink_usb_check(void *arg)
#if defined(CONFIG_SERIAL_PASSTHRU_UBLOX)
speed_t baudrate = cfgetspeed(&uart_config);
char baudstring[16];
snprintf(baudstring, sizeof(baudstring), "%d", baudrate);
snprintf(baudstring, sizeof(baudstring), "%ld", baudrate);
static const char *gps_argv[] {"gps", "stop", nullptr};
static const char *passthru_argv[] {"serial_passthru", "start", "-t", "-b", baudstring, "-e", USB_DEVICE_PATH, "-d", SERIAL_PASSTHRU_UBLOX_DEV, nullptr};
@@ -514,7 +514,6 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
ret = at24c_eraseall(priv);
break;
case MTDIOC_XIPBASE:
default:
ret = -ENOTTY; /* Bad command */
break;
@@ -42,7 +42,7 @@
#include <fixedmath.h>
#include "dwt.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include <nuttx/clock.h>
@@ -40,7 +40,7 @@
#include <px4_platform_common/px4_config.h>
#include <errno.h>
#include <nuttx/board.h>
#include <arm_arch.h>
#include <arm_internal.h>
#include <hardware/imxrt_snvs.h>
#define PX4_IMXRT_RTC_REBOOT_REG 3 // Must be common with bootloader and:
@@ -41,7 +41,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <arm_arch.h>
#include <arm_internal.h>
#include <hardware/imxrt_ocotp.h>
#define CPU_UUID_BYTE_FORMAT_ORDER {3, 2, 1, 0, 7, 6, 5, 4}
@@ -42,7 +42,7 @@
#include <chip.h>
#include <hardware/imxrt_usb_analog.h>
#include "arm_arch.h"
#include "arm_internal.h"
#define DIGPROG_MINOR_SHIFT 0
#define DIGPROG_MINOR_MASK (0xff << DIGPROG_MINOR_SHIFT)
@@ -40,7 +40,7 @@
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/kinetis_sim.h"
#define CHIP_TAG "Kinetis K??"
@@ -41,7 +41,7 @@
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/s32k1xx_sim.h"
#define CHIP_TAG "S32KXXX"
@@ -34,7 +34,6 @@
#include <nuttx/config.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "chip.h"
#include "nvic.h"
@@ -43,7 +43,7 @@
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include <arm_arch.h>
#include <arm_internal.h>
#include <chip.h>
static const px4_spi_bus_t *_spi_bus0;
@@ -42,7 +42,7 @@
#include <fixedmath.h>
#include "dwt.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include <nuttx/clock.h>
@@ -42,7 +42,7 @@
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include <arm_arch.h>
#include <arm_internal.h>
#include <chip.h>
#include <stm32_gpio.h>
@@ -34,7 +34,7 @@
#include <nuttx/config.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "nvic.h"