mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 15:01:36 +08:00
platform Updates for NuttX 9.1.0-
This commit is contained in:
committed by
Daniel Agar
parent
97c17d5d4a
commit
b32aab2d0f
@@ -31,7 +31,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
#include <nvic.h>
|
#include <nvic.h>
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
#include "up_internal.h"
|
#include "arm_internal.h"
|
||||||
#include <systemlib/hardfault_log.h>
|
#include <systemlib/hardfault_log.h>
|
||||||
#include "nvic.h"
|
#include "nvic.h"
|
||||||
|
|
||||||
@@ -377,14 +377,14 @@ __EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const uint
|
|||||||
char *dead = "Memory wiped - dump not saved!";
|
char *dead = "Memory wiped - dump not saved!";
|
||||||
|
|
||||||
while (*dead) {
|
while (*dead) {
|
||||||
up_lowputc(*dead++);
|
arm_lowputc(*dead++);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (rv == -ENOSPC) {
|
} else if (rv == -ENOSPC) {
|
||||||
|
|
||||||
/* hard fault again */
|
/* hard fault again */
|
||||||
|
|
||||||
up_lowputc('!');
|
arm_lowputc('!');
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* BOARD_CRASHDUMP_RESET_ONLY */
|
#endif /* BOARD_CRASHDUMP_RESET_ONLY */
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ int px4_platform_init(void)
|
|||||||
|
|
||||||
(void)fs_dupfd2(0, 1);
|
(void)fs_dupfd2(0, 1);
|
||||||
(void)fs_dupfd2(0, 2);
|
(void)fs_dupfd2(0, 2);
|
||||||
(void)fs_fdopen(0, O_RDONLY, NULL);
|
(void)fs_fdopen(0, O_RDONLY, NULL, NULL);
|
||||||
(void)fs_fdopen(1, O_WROK | O_CREAT, NULL);
|
(void)fs_fdopen(1, O_WROK | O_CREAT, NULL, NULL);
|
||||||
(void)fs_fdopen(2, O_WROK | O_CREAT, NULL);
|
(void)fs_fdopen(2, O_WROK | O_CREAT, NULL, NULL);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* We failed to open /dev/null OR for some reason, we opened
|
/* We failed to open /dev/null OR for some reason, we opened
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ int px4_task_delete(int pid)
|
|||||||
const char *px4_get_taskname(void)
|
const char *px4_get_taskname(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_TASK_NAME_SIZE > 0
|
#if CONFIG_TASK_NAME_SIZE > 0
|
||||||
FAR struct tcb_s *thisproc = sched_self();
|
FAR struct tcb_s *thisproc = nxsched_self();
|
||||||
|
|
||||||
return thisproc->name;
|
return thisproc->name;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include <fixedmath.h>
|
#include <fixedmath.h>
|
||||||
|
|
||||||
#include "dwt.h"
|
#include "dwt.h"
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
#include <nuttx/clock.h>
|
#include <nuttx/clock.h>
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#include <px4_platform_common/px4_config.h>
|
#include <px4_platform_common/px4_config.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <up_arch.h>
|
#include <arm_arch.h>
|
||||||
#include <hardware/imxrt_snvs.h>
|
#include <hardware/imxrt_snvs.h>
|
||||||
|
|
||||||
#define PX4_IMXRT_RTC_REBOOT_REG 3 // Must be common with bootloader and:
|
#define PX4_IMXRT_RTC_REBOOT_REG 3 // Must be common with bootloader and:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <up_arch.h>
|
#include <arm_arch.h>
|
||||||
#include <hardware/imxrt_ocotp.h>
|
#include <hardware/imxrt_ocotp.h>
|
||||||
|
|
||||||
#define CPU_UUID_BYTE_FORMAT_ORDER {3, 2, 1, 0, 7, 6, 5, 4}
|
#define CPU_UUID_BYTE_FORMAT_ORDER {3, 2, 1, 0, 7, 6, 5, 4}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <chip.h>
|
#include <chip.h>
|
||||||
#include <hardware/imxrt_usb_analog.h>
|
#include <hardware/imxrt_usb_analog.h>
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
#define DIGPROG_MINOR_SHIFT 0
|
#define DIGPROG_MINOR_SHIFT 0
|
||||||
#define DIGPROG_MINOR_MASK (0xff << DIGPROG_MINOR_SHIFT)
|
#define DIGPROG_MINOR_MASK (0xff << DIGPROG_MINOR_SHIFT)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#include <px4_platform_common/px4_config.h>
|
#include <px4_platform_common/px4_config.h>
|
||||||
#include <px4_platform_common/defines.h>
|
#include <px4_platform_common/defines.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
#include "hardware/kinetis_sim.h"
|
#include "hardware/kinetis_sim.h"
|
||||||
|
|
||||||
#define CHIP_TAG "Kinetis K??"
|
#define CHIP_TAG "Kinetis K??"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#include <px4_platform_common/px4_config.h>
|
#include <px4_platform_common/px4_config.h>
|
||||||
#include <px4_platform_common/defines.h>
|
#include <px4_platform_common/defines.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
#include "hardware/s32k1xx_sim.h"
|
#include "hardware/s32k1xx_sim.h"
|
||||||
|
|
||||||
#define CHIP_TAG "S32K1XX"
|
#define CHIP_TAG "S32K1XX"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include <fixedmath.h>
|
#include <fixedmath.h>
|
||||||
|
|
||||||
#include "dwt.h"
|
#include "dwt.h"
|
||||||
#include "up_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
#include <nuttx/clock.h>
|
#include <nuttx/clock.h>
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <nuttx/spi/spi.h>
|
#include <nuttx/spi/spi.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <up_arch.h>
|
#include <arm_arch.h>
|
||||||
#include <chip.h>
|
#include <chip.h>
|
||||||
#include <stm32_gpio.h>
|
#include <stm32_gpio.h>
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ __BEGIN_DECLS
|
|||||||
#define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID_STM32F7
|
#define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID_STM32F7
|
||||||
#include <chip.h>
|
#include <chip.h>
|
||||||
#include <hardware/stm32_flash.h>
|
#include <hardware/stm32_flash.h>
|
||||||
#include <up_internal.h> //include up_systemreset() which is included on stm32.h
|
#include <arm_internal.h> //include up_systemreset() which is included on stm32.h
|
||||||
#include <stm32_bbsram.h>
|
#include <stm32_bbsram.h>
|
||||||
#define PX4_BBSRAM_SIZE STM32F7_BBSRAM_SIZE
|
#define PX4_BBSRAM_SIZE STM32F7_BBSRAM_SIZE
|
||||||
#define PX4_BBSRAM_GETDESC_IOCTL STM32F7_BBSRAM_GETDESC_IOCTL
|
#define PX4_BBSRAM_GETDESC_IOCTL STM32F7_BBSRAM_GETDESC_IOCTL
|
||||||
@@ -48,8 +48,8 @@ __BEGIN_DECLS
|
|||||||
#define PX4_NUMBER_I2C_BUSES STM32F7_NI2C
|
#define PX4_NUMBER_I2C_BUSES STM32F7_NI2C
|
||||||
#define PX4_ARCH_DCACHE_LINESIZE ARMV7M_DCACHE_LINESIZE
|
#define PX4_ARCH_DCACHE_LINESIZE ARMV7M_DCACHE_LINESIZE
|
||||||
|
|
||||||
void stm32_flash_lock(void);
|
int stm32_flash_lock(void);
|
||||||
void stm32_flash_unlock(void);
|
int stm32_flash_unlock(void);
|
||||||
int stm32_flash_writeprotect(size_t page, bool enabled);
|
int stm32_flash_writeprotect(size_t page, bool enabled);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#include <chip.h>
|
#include <chip.h>
|
||||||
#include <hardware/stm32_flash.h>
|
#include <hardware/stm32_flash.h>
|
||||||
#include <up_internal.h> //include up_systemreset() which is included on stm32.h
|
#include <arm_internal.h> //include up_systemreset() which is included on stm32.h
|
||||||
#include <stm32_bbsram.h>
|
#include <stm32_bbsram.h>
|
||||||
#define PX4_BBSRAM_SIZE STM32H7_BBSRAM_SIZE
|
#define PX4_BBSRAM_SIZE STM32H7_BBSRAM_SIZE
|
||||||
#define PX4_BBSRAM_GETDESC_IOCTL STM32H7_BBSRAM_GETDESC_IOCTL
|
#define PX4_BBSRAM_GETDESC_IOCTL STM32H7_BBSRAM_GETDESC_IOCTL
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ideally we'd be able to get these from up_internal.h,
|
* Ideally we'd be able to get these from arm_internal.h,
|
||||||
* but since we want to be able to disable the NuttX use
|
* but since we want to be able to disable the NuttX use
|
||||||
* of leds for system indication at will and there is no
|
* of leds for system indication at will and there is no
|
||||||
* separate switch, we need to build independent of the
|
* separate switch, we need to build independent of the
|
||||||
|
|||||||
Reference in New Issue
Block a user