Update NuttX and modifications to build with new kernel

This commit is contained in:
Peter van der Perk
2022-09-10 21:21:59 +02:00
parent 34d8bd7988
commit 140c76a0e7
192 changed files with 279 additions and 340 deletions
-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>
@@ -143,53 +143,5 @@ void sched_note_stop(FAR struct tcb_s *tcb)
}
}
void sched_note_suspend(FAR struct tcb_s *tcb)
{
if (system_load.initialized) {
if (tcb->pid == 0) {
system_load.tasks[0].total_runtime += hrt_elapsed_time(&system_load.tasks[0].curr_start_time);
return;
} else {
if (cpuload_monitor_all_count.load() == 0) {
return;
}
}
for (auto &task : system_load.tasks) {
// Task ending its current scheduling run
if (task.valid && (task.curr_start_time > 0)
&& task.tcb && task.tcb->pid == tcb->pid) {
task.total_runtime += hrt_elapsed_time(&task.curr_start_time);
break;
}
}
}
}
void sched_note_resume(FAR struct tcb_s *tcb)
{
if (system_load.initialized) {
if (tcb->pid == 0) {
hrt_store_absolute_time(&system_load.tasks[0].curr_start_time);
return;
} else {
if (cpuload_monitor_all_count.load() == 0) {
return;
}
}
for (auto &task : system_load.tasks) {
if (task.valid && task.tcb && task.tcb->pid == tcb->pid) {
// curr_start_time is accessed from an IRQ handler (in logger), so we need
// to make the update atomic
hrt_store_absolute_time(&task.curr_start_time);
break;
}
}
}
}
__END_DECLS
#endif // PX4_NUTTX && CONFIG_SCHED_INSTRUMENTATION
@@ -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"
@@ -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"