]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-demos/posix-smp.git/commitdiff
PRSDK-3279 Add posix-smp support for AM574x
authorSinthu Raja M <x0257345@ti.com>
Mon, 27 Nov 2017 17:16:30 +0000 (22:46 +0530)
committerPratap Reddy <x0257344@ti.com>
Thu, 30 Nov 2017 13:12:45 +0000 (18:42 +0530)
 Add SYS/BIOS example of posix-smp for AM574x
 Update make file to add support for AM574x

Signed-off-by: Pratap Reddy <x0257344@ti.com>
AM574x/armv7/bios/dhry.cfg [new file with mode: 0644]
AM574x/armv7/bios/dhryAM574xarmProject.txt [new file with mode: 0644]
AM574x/c66/bios/dhry.cfg [new file with mode: 0644]
AM574x/c66/bios/dhryAM574xC66Project.txt [new file with mode: 0644]
AM574x/m4/bios/dhry.cfg [new file with mode: 0644]
AM574x/m4/bios/dhryAM574xm4Project.txt [new file with mode: 0644]
dhry_1.c
makefile

diff --git a/AM574x/armv7/bios/dhry.cfg b/AM574x/armv7/bios/dhry.cfg
new file mode 100644 (file)
index 0000000..476c9cb
--- /dev/null
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ *                                                                             *
+ * Copyright (c) 2017 Texas Instruments Incorporated - http://www.ti.com/      *
+ *                        ALL RIGHTS RESERVED                                  *
+ *                                                                             *
+ ******************************************************************************/
+
+/*******************************************************************************
+*  file name: dhry.cfg
+*  This file is included in the ethernet switch unit test
+*
+*******************************************************************************/
+
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Error = xdc.useModule('xdc.runtime.Error');
+var Log = xdc.useModule('xdc.runtime.Log');
+var Main = xdc.useModule('xdc.runtime.Main');
+var Memory = xdc.useModule('xdc.runtime.Memory')
+var System = xdc.useModule('xdc.runtime.System');
+var Text = xdc.useModule('xdc.runtime.Text');
+var LoggerBuf = xdc.useModule('ti.sysbios.smp.LoggerBuf');
+var SysMin = xdc.useModule('ti.sysbios.smp.SysMin');
+xdc.useModule('xdc.runtime.Timestamp');
+
+var BIOS        = xdc.useModule('ti.sysbios.BIOS');
+BIOS.smpEnabled = true;
+Posix = xdc.useModule('ti.sysbios.posix.Settings');
+Posix.supportsMutexPriority = true;
+var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
+
+/*
+ * Program.argSize sets the size of the .args section.
+ * The examples don't use command line args so argSize is set to 0.
+ */
+Program.argSize = 0x0;
+
+/*
+ * Uncomment this line to globally disable Asserts.
+ * All modules inherit the default from the 'Defaults' module.  You
+ * can override these defaults on a per-module basis using Module.common$.
+ * Disabling Asserts will save code space and improve runtime performance.
+Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
+ */
+
+/*
+ * Uncomment this line to keep module names from being loaded on the target.
+ * The module name strings are placed in the .const section. Setting this
+ * parameter to false will save space in the .const section.  Error and
+ * Assert messages will contain an "unknown module" prefix instead
+ * of the actual module name.
+Defaults.common$.namedModule = false;
+ */
+
+/*
+ * Minimize exit handler array in System.  The System module includes
+ * an array of functions that are registered with System_atexit() to be
+ * called by System_exit().
+ */
+System.maxAtexitHandlers = 4;
+
+/*
+ * Uncomment this line to disable the Error print function.
+ * We lose error information when this is disabled since the errors are
+ * not printed.  Disabling the raiseHook will save some code space if
+ * your app is not using System_printf() since the Error_print() function
+ * calls System_printf().
+Error.raiseHook = null;
+ */
+
+/*
+ * Uncomment this line to keep Error, Assert, and Log strings from being
+ * loaded on the target.  These strings are placed in the .const section.
+ * Setting this parameter to false will save space in the .const section.
+ * Error, Assert and Log message will print raw ids and args instead of
+ * a formatted message.
+Text.isLoaded = false;
+ */
+
+/*
+ * Uncomment this line to disable the output of characters by SysMin
+ * when the program exits.  SysMin writes characters to a circular buffer.
+ * This buffer can be viewed using the SysMin Output view in ROV.
+SysMin.flushAtExit = false;
+ */
+
+/*
+ * The BIOS module will create the default heap for the system.
+ * Specify the size of this default heap.
+ */
+BIOS.heapSize = 0xc0000;
+
+/*
+ * Build a custom SYS/BIOS library from sources.
+ */
+BIOS.libType = BIOS.LibType_Custom;
+
+/* System stack size (used by ISRs and Swis) */
+Program.stack = 0x20000;
+
+/* Circular buffer size for System_printf() */
+SysMin.bufSize = 0x400;
+
+/*
+ * Create and install logger for the whole system
+ */
+var loggerBufParams = new LoggerBuf.Params();
+loggerBufParams.numEntries = 32;
+var logger0 = LoggerBuf.create(loggerBufParams);
+Defaults.common$.logger = logger0;
+Main.common$.diags_INFO = Diags.ALWAYS_ON;
+
+System.SupportProxy = SysMin;
+var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
+
+var Core = xdc.useModule('ti.sysbios.family.arm.a15.smp.Core');
+//Core.useSkernelCmd = false; /* Set to false if running in CCS and using gel files to wake-up secondary cores */
+Core.numCores = 2;
+
+var Cache = xdc.useModule('ti.sysbios.family.arm.a15.smp.Cache');
+var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
+
+/* Enable the cache */
+Cache.enableCache = true;
+
+/* Enable the MMU (Required for L1/L2 data caching)*/
+Mmu.enableMMU = true;
+
+/* descriptor attribute structure */
+var peripheralAttrs = new Mmu.DescriptorAttrs();
+
+Mmu.initDescAttrsMeta(peripheralAttrs);
+
+peripheralAttrs.type = Mmu.DescriptorType_BLOCK;  // BLOCK descriptor
+peripheralAttrs.noExecute = true;                 // not executable
+peripheralAttrs.accPerm = 0;                      // read/write at PL1
+peripheralAttrs.attrIndx = 1;                     // MAIR0 Byte1 describes
+                                                      // memory attributes for
+                                                      // each BLOCK MMU entry
+
+/* Define the base address of the 2 MB page
+ * the peripheral resides in.
+ */
+var peripheralBaseAddrs = [
+  { base: 0x4ae00000, size: 0x00100000 },  /* PRM */
+  { base: 0x51000000, size: 0x00800000 },  /* pcie_ss1 regs */
+  { base: 0x51800000, size: 0x01000000 },  /* pcie_ss2 regs */
+  { base: 0x20000000, size: 0x10000000 },  /* pcie_ss1 data */
+  { base: 0x30000000, size: 0x10000000 },  /* pcie_ss2 data */
+  /* Following registers for IODELAY/PINMUX */
+  { base: 0x4844a000, size: 0x00001000 },
+  { base: 0x48447000, size: 0x00001000 },
+  { base: 0x4a002000, size: 0x00001000 },
+  { base: 0x43300000, size: 0x00300000 }
+];
+
+/* Configure the corresponding MMU page descriptor accordingly */
+for (var i =0; i < peripheralBaseAddrs.length; i++)
+{
+  for (var j = 0; j < peripheralBaseAddrs[i].size; j += 0x200000)
+  {
+      var addr = peripheralBaseAddrs[i].base + j;
+      Mmu.setSecondLevelDescMeta(addr, addr, peripheralAttrs);
+  }
+}
+
+/* ================ Driver configuration ================ */
+
+var socType = "am574x";
+
+/*use CSL package*/
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
+
+/* Load the osal package -- required by board & interrupt example */
+var osType = "tirtos"
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
+
+/* Load the I2C package  - required by board */
+var I2c = xdc.loadPackage('ti.drv.i2c');
+I2c.Settings.socType = socType;
+
+/* Load the uart package -- required by board */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
+
+/* Load the gpio package */
+var Gpio = xdc.loadPackage('ti.drv.gpio');
+Gpio.Settings.socType = socType;
+
+/* Load the Board package and set the board name */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "idkAM574x";
+
+/* ================ Memory sections configuration ================ */
+Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
+Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
diff --git a/AM574x/armv7/bios/dhryAM574xarmProject.txt b/AM574x/armv7/bios/dhryAM574xarmProject.txt
new file mode 100644 (file)
index 0000000..5cc9c7d
--- /dev/null
@@ -0,0 +1,7 @@
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry.h"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_1.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_2.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/AM574x/armv7/bios/dhry.cfg"
+-ccs.setCompilerOptions "-c -mfloat-abi=hard -DBIOS_POSIX -DREG=register -g -gstrict-dwarf -MMD -MP"
+-rtsc.enableRtsc
+-ccs.setLinkerOptions " -lgcc -lm -lrdimon -nostartfiles -static -Wl,--gc-sections -L$(BIOS_INSTALL_PATH)/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard --specs=nano.specs"
diff --git a/AM574x/c66/bios/dhry.cfg b/AM574x/c66/bios/dhry.cfg
new file mode 100644 (file)
index 0000000..fdc4f8d
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2017, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * */
+
+/*
+ *  The SysStd System provider is a good one to use for debugging
+ *  but does not have the best performance. Use xdc.runtime.SysMin
+ *  for better performance.
+ */
+var Memory = xdc.useModule('xdc.runtime.Memory');
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var Event = xdc.useModule('ti.sysbios.knl.Event');
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
+var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
+var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+var Log = xdc.useModule('xdc.runtime.Log');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");
+var Hwi = xdc.useModule ("ti.sysbios.family.c64p.Hwi");
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Error = xdc.useModule('xdc.runtime.Error');
+var Main = xdc.useModule('xdc.runtime.Main');
+var Types = xdc.useModule('xdc.runtime.Types');
+var Text = xdc.useModule('xdc.runtime.Text');
+var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
+var System   = xdc.useModule('xdc.runtime.System');
+var SysStd   = xdc.useModule('xdc.runtime.SysStd');
+System.SupportProxy = SysStd;
+
+/* BIOS/XDC modules */
+var BIOS        = xdc.useModule('ti.sysbios.BIOS');
+BIOS.heapSize   = 0x60000;
+var Task        = xdc.useModule('ti.sysbios.knl.Task');
+Posix = xdc.useModule('ti.sysbios.posix.Settings');
+Posix.supportsMutexPriority = true;
+
+var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
+//Timestamp.SupportProxy = xdc.useModule('ti.sysbios.timers.timer64.TimestampProvider');
+/* ================ Driver configuration ================ */
+
+var socType = "am574x";
+
+/*use CSL package*/
+var Csl = xdc.useModule('ti.csl.Settings');
+Csl.deviceType = socType;
+
+/* Load the osal package -- required by board & interrupt example */
+var osType = "tirtos"
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
+Osal.Settings.socType = socType;
+
+/* Load the I2C package  - required by board */
+var I2c = xdc.loadPackage('ti.drv.i2c');
+I2c.Settings.socType = socType;
+
+/* Load the uart package -- required by board */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
+
+/* Load the gpio package */
+var Gpio = xdc.loadPackage('ti.drv.gpio');
+Gpio.Settings.socType = socType;
+
+/* Load the Board package and set the board name */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "idkAM574x";
+
+/* ================ Memory sections configuration ================ */
+Program.sectMap[".text"] = "EXT_RAM";
+Program.sectMap[".const"] = "EXT_RAM";
+Program.sectMap[".plt"] = "EXT_RAM";
+Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
+Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
diff --git a/AM574x/c66/bios/dhryAM574xC66Project.txt b/AM574x/c66/bios/dhryAM574xC66Project.txt
new file mode 100644 (file)
index 0000000..95086ed
--- /dev/null
@@ -0,0 +1,6 @@
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry.h"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_1.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_2.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/AM574x/c66/bios/dhry.cfg"
+-ccs.setCompilerOptions "-mv6600 -o3 -DBIOS_POSIX -DREG=register --diag_warning=225"
+-rtsc.enableRtsc
diff --git a/AM574x/m4/bios/dhry.cfg b/AM574x/m4/bios/dhry.cfg
new file mode 100644 (file)
index 0000000..7701f98
--- /dev/null
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ *                                                                             *
+ * Copyright (c) 2017 Texas Instruments Incorporated - http://www.ti.com/      *
+ *                        ALL RIGHTS RESERVED                                  *
+ *                                                                             *
+ ******************************************************************************/
+
+/*******************************************************************************
+*  file name: dhry.cfg
+*  This file is included in the ethernet switch unit test
+*
+*******************************************************************************/
+
+
+/* use modules */
+var Main                       = xdc.useModule('xdc.runtime.Main');
+var System                     = xdc.useModule('xdc.runtime.System');
+
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+Posix = xdc.useModule('ti.sysbios.posix.Settings');
+Posix.supportsMutexPriority = true;
+
+/*
+ * The BIOS module will create the default heap for the system.
+ * Specify the size of this default heap.
+ */
+BIOS.heapSize = 0xA0000;
+
+/* IntXbar.connectIRQMeta(38, 196); */   /* PRUSS2-2, RX */
+/* IntXbar.connectIRQMeta(50, 200); */   /* PRUSS2-2, TX */
+
+/*
+ * Create and install logger for the whole system
+ */
+BIOS.libType = BIOS.LibType_Custom;
+
+//Core.useSkernelCmd = false; /* Set to false if running in CCS and using gel files to wake-up secondary cores */
+xdc.useModule("xdc.runtime.Timestamp");
+xdc.useModule("ti.sysbios.family.arm.ducati.TimestampProvider");
+/* ================ Driver configuration ================ */
+
+var socType = "am574x";
+
+/*use CSL package*/
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
+
+/* Load the osal package -- required by board & interrupt example */
+var osType = "tirtos"
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
+
+/* Load the I2C package  - required by board */
+var I2c = xdc.loadPackage('ti.drv.i2c');
+I2c.Settings.socType = socType;
+
+/* Load the uart package -- required by board */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
+
+/* Load the gpio package */
+var Gpio = xdc.loadPackage('ti.drv.gpio');
+Gpio.Settings.socType = socType;
+
+/* Load the Board package and set the board name */
+var Board = xdc.loadPackage('ti.board');
+Board.Settings.boardName = "idkAM574x";
+
+/* ================ Cache and MMU configuration ================ */
+
+/* Enable cache */
+var Cache       = xdc.useModule('ti.sysbios.hal.unicache.Cache');
+Cache.enableCache = true;
+
+/* Use AMMU module */
+var AMMU            = xdc.useModule('ti.sysbios.hal.ammu.AMMU');
+
+/* Large PAGE */
+AMMU.largePages[0].pageEnabled = AMMU.Enable_YES;
+AMMU.largePages[0].logicalAddress = 0x40000000;
+AMMU.largePages[0].translatedAddress = 0x40000000;
+AMMU.largePages[0].translationEnabled = AMMU.Enable_YES;
+AMMU.largePages[0].size = AMMU.Large_512M;
+AMMU.largePages[0].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[0].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.largePages[0].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[0].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.largePages[1].pageEnabled = AMMU.Enable_YES;
+AMMU.largePages[1].logicalAddress = 0x80000000;
+AMMU.largePages[1].translatedAddress = 0x80000000;
+AMMU.largePages[1].translationEnabled = AMMU.Enable_YES;
+AMMU.largePages[1].size = AMMU.Large_512M;
+AMMU.largePages[1].L1_writePolicy = AMMU.WritePolicy_WRITE_BACK;
+AMMU.largePages[1].L1_allocate = AMMU.AllocatePolicy_ALLOCATE;
+AMMU.largePages[1].L1_cacheable = AMMU.CachePolicy_CACHEABLE;
+AMMU.largePages[1].L1_posted = AMMU.PostedPolicy_POSTED;
+AMMU.largePages[1].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[1].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.largePages[2].pageEnabled = AMMU.Enable_YES;
+AMMU.largePages[2].logicalAddress = 0xA0000000;
+AMMU.largePages[2].translatedAddress = 0xA0000000;
+AMMU.largePages[2].translationEnabled = AMMU.Enable_YES;
+AMMU.largePages[2].size = AMMU.Large_512M;
+AMMU.largePages[2].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[2].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.largePages[2].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[2].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.largePages[3].pageEnabled = AMMU.Enable_YES;
+AMMU.largePages[3].logicalAddress = 0x60000000;
+AMMU.largePages[3].translatedAddress = 0x40000000;
+AMMU.largePages[3].translationEnabled = AMMU.Enable_YES;
+AMMU.largePages[3].size = AMMU.Large_512M;
+AMMU.largePages[3].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[3].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.largePages[3].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.largePages[3].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+/* Medium Page */
+AMMU.mediumPages[0].pageEnabled = AMMU.Enable_YES;
+AMMU.mediumPages[0].logicalAddress = 0x00300000;
+AMMU.mediumPages[0].translatedAddress = 0x40300000;
+AMMU.mediumPages[0].translationEnabled = AMMU.Enable_YES;
+AMMU.mediumPages[0].size = AMMU.Medium_256K;
+
+AMMU.mediumPages[1].pageEnabled = AMMU.Enable_YES;
+AMMU.mediumPages[1].logicalAddress = 0x00400000;
+AMMU.mediumPages[1].translatedAddress = 0x40400000;
+AMMU.mediumPages[1].translationEnabled = AMMU.Enable_YES;
+AMMU.mediumPages[1].size = AMMU.Medium_256K;
+AMMU.mediumPages[1].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.mediumPages[1].L1_posted = AMMU.PostedPolicy_POSTED;
+AMMU.mediumPages[1].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.mediumPages[1].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+/* Small Page */
+AMMU.smallPages[0].pageEnabled = AMMU.Enable_YES;
+AMMU.smallPages[0].logicalAddress = 0x00000000;
+AMMU.smallPages[0].translatedAddress = 0x55020000;
+AMMU.smallPages[0].translationEnabled = AMMU.Enable_YES;
+AMMU.smallPages[0].size = AMMU.Small_16K;
+AMMU.smallPages[0].volatileQualifier = AMMU.Volatile_FOLLOW;
+AMMU.smallPages[0].L1_cacheable = AMMU.CachePolicy_CACHEABLE;
+AMMU.smallPages[0].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.smallPages[0].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[0].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.smallPages[1].pageEnabled = AMMU.Enable_YES;
+AMMU.smallPages[1].logicalAddress = 0x40000000;
+AMMU.smallPages[1].translatedAddress = 0x55080000;
+AMMU.smallPages[1].translationEnabled = AMMU.Enable_YES;
+AMMU.smallPages[1].size = AMMU.Small_16K;
+AMMU.smallPages[1].volatileQualifier = AMMU.Volatile_FOLLOW;
+AMMU.smallPages[1].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[1].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.smallPages[1].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[1].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.smallPages[2].pageEnabled = AMMU.Enable_YES;
+AMMU.smallPages[2].logicalAddress = 0x00004000;
+AMMU.smallPages[2].translatedAddress = 0x55024000;
+AMMU.smallPages[2].translationEnabled = AMMU.Enable_YES;
+AMMU.smallPages[2].size = AMMU.Small_16K;
+AMMU.smallPages[2].L1_cacheable = AMMU.CachePolicy_CACHEABLE;
+AMMU.smallPages[2].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.smallPages[2].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[2].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.smallPages[3].pageEnabled = AMMU.Enable_YES;
+AMMU.smallPages[3].logicalAddress = 0x00008000;
+AMMU.smallPages[3].translatedAddress = 0x55028000;
+AMMU.smallPages[3].translationEnabled = AMMU.Enable_YES;
+AMMU.smallPages[3].size = AMMU.Small_16K;
+AMMU.smallPages[3].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[3].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.smallPages[3].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[3].L2_posted = AMMU.PostedPolicy_NON_POSTED;
+
+AMMU.smallPages[4].pageEnabled = AMMU.Enable_YES;
+AMMU.smallPages[4].logicalAddress = 0x20000000;
+AMMU.smallPages[4].translatedAddress = 0x55020000;
+AMMU.smallPages[4].translationEnabled = AMMU.Enable_YES;
+AMMU.smallPages[4].size = AMMU.Small_16K;
+AMMU.smallPages[4].L1_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[4].L1_posted = AMMU.PostedPolicy_NON_POSTED;
+AMMU.smallPages[4].L2_cacheable = AMMU.CachePolicy_NON_CACHEABLE;
+AMMU.smallPages[4].L2_posted = AMMU.PostedPolicy_NON_POSTED;
\ No newline at end of file
diff --git a/AM574x/m4/bios/dhryAM574xm4Project.txt b/AM574x/m4/bios/dhryAM574xm4Project.txt
new file mode 100644 (file)
index 0000000..5534f42
--- /dev/null
@@ -0,0 +1,6 @@
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry.h"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_1.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/dhry_2.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/utils/dhry/AM574x/m4/bios/dhry.cfg"
+-ccs.setCompilerOptions "-qq -pdsw255 -DMAKEFILE_BUILD -mv7M4 --float_support=vfplib --abi=eabi -g -DSOC_AM574x -DAM5XX_FAMILY_BUILD -Dti_targets_arm_elf_M4 -I${PDK_INSTALL_PATH}/ti/utils/dhry/ "  -rtsc.enableRtsc
+-ccs.setLinkerOptions "--strict_compatibility=on"
index e09abb948dd005dbc1c4d2b2ce3efd63407d077a..3114c49b9324d27ec6851e93a0f5da47b52876ed 100644 (file)
--- a/dhry_1.c
+++ b/dhry_1.c
@@ -614,7 +614,7 @@ extern clock_t      clock();
         float_time /= timerFreq.lo;
 #if defined(DEVICE_KEYSTONE)
         float factor = 8.0; /* correct frequency coming from getFreq */
