]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/starterware.git/commitdiff
PRSDK-3385: Enable separate profile for StarterWare RTOS build for Display Example...
authorDasnavis Sabiya <x0265826@ti.com>
Wed, 24 Jan 2018 06:14:11 +0000 (11:44 +0530)
committerDasnavis Sabiya <x0265826@ti.com>
Wed, 24 Jan 2018 07:33:04 +0000 (13:03 +0530)
Added Readme.txt

Signed-off-by: Dasnavis Sabiya <x0265826@ti.com>
examples/dss/raster/Makefile
examples/dss/raster/raster_app_main.c
examples/dss/readme.txt [new file with mode: 0644]

index 5578e60254c747e223b8e92c7626ab451f53e2c8..5c84826ba4ee436081c910491540089f3297490d 100644 (file)
 
 APP_NAME = dss_app_raster
 
-include $(ROOTDIR)/build/makerules/platform.mk
-
 SRCDIR = . ..
 INCDIR = . ..
 
+ifeq ($(RTOS_BUILD), yes)
+.PHONY: all
+all: dsslibs_create dssapp_build
+
+.PHONY: dsslibs_create
+dcanlibs_create:
+       cd  $(PDK_INSTALL_PATH)/ti/starterware/; \
+       $(MAKE) -s libs_clean PLATFORM=$(PLATFORM) PROFILE=release; \
+       $(MAKE) libs PLATFORM=$(PLATFORM)  PROFILE=release RTOS_BUILD=yes; \
+
+.PHONY: dssapp_build
+app_build:
+include $(PDK_INSTALL_PATH)/ti/build/Rules.make
+
+# List all the directories, whose interface header files
+# need to be included for this component
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/examples/dss
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/examples/example_utils
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/device
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/include/hw
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/include/utils
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/include/am43xx
+INCDIR += ${PDK_INSTALL_PATH}/ti/starterware/include
+INCDIR += ${PDK_INSTALL_PATH}
+INCDIR += $(XDC_INSTALL_PATH)/packages/
+INCDIR += $(BIOS_INSTALL_PATH)/packages/
+
+# List all the external components/interfaces, whose interface header files
+# need to be included for this component
+INCLUDE_EXTERNAL_INTERFACES = dal soc board utils device bios xdc pdk
+
+# List all the components required by the application
+COMP_LIST_COMMON = board utils soc dal device bios xdc
+
+# XDC CFG File
+XDC_CFG_FILE_a9host = rtos/am437x_app_dss_evmam437x.cfg
+
+# Common source files and CFLAGS across all platforms and cores
+SRCS_COMMON = dss_app.c raster_app_main.c
+CFLAGS_LOCAL_COMMON += -DRTOS_BUILD
+
+# Include common make files
+include $(ROOTDIR)/ti/build/makerules/common.mk
+
+else
+
+include $(ROOTDIR)/build/makerules/platform.mk
 # List all the external components/interfaces, whose interface header files
 # need to be included for this component
 INCLUDE_EXTERNAL_INTERFACES = example_utils dal soc board utils device
@@ -65,6 +110,7 @@ LNKCMD_FILE = $(ROOTDIR)/examples/$(TOOLCHAIN)/$(SOCFAMILY)_ddr.lds
 
 # Include common make files
 include $(ROOTDIR)/build/makerules/common.mk
+endif
 
 # OBJs and libraries are built by using rule defined in rules_<target>.mk
 # and need not be explicitly specified here
index 03daa140007011ab9067120965c30a941b9a65cf..1fcd3ae58434027ffbd2145c2a678e6c79c865bb 100644 (file)
@@ -50,7 +50,6 @@
 #ifdef RTOS_BUILD
 /* XDCtools Header files */
 #include <xdc/std.h>
-#include <xdc/cfg/global.h>
 #include <xdc/runtime/System.h>
 #include <xdc/runtime/Error.h>
 
@@ -156,7 +155,7 @@ static int32_t DssAppInterruptConfig(uint32_t intrNum);
 #ifndef RTOS_BUILD
 void DssAppIsr(uint32_t intrId, uint32_t cpuId, void* pUserParam);
 #else
-void DssAppIsr(void* pUserParam);
+void DssAppIsr(uintptr_t pUserParam);
 #endif
 
 
@@ -471,7 +470,7 @@ static int32_t DssAppInterruptConfig(uint32_t intrNum)
     Osal_RegisterInterrupt_initParams(&interruptRegParams);
 
     /* Populate the interrupt parameters */
-    interruptRegParams.corepacConfig.arg=&gDss;
+    interruptRegParams.corepacConfig.arg=(uintptr_t) &gDss;
     interruptRegParams.corepacConfig.name=NULL;
     interruptRegParams.corepacConfig.isrRoutine=&DssAppIsr;
     interruptRegParams.corepacConfig.priority = 0x00;
@@ -491,10 +490,10 @@ static int32_t DssAppInterruptConfig(uint32_t intrNum)
 #ifndef RTOS_BUILD
 void DssAppIsr(uint32_t intrId, uint32_t cpuId, void* pUserParam)
 #else
