mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 19:51:35 +08:00
v6x-rt: move romapi to platform
This commit is contained in:
committed by
David Sidrane
parent
6be8cbe439
commit
8ba18a78af
@@ -36,7 +36,6 @@ if("${PX4_BOARD_LABEL}" STREQUAL "bootloader")
|
|||||||
bootloader_main.c
|
bootloader_main.c
|
||||||
init.c
|
init.c
|
||||||
usb.c
|
usb.c
|
||||||
imxrt_romapi.c
|
|
||||||
imxrt_flexspi_nor_boot.c
|
imxrt_flexspi_nor_boot.c
|
||||||
imxrt_flexspi_nor_flash.c
|
imxrt_flexspi_nor_flash.c
|
||||||
imxrt_clockconfig.c
|
imxrt_clockconfig.c
|
||||||
@@ -48,6 +47,7 @@ if("${PX4_BOARD_LABEL}" STREQUAL "bootloader")
|
|||||||
nuttx_drivers # sdio
|
nuttx_drivers # sdio
|
||||||
px4_layer #gpio
|
px4_layer #gpio
|
||||||
arch_io_pins # iotimer
|
arch_io_pins # iotimer
|
||||||
|
arch_board_romapi
|
||||||
bootloader
|
bootloader
|
||||||
)
|
)
|
||||||
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/bootloader/common)
|
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/bootloader/common)
|
||||||
@@ -72,7 +72,6 @@ else()
|
|||||||
spi.cpp
|
spi.cpp
|
||||||
timer_config.cpp
|
timer_config.cpp
|
||||||
usb.c
|
usb.c
|
||||||
imxrt_romapi.c
|
|
||||||
imxrt_flexspi_fram.c
|
imxrt_flexspi_fram.c
|
||||||
imxrt_flexspi_nor_boot.c
|
imxrt_flexspi_nor_boot.c
|
||||||
imxrt_flexspi_nor_flash.c
|
imxrt_flexspi_nor_flash.c
|
||||||
@@ -83,6 +82,7 @@ else()
|
|||||||
target_link_libraries(drivers_board
|
target_link_libraries(drivers_board
|
||||||
PRIVATE
|
PRIVATE
|
||||||
arch_board_hw_info
|
arch_board_hw_info
|
||||||
|
arch_board_romapi
|
||||||
arch_spi
|
arch_spi
|
||||||
drivers__led # drv_led_start
|
drivers__led # drv_led_start
|
||||||
nuttx_arch # sdio
|
nuttx_arch # sdio
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "imxrt_flexspi_nor_flash.h"
|
#include <px4_arch/imxrt_flexspi_nor_flash.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
|
|||||||
@@ -66,8 +66,7 @@
|
|||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "imxrt_flexspi_nor_boot.h"
|
#include "imxrt_flexspi_nor_boot.h"
|
||||||
#include "imxrt_flexspi_nor_flash.h"
|
#include <px4_arch/imxrt_flexspi_nor_flash.h>
|
||||||
#include "imxrt_romapi.h"
|
|
||||||
#include "imxrt_iomuxc.h"
|
#include "imxrt_iomuxc.h"
|
||||||
#include "imxrt_flexcan.h"
|
#include "imxrt_flexcan.h"
|
||||||
#include "imxrt_enet.h"
|
#include "imxrt_enet.h"
|
||||||
@@ -79,10 +78,12 @@
|
|||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
|
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
#include <drivers/drv_board_led.h>
|
#include <drivers/drv_board_led.h>
|
||||||
#include <systemlib/px4_macros.h>
|
#include <systemlib/px4_macros.h>
|
||||||
#include <px4_arch/io_timer.h>
|
#include <px4_arch/io_timer.h>
|
||||||
|
#include <px4_arch/imxrt_romapi.h>
|
||||||
#include <px4_platform_common/init.h>
|
#include <px4_platform_common/init.h>
|
||||||
#include <px4_platform/gpio.h>
|
#include <px4_platform/gpio.h>
|
||||||
#include <px4_platform/board_determine_hw_info.h>
|
#include <px4_platform/board_determine_hw_info.h>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
#include <px4_defines.h>
|
#include <px4_defines.h>
|
||||||
|
|
||||||
#include "hw_config.h"
|
#include "hw_config.h"
|
||||||
#include "imxrt_flexspi_nor_flash.h"
|
#include <px4_arch/imxrt_flexspi_nor_flash.h>
|
||||||
#include "imxrt_romapi.h"
|
#include <px4_arch/imxrt_romapi.h>
|
||||||
#include <hardware/rt117x/imxrt117x_ocotp.h>
|
#include <hardware/rt117x/imxrt117x_ocotp.h>
|
||||||
#include <hardware/rt117x/imxrt117x_anadig.h>
|
#include <hardware/rt117x/imxrt117x_anadig.h>
|
||||||
#include <hardware/rt117x/imxrt117x_snvs.h>
|
#include <hardware/rt117x/imxrt117x_snvs.h>
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* boards/px4/fmu-v6xrt/src/imxrt_flexspi_nor_flash.h
|
* platforms/nuttx/src/px4/nxp/imrt/include/px4_arch/imxrt_flexspi_nor_flash.h
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_FLEXSPI_NOR_FLASH_H
|
#ifndef __PX4_ARCH_IMXRT_FLEXSPI_NOR_FLASH_H
|
||||||
#define __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_FLEXSPI_NOR_FLASH_H
|
#define __PX4_ARCH_IMXRT_FLEXSPI_NOR_FLASH_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -349,4 +349,4 @@ extern const struct flexspi_nor_config_s g_flash_config;
|
|||||||
extern const struct flexspi_nor_config_s g_flash_fast_config;
|
extern const struct flexspi_nor_config_s g_flash_fast_config;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_FLEXSPI_NOR_FLASH_H */
|
#endif /* __PX4_ARCH_IMXRT_FLEXSPI_NOR_FLASH_H */
|
||||||
+9
-5
@@ -1,14 +1,14 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* boards/px4/fmu-v6xrt/src/imxrt_romapi.c
|
* platforms/nuttx/src/px4/nxp/imrt/include/px4_arch/imxrt_romapi.h
|
||||||
*
|
*
|
||||||
* Copyright 2017-2020 NXP
|
* Copyright 2017-2024 NXP
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_ROMAPI_H
|
#ifndef __PX4_ARCH_IMXRT_ROMAPI_H
|
||||||
#define __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_ROMAPI_H
|
#define __PX4_ARCH_IMXRT_ROMAPI_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
@@ -370,4 +370,8 @@ void ROM_FLEXSPI_NorFlash_ClearCache(uint32_t instance);
|
|||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
#endif /* __BOARDS_PX4_FMU_V6XRT_SRC_IMXRT_ROMAPI_H */
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __PX4_ARCH_IMXRT_ROMAPI_H */
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 PX4 Development Team. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
px4_add_library(arch_board_romapi
|
||||||
|
imxrt_romapi.c
|
||||||
|
)
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* boards/px4/fmu-v6xrt/src/imxrt_romapi.c
|
* platforms/nuttx/src/px4/nxp/imrt/romapi/imxrt_romapi.c
|
||||||
*
|
*
|
||||||
* Copyright 2017-2020 NXP
|
* Copyright 2017-2024 NXP
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
|
|
||||||
#include "imxrt_flexspi_nor_flash.h"
|
#include <px4_arch/imxrt_flexspi_nor_flash.h>
|
||||||
#include "imxrt_romapi.h"
|
#include <px4_arch/imxrt_romapi.h>
|
||||||
|
|
||||||
#include <hardware/rt117x/imxrt117x_anadig.h>
|
#include <hardware/rt117x/imxrt117x_anadig.h>
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ add_subdirectory(adc)
|
|||||||
add_subdirectory(../imxrt/board_critmon board_critmon)
|
add_subdirectory(../imxrt/board_critmon board_critmon)
|
||||||
add_subdirectory(../imxrt/board_hw_info board_hw_info)
|
add_subdirectory(../imxrt/board_hw_info board_hw_info)
|
||||||
add_subdirectory(../imxrt/board_reset board_reset)
|
add_subdirectory(../imxrt/board_reset board_reset)
|
||||||
#add_subdirectory(../imxrt/dshot dshot)
|
add_subdirectory(../imxrt/romapi romapi)
|
||||||
add_subdirectory(../imxrt/hrt hrt)
|
add_subdirectory(../imxrt/hrt hrt)
|
||||||
add_subdirectory(../imxrt/led_pwm led_pwm)
|
add_subdirectory(../imxrt/led_pwm led_pwm)
|
||||||
add_subdirectory(../imxrt/io_pins io_pins)
|
add_subdirectory(../imxrt/io_pins io_pins)
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "../../../imxrt/include/px4_arch/imxrt_flexspi_nor_flash.h"
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "../../../imxrt/include/px4_arch/imxrt_romapi.h"
|
||||||
Reference in New Issue
Block a user