summaryrefslogtreecommitdiff
path: root/examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c
diff options
context:
space:
mode:
authorRaul Munoz <raul.munoz@toradex.com>2017-05-19 15:06:24 -0300
committerStefan Agner <stefan.agner@toradex.com>2017-05-22 17:09:55 -0700
commit9f91f1a8ae7738804d012b1751f6c806a2138d10 (patch)
treee74a83837039674b465e12d2b50bcb7fddd2d937 /examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c
parent0c98e2850861ccc1becc20590b85d061d1934269 (diff)
examples: hello_world_ocram: update CMake structure
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c')
-rw-r--r--examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c
index 598d2de..9081bfd 100644
--- a/examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c
+++ b/examples/imx7_colibri_m4/demo_apps/hello_world_ocram/hardware_init.c
@@ -31,43 +31,15 @@
#include "board.h"
#include "pin_mux.h"
-void RDC_memory_init(void)
-{
- uint32_t start, end;
-#if defined(__CC_ARM)
- extern uint32_t Image$$VECTOR_ROM$$Base[];
- extern uint32_t Image$$ER_m_text$$Limit[];
- extern uint32_t Image$$RW_m_data$$Base[];
- extern uint32_t Image$$RW_m_data$$Limit[];
-
- start = (uint32_t)Image$$VECTOR_ROM$$Base & 0xFFFFFF80;
- end = (uint32_t)(Image$$ER_m_text$$Limit + (Image$$RW_m_data$$Limit - Image$$RW_m_data$$Base));
- end = (end + 0x7F) & 0xFFFFFF80;
-#else
- extern uint32_t __FLASH_START[];
- extern uint32_t __FLASH_END[];
-
- start = (uint32_t)__FLASH_START & 0xFFFFFF80;
- end = ((uint32_t)__FLASH_END + 0x7F) & 0xFFFFFF80;
-#endif
-
- /* Grant all domains read/write access because in DSM mode Linux need to
- * save/restore OCRAM content */
- RDC_SetMrAccess(RDC, rdcMrOcram, start, end, 0xFF, true, false);
-}
-
void hardware_init(void)
{
/* Board specific RDC settings */
BOARD_RdcInit();
- /* Bound part of the OCRAM Memory to M4 Core */
- RDC_memory_init();
-
/* Board specific clock settings */
BOARD_ClockInit();
- /* Initialize debug uart */
+ /* initialize debug uart */
dbg_uart_init();
}