mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 07:43:34 +08:00
fmurt1062-v1:Update imxrt_flexspi_nor_boot configurable
This commit is contained in:
committed by
David Sidrane
parent
e173df80a1
commit
3ed643f3d7
@@ -43,7 +43,7 @@
|
|||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
flash (rx) : ORIGIN = 0x60000000, LENGTH = 8M
|
flash (rx) : ORIGIN = 0x60000000, LENGTH = 8M
|
||||||
sram (rwx) : ORIGIN = 0x20200000, LENGTH = 512M
|
sram (rwx) : ORIGIN = 0x20200000, LENGTH = 768K
|
||||||
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 128K
|
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 128K
|
||||||
dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||||
}
|
}
|
||||||
@@ -51,8 +51,8 @@ MEMORY
|
|||||||
OUTPUT_ARCH(arm)
|
OUTPUT_ARCH(arm)
|
||||||
EXTERN(_vectors)
|
EXTERN(_vectors)
|
||||||
EXTERN(flash_config)
|
EXTERN(flash_config)
|
||||||
EXTERN(image_vector_table)
|
EXTERN(g_image_vector_table)
|
||||||
EXTERN(boot_data)
|
EXTERN(g_boot_data)
|
||||||
|
|
||||||
ENTRY(_stext)
|
ENTRY(_stext)
|
||||||
|
|
||||||
|
|||||||
@@ -44,21 +44,21 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.ivt")))
|
__attribute__((section(".boot_hdr.ivt")))
|
||||||
const struct ivt_s image_vector_table = {
|
const struct ivt_s g_image_vector_table = {
|
||||||
IVT_HEADER, /* IVT Header */
|
IVT_HEADER, /* IVT Header */
|
||||||
0x60002000, /* Image Entry Function */
|
IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
|
||||||
IVT_RSVD, /* Reserved = 0 */
|
IVT_RSVD, /* Reserved = 0 */
|
||||||
(uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
|
(uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
|
||||||
(uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
|
(uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
|
||||||
(uint32_t) &image_vector_table, /* Pointer to IVT Self (absolute address */
|
(uint32_t)IMAG_VECTOR_TABLE, /* Pointer to IVT Self (absolute address */
|
||||||
(uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
|
(uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
|
||||||
IVT_RSVD /* Reserved = 0 */
|
IVT_RSVD /* Reserved = 0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
__attribute__((section(".boot_hdr.boot_data")))
|
__attribute__((section(".boot_hdr.boot_data")))
|
||||||
const struct boot_data_s boot_data = {
|
const struct boot_data_s g_boot_data = {
|
||||||
FLASH_BASE, /* boot start location */
|
IMAGE_DEST, /* boot start location */
|
||||||
(FLASH_END - FLASH_BASE), /* size */
|
(IMAGE_DEST_END - IMAGE_DEST), /* size */
|
||||||
PLUGIN_FLAG, /* Plugin flag*/
|
PLUGIN_FLAG, /* Plugin flag */
|
||||||
0xFFFFFFFF /* empty - extra data word */
|
0xffffffff /* empty - extra data word */
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* config/imxrt1060-evk/src/imxrt_flexspi_nor_boot.h
|
* boards/arm/imxrt/imxrt1060-evk/src/imxrt_flexspi_nor_boot.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||||
* Authors: Ivan Ucherdzhiev <ivanucherdjiev@gmail.com>
|
* Authors: Ivan Ucherdzhiev <ivanucherdjiev@gmail.com>
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __CONFIGS_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H
|
#ifndef __BOARDS_ARM_IMXRT_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H
|
||||||
#define __CONFIGS_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H
|
#define __BOARDS_ARM_IMXRT_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -76,17 +76,44 @@
|
|||||||
|
|
||||||
#define FLASH_BASE 0x60000000
|
#define FLASH_BASE 0x60000000
|
||||||
#define FLASH_END 0x7f7fffff
|
#define FLASH_END 0x7f7fffff
|
||||||
|
|
||||||
|
/* This needs to take into account bootloader */
|
||||||
|
|
||||||
|
#define ROM_BOOTLOADER_OCRAM_RES 0x8000
|
||||||
|
#define OCRAM_BASE (0x20200000 + ROM_BOOTLOADER_OCRAM_RES)
|
||||||
|
#define OCRAM_END (OCRAM_BASE + (512 * 1024) + (256 * 1024) -\
|
||||||
|
ROM_BOOTLOADER_OCRAM_RES)
|
||||||
|
|
||||||
|
|
||||||
#define SCLK 1
|
#define SCLK 1
|
||||||
|
#if defined(CONFIG_BOOT_RUNFROMFLASH)
|
||||||
|
# define IMAGE_DEST FLASH_BASE
|
||||||
|
# define IMAGE_DEST_END FLASH_END
|
||||||
|
# define IMAGE_DEST_OFFSET 0
|
||||||
|
#else
|
||||||
|
# define IMAGE_DEST OCRAM_BASE
|
||||||
|
# define IMAGE_DEST_END OCRAM_END
|
||||||
|
# define IMAGE_DEST_OFFSET IVT_SIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LOCATE_IN_DEST(x) (((uint32_t)(x)) - FLASH_BASE + IMAGE_DEST)
|
||||||
|
|
||||||
#define DCD_ADDRESS 0
|
#define DCD_ADDRESS 0
|
||||||
#define BOOT_DATA_ADDRESS &boot_data
|
#define BOOT_DATA_ADDRESS LOCATE_IN_DEST(&g_boot_data)
|
||||||
#define CSF_ADDRESS 0
|
#define CSF_ADDRESS 0
|
||||||
#define PLUGIN_FLAG (uint32_t)0
|
#define PLUGIN_FLAG (uint32_t)0
|
||||||
|
|
||||||
|
/* Located in Destination Memory */
|
||||||
|
|
||||||
|
#define IMAGE_ENTRY_ADDRESS ((uint32_t)&_vectors)
|
||||||
|
#define IMAG_VECTOR_TABLE LOCATE_IN_DEST(&g_image_vector_table)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
extern uint32_t _vectors[];
|
||||||
|
|
||||||
/* IVT Data */
|
/* IVT Data */
|
||||||
|
|
||||||
struct ivt_s {
|
struct ivt_s {
|
||||||
@@ -116,11 +143,11 @@ struct ivt_s {
|
|||||||
|
|
||||||
uint32_t boot_data;
|
uint32_t boot_data;
|
||||||
|
|
||||||
/* Absolute address of the IVT.*/
|
/* Absolute address of the IVT. */
|
||||||
|
|
||||||
uint32_t self;
|
uint32_t self;
|
||||||
|
|
||||||
/* Absolute address of the image CSF.*/
|
/* Absolute address of the image CSF. */
|
||||||
|
|
||||||
uint32_t csf;
|
uint32_t csf;
|
||||||
|
|
||||||
@@ -142,6 +169,6 @@ struct boot_data_s {
|
|||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
extern const struct boot_data_s boot_data;
|
extern const struct boot_data_s g_boot_data;
|
||||||
|
|
||||||
#endif /* __CONFIGS_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H */
|
#endif /* __BOARDS_ARM_IMXRT_IMXRT1060_EVK_SRC_IMXRT_FLEXSPI_NOR_BOOT_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user