mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 09:13:35 +08:00
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:
co-authored by
Peter van der Perk
David Sidrane
alexklimaj
parent
45b390b0bf
commit
2cb4ef0629
@@ -43,7 +43,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <px4_arch/micro_hal.h>
|
||||
#include "arm_arch.h"
|
||||
#include "arm_internal.h"
|
||||
#include "boot_app_shared.h"
|
||||
|
||||
#include <lib/systemlib/crc.h>
|
||||
@@ -54,7 +54,7 @@
|
||||
#define CRC_H 1
|
||||
#define CRC_L 0
|
||||
|
||||
inline static void read(bootloader_app_shared_t *pshared)
|
||||
inline static void read_shared(bootloader_app_shared_t *pshared)
|
||||
{
|
||||
pshared->signature = getreg32(signature_LOC);
|
||||
pshared->bus_speed = getreg32(bus_speed_LOC);
|
||||
@@ -63,7 +63,7 @@ inline static void read(bootloader_app_shared_t *pshared)
|
||||
pshared->crc.ul[CRC_H] = getreg32(crc_HiLOC);
|
||||
}
|
||||
|
||||
inline static void write(bootloader_app_shared_t *pshared)
|
||||
inline static void write_shared(bootloader_app_shared_t *pshared)
|
||||
{
|
||||
putreg32(pshared->signature, signature_LOC);
|
||||
putreg32(pshared->bus_speed, bus_speed_LOC);
|
||||
@@ -126,7 +126,7 @@ __EXPORT int bootloader_app_shared_read(bootloader_app_shared_t *shared, eRole_t
|
||||
int rv = -EBADR;
|
||||
bootloader_app_shared_t working;
|
||||
|
||||
read(&working);
|
||||
read_shared(&working);
|
||||
|
||||
if ((role == App ? working.signature == BOOTLOADER_COMMON_APP_SIGNATURE
|
||||
: working.signature == BOOTLOADER_COMMON_BOOTLOADER_SIGNATURE)
|
||||
@@ -166,7 +166,7 @@ __EXPORT void bootloader_app_shared_write(bootloader_app_shared_t *shared, eRole
|
||||
bootloader_app_shared_t working = *shared;
|
||||
working.signature = (role == App ? BOOTLOADER_COMMON_APP_SIGNATURE : BOOTLOADER_COMMON_BOOTLOADER_SIGNATURE);
|
||||
working.crc.ull = calulate_signature(&working);
|
||||
write(&working);
|
||||
write_shared(&working);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -190,5 +190,5 @@ __EXPORT void bootloader_app_shared_invalidate(void)
|
||||
{
|
||||
bootloader_app_shared_t working;
|
||||
bootloader_app_shared_init(&working, Invalid);
|
||||
write(&working);
|
||||
write_shared(&working);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#if UAVCAN_KINETIS_NUTTX
|
||||
# include <nuttx/arch.h>
|
||||
# include "arm_arch.h"
|
||||
# include "arm_internal.h"
|
||||
# include <arch/board/board.h>
|
||||
# include <hardware/kinetis_pit.h>
|
||||
# include <hardware/kinetis_sim.h>
|
||||
|
||||
@@ -214,8 +214,8 @@ void UavcanServers::migrateFWFromRoot(const char *sd_path, const char *sd_root_p
|
||||
}
|
||||
}
|
||||
|
||||
if (dev_dirent != nullptr) {
|
||||
(void)closedir(dev_dirent);
|
||||
if (sd_root_dir != nullptr) {
|
||||
(void)closedir(sd_root_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
/* XXX might be able to prune these */
|
||||
#include <chip.h>
|
||||
#include <arm_internal.h>
|
||||
#include <arm_arch.h>
|
||||
#include <arm_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
Reference in New Issue
Block a user