-#elif defined(SOC_AM572x)
+#elif defined(SOC_AM572x) || defined(SOC_AM574x)
         float factor = 0.3333;
 #else
         float factor = 1;
index 37336e439f12b37fed26928eff5866669ae49aed..4f6a3dbd46bd0089c3a5ea8ef798d6c97be34fa2 100644 (file)
--- a/makefile
+++ b/makefile
@@ -62,6 +62,9 @@ CONFIG = bin/$(SOC)/$(CORE)/$(PROFILE)/configuro
 .PHONY: prune
 
 all:
+#      $(MAKE) PROFILE=debug SOCDEF=SOC_AM574x CORE=armv7 SOC=AM574x dhry.x
+#      $(MAKE) PROFILE=debug SOCDEF=SOC_AM574x CORE=m4    SOC=AM574x dhry.x
+#      $(MAKE) PROFILE=debug SOCDEF=SOC_AM574x CORE=c66   SOC=AM574x dhry.x
 #      $(MAKE) PROFILE=debug SOCDEF=SOC_AM335x CORE=armv7 SOC=AM335x dhry.x
 #      $(MAKE) PROFILE=debug SOCDEF=SOC_AM437x CORE=armv7 SOC=AM437x dhry.x
 #      $(MAKE) PROFILE=debug SOCDEF=SOC_AM572x CORE=armv7 SOC=AM572x dhry.x