-void DssAppIsr(void* pUserParam)
+void DssAppIsr(uintptr_t pUserParam)
 #endif
 {
-    dssAppObj_t *pObj = pUserParam;
+    dssAppObj_t *pObj = (dssAppObj_t *)&pUserParam;
     uint32_t dssBaseAddr = pObj->dssInstAddr;
     uint32_t intrStatus = 0U;
 
diff --git a/examples/dss/readme.txt b/examples/dss/readme.txt
new file mode 100644 (file)
index 0000000..14f4b2d
--- /dev/null
@@ -0,0 +1,94 @@
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------------------------------------
+ Introduction
+-----------------------------------------------------------------------------------------------------------
+This documents explains the procedure to build and run the Display example in TI RTOS environment. 
+It also provides the steps followed to add TI RTOS support for Display example. Display example 
+is supported on AM437x platform and tested on AM437x GP EVM.
+
+
+-----------------------------------------------------------------------------------------------------------
+ Creating CCS Projects
+-----------------------------------------------------------------------------------------------------------
+Display RTOS example needs to be executed using CCS example projects. However, CCS project files are not
+provided as part of the package. CCS project configuration files are provided using which CCS projects
+need to be created manually.
+Follow below steps to create the CCS projects for Display StarterWare example
+ - Open command prompt, go the PDK root folder (<PDK Install Dir>/packages) and run pdksetupenv script
+ - Run the pdkProjectCreate script with options as shown below
+   pdkProjectCreate.bat <soc> <board> little dss all arm
+   <soc> is AM437x
+   <board> is evmAM437x
+ - Successful execution of above command will create Display Example project under the folder
+   <PDK Install Dir>/packages/MyExampleProjects
+
+
+-----------------------------------------------------------------------------------------------------------
+ Building StarterWare libraries
+-----------------------------------------------------------------------------------------------------------
+Follow below steps to build the StarterWare libraries
+ - Open command prompt, go the PDK root folder (<PDK Install Dir>/packages) and run pdksetupenv script
+ - Clean the StarterWare libraries
+   gmake starterware clean
+ - Build the StarterWare libraries
+   gmake starterware 
+
+-----------------------------------------------------------------------------------------------------------
+ Building DSS Example for RTOS - Using Makefile
+-----------------------------------------------------------------------------------------------------------
+Follow below steps to build the DSS Example for RTOS from Command Line. Ignore the previous section,
+as the command to build DSS example will take care of building the dependent Starterware libraries 
+ - Open command prompt, go the PDK root folder (<PDK Install Dir>/packages) and run pdksetupenv script
+ - Change the directory StarterWare folder
+   cd ti/starterware
+ - Build the dss example
+   gmake dss_app_raster PLATFORM=<platform> BOARD=<board> PROFILE=release RTOS_BUILD=yes
+ - Building the example involves three steps:
+   > Cleaning the StarterWare libraries
+   > Building the libraries with RTOS flag enabled
+   > Building the DSS Example for RTOS
+   <platform> is am43xx-evm for AM437x
+   <board> is evmAM437x for AM437x
+ - Upon successful build, the dss example binary will be created under the folder
+   <PDK Install Dir>/packages/ti/binary/dss_app_raster/bin/<soc>/
+ - The binary can be loaded onto the target device using CCS.
+ - The expected output will be same as described in the next section.
+-----------------------------------------------------------------------------------------------------------
+ Running the Display example
+-----------------------------------------------------------------------------------------------------------
+Follow below steps to build and run the Display example from CCS
+ - Open CCS IDE and import the Display example project using 'Project -> Import CCS Projects' menu
+ - Build the projects using 'Project -> Build Project' menu
+ - Connect the target in CCS and load the Display test binary
+ - Run the program and observe the test output on the LCD screen
+   -- TI Logo shall be displayed on the LCD screen of the AM437x GP EVM
+
+-----------------------------------------------------------------------------------------------------------
+ Procedure to add SYS/BIOS support for Display StarterWare example
+-----------------------------------------------------------------------------------------------------------
+ Configuring Interrupts
+ -----------------------
+StarterWare baremetal examples configure the interrupts using INTC and GIC modules. This need to be 
+updated to use the OSAL APIs to add support for TI RTOS. Interrupt configurations are updated to use 
+OSAL APIs in raster_app_main.c file while adding RTOS support for Display example.
+
+ Using Tasks
+ ------------
+Create the tasks using TI RTOS API Task_create and start the RTOS execution by calling BIOS_start()
+function. The main function in raster_app_main.c (starterware/examples/dss/raster) is updated for creating
+the tasks and invoking the BIOS execution.
+
+ Creating RTOS config file
+ ---------------------------
+The TI RTOS configurations are enabled using a config file (.cfg). TI RTOS config file
+am437x_app_dss_evmam437x.cfg is created under the folder starterware/examples/dss/raster/rtos
+
+ Creating CCS project setup files
+ --------------------------------
+CCS projects files use the project configuration text files and pdkProjectCreate script to create the project. 
+Project configuration text file of Display example DSS_RasterExample_evmAM437x_armTestProject.txt is created 
+under the folder starterware/examples/dss/raster/rtos.
+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file