]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/i2c-lld.git/commitdiff
PRSDK-4453 Add SMP enabled support for A53 and A15 core
authorSinthu Raja M <x0257345@ti.com>
Mon, 20 May 2019 06:42:07 +0000 (12:12 +0530)
committerSinthu Raja M <x0257345@ti.com>
Fri, 7 Jun 2019 16:48:18 +0000 (22:18 +0530)
 Update makefile and component makefile to add entry for SMP enabled
 examples for AM65xx A53 core
 Add project text file and config file to add SMP enabled support for
 AM572x A15 core

i2c_component.mk
test/eeprom_read/am572x/armv7/bios/I2C_BasicExample_evmAM572x_SMP_armTestProject.txt [new file with mode: 0644]
test/eeprom_read/am572x/armv7/bios/i2c_arm_evmAM572x.cfg
test/eeprom_read/am65xx/i2cEepromTest_a53.cfg
test/eeprom_read/makefile

index 32f0b29442a20d790ae941ca04230ded43d6d06b..3984109d4fd16d695aa978bd2e2369e6eb0adbd5 100644 (file)
@@ -114,7 +114,7 @@ drvi2c_FIRM_LIST = $(i2c_FIRM_LIST)
 # All the tests mentioned in list are built when test target is called
 # List below all examples for allowed values
 ############################
-i2c_EXAMPLE_LIST = drv_i2c_led_blink_test I2C_Baremetal_Eeprom_TestApp I2C_Eeprom_TestApp drv_i2c_utility
+i2c_EXAMPLE_LIST = drv_i2c_led_blink_test I2C_Baremetal_Eeprom_TestApp I2C_Eeprom_TestApp I2C_Eeprom_SMP_TestApp drv_i2c_utility
 drvi2c_EXAMPLE_LIST = $(i2c_EXAMPLE_LIST)
 
 #
@@ -376,6 +376,26 @@ export I2C_Eeprom_TestApp_BOARDLIST
 I2C_Eeprom_TestApp_$(SOC)_CORELIST = $(i2c_$(SOC)_CORELIST)
 export I2C_Eeprom_TestApp_$(SOC)_CORELIST
 
+# I2C rtos EEPROM test with SMP enabled
+I2C_Eeprom_SMP_TestApp_COMP_LIST = I2C_Eeprom_SMP_TestApp
+I2C_Eeprom_SMP_TestApp_RELPATH = ti/drv/i2c/test/eeprom_read
+I2C_Eeprom_SMP_TestApp_PATH = $(PDK_I2C_COMP_PATH)/test/eeprom_read
+I2C_Eeprom_SMP_TestApp_BOARD_DEPENDENCY = yes
+I2C_Eeprom_SMP_TestApp_CORE_DEPENDENCY = no
+I2C_Eeprom_SMP_TestApp_MAKEFILE = -f makefile SMP=enable
+I2C_Eeprom_TestApp_XDC_CONFIGURO = yes
+export I2C_Eeprom_SMP_TestApp_COMP_LIST
+export I2C_Eeprom_SMP_TestApp_BOARD_DEPENDENCY
+export I2C_Eeprom_SMP_TestApp_CORE_DEPENDENCY
+export I2C_Eeprom_SMP_TestApp_XDC_CONFIGURO
+export I2C_Eeprom_SMP_TestApp_MAKEFILE
+I2C_Eeprom_SMP_TestApp_PKG_LIST = I2C_Eeprom_SMP_TestApp
+I2C_Eeprom_SMP_TestApp_INCLUDE = $(I2C_Eeprom_SMP_TestApp_PATH)
+I2C_Eeprom_SMP_TestApp_BOARDLIST = $(drvi2c_BOARDLIST)
+export I2C_Eeprom_SMP_TestApp_BOARDLIST
+I2C_Eeprom_SMP_TestApp_$(SOC)_CORELIST = mpu1_0
+export I2C_Eeprom_SMP_TestApp_$(SOC)_CORELIST
+
 # I2C Utility
 drv_i2c_utility_COMP_LIST = drv_i2c_utility
 drv_i2c_utility_RELPATH = ti/drv/i2c/example/i2c_utility