@@ -194,6 +197,29 @@ else
                                     TOOLCHAIN_PATH = $(TOOLCHAIN_PATH_A9)
                                     ROV = dhry_pa9fg.rov.xs
                                     endif
+                                else
+                                    ifeq ($(SOC),AM574x)
+                                        ifeq ($(CORE),armv7)
+                                            RTSC_PLAT = idkAM572X
+                                            RTSC_TARG = gnu.targets.arm.A15F
+                                            TOOLCHAIN_PATH = $(TOOLCHAIN_PATH_A15)
+                                            ROV = dhry_pa15fg.rov.xs
+                                        else
+                                            ifeq ($(CORE),c66)
+                                                RTSC_PLAT = idkAM572X
+                                                RTSC_TARG = ti.targets.elf.C66
+                                                TOOLCHAIN_PATH = $(TOOLCHAIN_PATH_C66)
+                                                ROV = dhry_pe66.rov.xs
+                                            else
+                                                ifeq ($(CORE),m4)
+                                                    RTSC_PLAT = idkAM572X
+                                                    RTSC_TARG = ti.targets.arm.elf.M4
+                                                    TOOLCHAIN_PATH = $(TOOLCHAIN_PATH_M4)
+                                                    ROV = dhry_pem4.rov.xs
+                                                endif
+                                            endif
+                                        endif
+                                    endif
                                 endif
                             endif
                         endif