[PATCH rtems v2 11/12] bsps/imxrt: Make the OCRAM address configurable

Christian Mauderer christian.mauderer at embedded-brains.de
Tue May 9 12:10:58 UTC 2023


Depending on the chip variant, the OCRAM can have different addresses.
Make it configurable.
---
 spec/build/bsps/arm/imxrt/grp.yml               |  2 ++
 spec/build/bsps/arm/imxrt/linkcmdsmemory.yml    |  4 ++--
 spec/build/bsps/arm/imxrt/optmemocramorigin.yml | 17 +++++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 spec/build/bsps/arm/imxrt/optmemocramorigin.yml

diff --git a/spec/build/bsps/arm/imxrt/grp.yml b/spec/build/bsps/arm/imxrt/grp.yml
index 17b4f48dab..feda472401 100644
--- a/spec/build/bsps/arm/imxrt/grp.yml
+++ b/spec/build/bsps/arm/imxrt/grp.yml
@@ -46,6 +46,8 @@ links:
   uid: optmemnullsz
 - role: build-dependency
   uid: optmemocramnocachesz
+- role: build-dependency
+  uid: optmemocramorigin
 - role: build-dependency
   uid: optmemocramsz
 - role: build-dependency
diff --git a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml
index 2d8187052f..cf66966b5d 100644
--- a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml
+++ b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml
@@ -5,8 +5,8 @@ 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 = 0x20200000, LENGTH = ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x}
-    OCRAM_NOCACHE  : ORIGIN = 0x20200000 + ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_OCRAM_NOCACHE_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}
     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}
diff --git a/spec/build/bsps/arm/imxrt/optmemocramorigin.yml b/spec/build/bsps/arm/imxrt/optmemocramorigin.yml
new file mode 100644
index 0000000000..c3d08918a7
--- /dev/null
+++ b/spec/build/bsps/arm/imxrt/optmemocramorigin.yml
@@ -0,0 +1,17 @@
+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: 0x20200000
+description: |
+  Origin of the OCRAM.
+enabled-by: true
+format: '{:#010x}'
+links: []
+name: IMXRT_MEMORY_OCRAM_ORIGIN
+type: build
-- 
2.35.3



More information about the devel mailing list