diff --git a/test/eeprom_read/am572x/armv7/bios/I2C_BasicExample_evmAM572x_SMP_armTestProject.txt b/test/eeprom_read/am572x/armv7/bios/I2C_BasicExample_evmAM572x_SMP_armTestProject.txt
new file mode 100644 (file)
index 0000000..3d7b4bb
--- /dev/null
@@ -0,0 +1,8 @@
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/i2c/soc/am572x/I2C_soc.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/i2c/test/eeprom_read/src/main_test.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/i2c/test/eeprom_read/src/I2C_log.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/uart/soc/am572x/UART_soc.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/i2c/test/eeprom_read/am572x/armv7/bios/i2c_arm_evmAM572x.cfg"
+-ccs.setCompilerOptions "-c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -mfloat-abi=hard -DSOC_AM572x -DevmAM572x -g -gstrict-dwarf -gdwarf-3 -finstrument-functions -Wall -MMD -MP -I${PDK_INSTALL_PATH}/ti/drv/i2c "  -rtsc.enableRtsc
+-ccs.setLinkerOptions " -lrdimon -lgcc -lm -lnosys -nostartfiles -static -Wl,--gc-sections "
+-rtsc.setConfiguroOptions "--cfgArgs {SMP:\"enable\"}"
index 4723bc842b13ba286afbd5669ae7c3a2f8b08dbb..25d9778da7c8b2e7a7ece7272970deb7f9505c42 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2015-2019 Texas Instruments Incorporated - http://www.ti.com/
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -141,6 +141,21 @@ if (Program.build.target.$name.match(/gnu/)) {
 
 var BIOS = xdc.useModule('ti.sysbios.BIOS');
 
+/*
+ * Enable BIOS SMP mode.
+ */
+var smpCfg;
+if (Program.build.cfgArgs !=  null)
+{
+    smpCfg = Program.build.cfgArgs.SMP;
+    if(smpCfg == 'enable')
+    {
+        xdc.print("Enabling BIOS SMP mode");
+        BIOS.smpEnabled = true;
+        var Cache = xdc.module("ti.sysbios.hal.Cache");
+    }
+}
+
 /*
  * Build a custom SYS/BIOS library from sources.
  */
@@ -200,11 +215,14 @@ Board.Settings.boardName = "evmAM572x";
 
 /* ================ Cache and MMU configuration ================ */
 
-var Cache1  = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
-var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
+if(smpCfg == null || smpCfg == '')
+{
+    /* Enable the cache */
+    var Cache  = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
+    Cache.enableCache = true;
+}
 
-/* Enable the cache */
-Cache1.enableCache = true;
+var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
 
 /* Enable the MMU (Required for L1 data caching) */
 Mmu.enableMMU = true;
index 75267abbdfa3e6b8ba6087b862236f6789ff3d9e..ad69efe32537a338f5e3e01b4c41c2ac1041bae0 100644 (file)
@@ -1,6 +1,6 @@
 
 /* =============================================================================
- *   Copyright (c) Texas Instruments Incorporated 2018
+ *   Copyright (c) Texas Instruments Incorporated 2018-2019
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions
@@ -44,18 +44,29 @@ var Task = xdc.useModule('ti.sysbios.knl.Task');
 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
 
 var BIOS = xdc.useModule('ti.sysbios.BIOS');
+
+/* Enable SMP mode in BIOS if SMP is enabled from makefile */
+var smp = java.lang.System.getenv("SMP")
+if(smp == 'enable')
+{
+    xdc.print("Enabling BIOS SMP mode");
+    BIOS.smpEnabled = true;
+}
+
 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
 var SysMin = xdc.useModule('xdc.runtime.SysMin');
 
 var Cache = xdc.module("ti.sysbios.hal.Cache");
-Cache.CacheProxy = xdc.useModule("ti.sysbios.family.arm.v8a.Cache");
+if(smp == null || smp == '')
+{
+    Cache.CacheProxy = xdc.useModule("ti.sysbios.family.arm.v8a.Cache");
+}
 
 var Mmu = xdc.useModule('ti.sysbios.family.arm.v8a.Mmu');
 Mmu.initFunc = "&InitMmu";
 Mmu.tableArrayLen = 24;
 
-
 BIOS.cpuFreq.lo = 800000000;
 BIOS.cpuFreq.hi = 0;
 
index 5767f32951eee5434fa28d1ac9a3b8919b318c1f..828a5d4d3e177a4e88649a8515273fd55a29b598 100755 (executable)
@@ -15,8 +15,8 @@ CFLAGS_OS_DEFINES = -DUSE_BIOS
 EXTERNAL_INTERFACES = bios xdc
 COMP_LIST_COMMON    = osal_tirtos
 ifeq ($(SOC),$(filter $(SOC), am65xx))
-XDC_CFG_FILE_mpu1_0 = $(PDK_INSTALL_PATH)/ti/build/am65xx/sysbios_a53.cfg
-XDC_CFG_FILE_mcu1_0 = $(PDK_INSTALL_PATH)/ti/build/am65xx/sysbios_r5f.cfg
+XDC_CFG_FILE_mpu1_0 = ./$(SOC)/i2cEepromTest_$(ISA).cfg
+XDC_CFG_FILE_mcu1_0 = ./$(SOC)/i2cEepromTest_r5.cfg
 endif
 ifeq ($(SOC),$(filter $(SOC), j721e))
 XDC_CFG_FILE_mpu1_0 = $(PDK_INSTALL_PATH)/ti/build/j721e/sysbios_a72.cfg
@@ -33,10 +33,17 @@ else
 I2C_OS_TESTPREFIX=_Baremetal
 endif
 
-#Name of the directory created under packages/ti/binary/
-APP_NAME = I2C$(I2C_OS_TESTPREFIX)_Eeprom_TestApp
-# Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
-LOCAL_APP_NAME =  I2C$(I2C_OS_TESTPREFIX)_Eeprom_$(BOARD)_$(CORE)TestApp
+ifeq ($(SMP), enable)
+    #Name of the directory created under packages/ti/binary/
+    APP_NAME = I2C$(I2C_OS_TESTPREFIX)_Eeprom_SMP_TestApp
+    # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
+    LOCAL_APP_NAME =  I2C$(I2C_OS_TESTPREFIX)_Eeprom_$(BOARD)_$(CORE)_SMP_TestApp
+else
+    #Name of the directory created under packages/ti/binary/
+    APP_NAME = I2C$(I2C_OS_TESTPREFIX)_Eeprom_TestApp
+    # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
+    LOCAL_APP_NAME =  I2C$(I2C_OS_TESTPREFIX)_Eeprom_$(BOARD)_$(CORE)TestApp
+endif
 
 SRCDIR = . src
 INCDIR = . src