diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2023-07-13 10:53:34 +0200 |
---|---|---|
committer | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2023-07-24 14:40:59 +0200 |
commit | 780149bc385b2b7670012e6b46bbd172cbbebd65 (patch) | |
tree | 93847f3c4c41eaf758a1cdc7c503b297ec8f7bf2 /spec/build/bsps | |
parent | bsps/imx*: Support more GPIO controllers (diff) | |
download | rtems-780149bc385b2b7670012e6b46bbd172cbbebd65.tar.bz2 |
bsps/imsrt: Make flash config more flexible
The flash configuration is something very board specific. So move the
file to a board specific location. Beneath that, not all controllers and
configurations need the flash config right at the address 0 of the
flash. For example on the i.MXRT11xx, the config has an offset for some
flash types.
Diffstat (limited to 'spec/build/bsps')
-rw-r--r-- | spec/build/bsps/arm/imxrt/bspimxrt1052.yml | 1 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/grp.yml | 4 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/linkcmdsmemory.yml | 15 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/obj.yml | 1 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/optmemflashcfgoffset.yml | 21 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/optmemflashcfgsz.yml | 20 | ||||
-rw-r--r-- | spec/build/bsps/arm/imxrt/optmemflashivtoffset.yml | 20 |
7 files changed, 55 insertions, 27 deletions
diff --git a/spec/build/bsps/arm/imxrt/bspimxrt1052.yml b/spec/build/bsps/arm/imxrt/bspimxrt1052.yml index d2bd43d84d..8413b4bef1 100644 --- a/spec/build/bsps/arm/imxrt/bspimxrt1052.yml +++ b/spec/build/bsps/arm/imxrt/bspimxrt1052.yml @@ -25,6 +25,7 @@ links: source: - bsps/arm/imxrt/boards/evkbimxrt1050/clock_config.c - bsps/arm/imxrt/boards/evkbimxrt1050/flash-dcd.c +- bsps/arm/imxrt/boards/evkbimxrt1050/flash-flexspi-config.c - bsps/arm/imxrt/boards/evkbimxrt1050/pin_mux.c - bsps/arm/imxrt/boards/evkbimxrt1050/clock-arm-pll-config.c - bsps/arm/imxrt/dts/imxrt1050-evkb.c diff --git a/spec/build/bsps/arm/imxrt/grp.yml b/spec/build/bsps/arm/imxrt/grp.yml index c8128ef10d..6191823899 100644 --- a/spec/build/bsps/arm/imxrt/grp.yml +++ b/spec/build/bsps/arm/imxrt/grp.yml @@ -33,7 +33,9 @@ links: - role: build-dependency uid: optmemextramsz - role: build-dependency - uid: optmemflashcfgsz + uid: optmemflashcfgoffset +- role: build-dependency + uid: optmemflashivtoffset - role: build-dependency uid: optmemflashivtsz - role: build-dependency diff --git a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml index d50d2c814b..967423ed6b 100644 --- a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml +++ b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml @@ -5,12 +5,13 @@ content: | NULL : ORIGIN = 0x00000000, LENGTH = ${IMXRT_MEMORY_NULL_SIZE:#010x} ITCM : ORIGIN = ${IMXRT_MEMORY_NULL_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_ITCM_SIZE:#010x} DTCM : ORIGIN = 0x20000000, LENGTH = ${IMXRT_MEMORY_DTCM_SIZE:#010x} - OCRAM : ORIGIN = ${IMXRT_MEMORY_OCRAM_ORIGIN}, LENGTH = ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} - OCRAM_NOCACHE : ORIGIN = ${IMXRT_MEMORY_OCRAM_ORIGIN} + ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} + OCRAM : ORIGIN = ${IMXRT_MEMORY_OCRAM_ORIGIN:#010x}, LENGTH = ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} + OCRAM_NOCACHE : ORIGIN = ${IMXRT_MEMORY_OCRAM_ORIGIN:#010x} + ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} PERIPHERAL : ORIGIN = 0x40000000, LENGTH = 0x20000000 - FLASH_CONFIG : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x} - FLASH_IVT : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x} + ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x} - FLASH : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x} + ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x} + ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_SIZE:#010x} - ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x} - ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x} + FLASH_RAW : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_SIZE:#010x} + FLASH_CONFIG : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x} + ${IMXRT_MEMORY_FLASH_CFG_OFFSET:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_IVT_OFFSET:#010x} - ${IMXRT_MEMORY_FLASH_CFG_OFFSET:#010x} + FLASH_IVT : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x} + ${IMXRT_MEMORY_FLASH_IVT_OFFSET:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x} + FLASH : ORIGIN = ${IMXRT_MEMORY_FLASH_ORIGIN:#010x} + ${IMXRT_MEMORY_FLASH_IVT_OFFSET:#010x} + ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_SIZE:#010x} - ${IMXRT_MEMORY_FLASH_IVT_OFFSET:#010x} - ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x} EXTRAM : ORIGIN = ${IMXRT_MEMORY_EXTRAM_ORIGIN:#010x}, LENGTH = ${IMXRT_MEMORY_EXTRAM_SIZE:#010x} - ${IMXRT_MEMORY_EXTRAM_NOCACHE_SIZE:#010x} EXTRAM_NOCACHE : ORIGIN = ${IMXRT_MEMORY_EXTRAM_ORIGIN:#010x} + ${IMXRT_MEMORY_EXTRAM_SIZE:#010x} - ${IMXRT_MEMORY_EXTRAM_NOCACHE_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_EXTRAM_NOCACHE_SIZE:#010x} } @@ -39,6 +40,10 @@ content: | imxrt_memory_peripheral_end = ORIGIN (PERIPHERAL) + LENGTH (PERIPHERAL); imxrt_memory_peripheral_size = LENGTH (PERIPHERAL); + imxrt_memory_flash_raw_begin = ORIGIN (FLASH_RAW); + imxrt_memory_flash_raw_end = ORIGIN (FLASH_RAW) + LENGTH (FLASH_RAW); + imxrt_memory_flash_raw_size = LENGTH (FLASH_RAW); + imxrt_memory_flash_config_begin = ORIGIN (FLASH_CONFIG); imxrt_memory_flash_config_end = ORIGIN (FLASH_CONFIG) + LENGTH (FLASH_CONFIG); imxrt_memory_flash_config_size = LENGTH (FLASH_CONFIG); diff --git a/spec/build/bsps/arm/imxrt/obj.yml b/spec/build/bsps/arm/imxrt/obj.yml index 29e234a747..ca1b07beca 100644 --- a/spec/build/bsps/arm/imxrt/obj.yml +++ b/spec/build/bsps/arm/imxrt/obj.yml @@ -41,7 +41,6 @@ source: - bsps/arm/imxrt/start/bspstart.c - bsps/arm/imxrt/start/bspstarthooks.c - bsps/arm/imxrt/start/flash-boot-data.c -- bsps/arm/imxrt/start/flash-flexspi-config.c - bsps/arm/imxrt/start/flash-ivt.c - bsps/arm/imxrt/start/imxrt-ffec-init.c - bsps/arm/imxrt/start/mpu-config.c diff --git a/spec/build/bsps/arm/imxrt/optmemflashcfgoffset.yml b/spec/build/bsps/arm/imxrt/optmemflashcfgoffset.yml new file mode 100644 index 0000000000..269dcdb4e1 --- /dev/null +++ b/spec/build/bsps/arm/imxrt/optmemflashcfgoffset.yml @@ -0,0 +1,21 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-integer: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2023 embedded brains GmbH (http://www.embedded-brains.de) +default: +- enabled-by: arm/imxrt1166-cm7-saltshaker + value: 0x00000400 +- enabled-by: true + value: 0x00000000 +description: | + Ofset of the flash configuration area from the start of the FlexSPI / SEMC + flash in bytes. The example link files for the i.MX RT1050 set that to 0. On + the i.MX RT1166, it's 0x400. +enabled-by: true +format: '{:#010x}' +links: [] +name: IMXRT_MEMORY_FLASH_CFG_OFFSET +type: build diff --git a/spec/build/bsps/arm/imxrt/optmemflashcfgsz.yml b/spec/build/bsps/arm/imxrt/optmemflashcfgsz.yml deleted file mode 100644 index d724059956..0000000000 --- a/spec/build/bsps/arm/imxrt/optmemflashcfgsz.yml +++ /dev/null @@ -1,20 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause -actions: -- get-integer: null -- env-assign: null -build-type: option -copyrights: -- Copyright (C) 2020 embedded brains GmbH & Co. KG -default: -- enabled-by: true - value: 0x00001000 -description: | - Size of the flash configuration area at the start of the FlexSPI / SEMC flash - in bytes. Either 4 KByte for FlexSPI NOR / SEMC NOR or 1 Kbyte for most other. - Take a look at the i.MX RT1050 Processor Reference Manual chapter 9.7 "Program - image" for details. -enabled-by: true -format: '{:#010x}' -links: [] -name: IMXRT_MEMORY_FLASH_CFG_SIZE -type: build diff --git a/spec/build/bsps/arm/imxrt/optmemflashivtoffset.yml b/spec/build/bsps/arm/imxrt/optmemflashivtoffset.yml new file mode 100644 index 0000000000..4d3bd5556e --- /dev/null +++ b/spec/build/bsps/arm/imxrt/optmemflashivtoffset.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-integer: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2023 embedded brains GmbH (http://www.embedded-brains.de) +default: +- enabled-by: true + value: 0x00001000 +description: | + Offset of the image vector table in flash in bytes. Either 4 KByte for FlexSPI + NOR / SEMC NOR or 1 KByte for most others (on i.MXRT1050). Take a look at the + i.MXRT1050 / i.MXRT1166 Processor Reference Manual chapter "System Boot" / + "Program image" for details. +enabled-by: true +format: '{:#010x}' +links: [] +name: IMXRT_MEMORY_FLASH_IVT_OFFSET +type: build |