summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-03-06 18:07:20 -0800
committerStefan Agner <stefan.agner@toradex.com>2017-03-06 18:25:28 -0800
commit18465a98c5c94c3100cba3f596ce384970f966d0 (patch)
tree63ed2928effe085aa567b1b1d11378cf9ae24b40
parent64164f0de9eb54c016e5caccc9f5ec3a90d30a01 (diff)
use OCRAM
But remove EPD OCRAM, since this is not clocked during suspend. Use TCM instead.
-rw-r--r--examples/imx7_colibri_m4/low_power_demo/armgcc/CMakeLists.txt4
-rw-r--r--examples/imx7_colibri_m4/low_power_demo/hardware_init.c4
-rw-r--r--platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld4
3 files changed, 8 insertions, 4 deletions
diff --git a/examples/imx7_colibri_m4/low_power_demo/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/low_power_demo/armgcc/CMakeLists.txt
index 0b18ea5..c062a43 100644
--- a/examples/imx7_colibri_m4/low_power_demo/armgcc/CMakeLists.txt
+++ b/examples/imx7_colibri_m4/low_power_demo/armgcc/CMakeLists.txt
@@ -23,10 +23,10 @@ SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR})
SET(BspRootDirPath ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
# DEBUG LINK FILE
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${BspRootDirPath}/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static")
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${BspRootDirPath}/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld -static")
# RELEASE LINK FILE
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${BspRootDirPath}/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${BspRootDirPath}/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld -static")
# DEBUG ASM FLAGS
SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
diff --git a/examples/imx7_colibri_m4/low_power_demo/hardware_init.c b/examples/imx7_colibri_m4/low_power_demo/hardware_init.c
index ce23c34..a721220 100644
--- a/examples/imx7_colibri_m4/low_power_demo/hardware_init.c
+++ b/examples/imx7_colibri_m4/low_power_demo/hardware_init.c
@@ -42,6 +42,10 @@ void hardware_init(void)
/* Enable clock gate for wakeup mix*/
CCM_ControlGate(CCM, BOARD_SIM_WAKEUP_CCGR, ccmClockNeededAll);
+
+ /* Enable clock gate for OCRAM */
+ CCM_ControlGate(CCM, ccmCcgrGateOcram, ccmClockNeededAll);
+
/* In this demo, we need to share board GPIO without RDC SEMAPHORE */
RDC_SetPdapAccess(RDC, rdcPdapGpio1, 0xFF, false, false);
RDC_SetPdapAccess(RDC, rdcPdapGpio4, 0xFF, false, false);
diff --git a/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld b/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld
index c74b792..49967f9 100644
--- a/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld
+++ b/platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_ocram.ld
@@ -56,8 +56,8 @@ STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
MEMORY
{
m_interrupts (RX) : ORIGIN = 0x00910000, LENGTH = 0x00000240
- m_text (RX) : ORIGIN = 0x00910240, LENGTH = 0x0000fdc0
- m_data (RW) : ORIGIN = 0x20220000, LENGTH = 0x00020000 /* EPDC */
+ m_text (RX) : ORIGIN = 0x00910240, LENGTH = 0x00007dc0
+ m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /*TCMU*/
}
__FLASH_START = ORIGIN(m_interrupts);