FVID2 build for mpu1 build
authorSivaraj R <sivaraj@ti.com>
Thu, 1 Nov 2018 12:06:20 +0000 (17:36 +0530)
committerSivaraj R <sivaraj@ti.com>
Thu, 1 Nov 2018 12:06:20 +0000 (17:36 +0530)
- Fixed pointer manipulation errors
- Fixed component.mk file to do all cores and SOC

Signed-off-by: Sivaraj R <sivaraj@ti.com>
fvid2_component.mk
include/fvid2_utils.h
include/trace.h
makefile
src/trace.c

index 68e45220b7c79e583aecf0d869b34dffb988dbc6..1173b1b8e92dab1f89e7312943f90849b97094d2 100755 (executable)
@@ -34,9 +34,9 @@
 #
 ifeq ($(fvid2_component_make_include), )
 
-fvid2_default_SOCLIST           = j7 am65xx
-fvid2_default_j7_CORELIST       = mcu1_0 mcu1_1
-fvid2_default_am65xx_CORELIST    = mcu1_0 mcu1_1 mpu1_0
+drvfvid2_SOCLIST           = j7 am65xx
+drvfvid2_j7_CORELIST       = mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 c66xdsp_1 c66xdsp_2 c7x c7x-hostemu
+drvfvid2_am65xx_CORELIST   = mcu1_0 mcu1_1 mpu1_0
 
 ############################
 # fvid2 package
@@ -74,9 +74,9 @@ export fvid2_BOARD_DEPENDENCY
 export fvid2_CORE_DEPENDENCY
 fvid2_PKG_LIST = fvid2
 fvid2_INCLUDE = $(fvid2_PATH)
-fvid2_SOCLIST = $(fvid2_default_SOCLIST)
+fvid2_SOCLIST = $(drvfvid2_SOCLIST)
 export fvid2_SOCLIST
-fvid2_$(SOC)_CORELIST = $(fvid2_default_$(SOC)_CORELIST)
+fvid2_$(SOC)_CORELIST = $(drvfvid2_$(SOC)_CORELIST)
 export fvid2_$(SOC)_CORELIST
 
 #
@@ -85,6 +85,8 @@ export fvid2_$(SOC)_CORELIST
 
 export fvid2_LIB_LIST
 export fvid2_EXAMPLE_LIST
+export drvfvid2_LIB_LIST = $(fvid2_LIB_LIST)
+export drvfvid2_EXAMPLE_LIST = $(fvid2_EXAMPLE_LIST)
 
 FVID2_CFLAGS =
 
index 5b7c33cc7962a6cfe83440dc29ce2d7c76541f9c..021cda1f5cffdddbb0d064b0ac5a2862312fdc72 100755 (executable)
@@ -722,7 +722,7 @@ static inline void *Fvid2Utils_alloc(Fvid2Utils_PoolParams *params,
 {
     uint32_t cnt;
     uintptr_t cookie;
-    uint32_t tempVal;
+    uintptr_t tempVal;
     void  *allocMem = NULL;
 
     /* NULL pointer check */
@@ -738,7 +738,7 @@ static inline void *Fvid2Utils_alloc(Fvid2Utils_PoolParams *params,
     {
         if ((uint32_t) FALSE == params->flag[cnt])
         {
-            tempVal = ((uint32_t) params->mem) + (params->elemSize * cnt);
+            tempVal = ((uintptr_t) params->mem) + (params->elemSize * cnt);
             allocMem          = (void *) (tempVal);
             params->flag[cnt] = (uint32_t) TRUE;
 
@@ -761,7 +761,7 @@ static inline int32_t Fvid2Utils_free(Fvid2Utils_PoolParams *params,
                                       uint32_t               traceMask)
 {
     uint32_t cnt;
-    uint32_t tempVal;
+    uintptr_t tempVal;
     int32_t  retVal = FVID2_EFAIL;
     uintptr_t cookie;
 
@@ -774,7 +774,7 @@ static inline int32_t Fvid2Utils_free(Fvid2Utils_PoolParams *params,
 
     for (cnt = 0U; cnt < params->numElem; cnt++)
     {
-        tempVal = ((uint32_t) params->mem) + (params->elemSize * cnt);
+        tempVal = ((uintptr_t) params->mem) + (params->elemSize * cnt);
         if ((void *) (tempVal) == mem)
         {
             /* Check if the memory is already allocated */
index ec3c77d57ff15fd993b70acc1a2c8426b2293abd..3d2da447729db9d418099d3424d3f0a68b898f69 100755 (executable)
@@ -173,7 +173,7 @@ void GT_trace1(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0);
+               uintptr_t     param0);
 
 /**
  *  \brief Function to log the trace with two additional parameters.
@@ -192,8 +192,8 @@ void GT_trace2(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1);
+               uintptr_t     param0,
+               uintptr_t     param1);
 
 /**
  *  \brief Function to log the trace with three additional parameters.
@@ -213,9 +213,9 @@ void GT_trace3(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1,
-               uint32_t      param2);
+               uintptr_t     param0,
+               uintptr_t     param1,
+               uintptr_t     param2);
 
 /**
  *  \brief Function to log the trace with four additional parameters.
@@ -236,10 +236,10 @@ void GT_trace4(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1,
-               uint32_t      param2,
-               uint32_t      param3);
+               uintptr_t     param0,
+               uintptr_t     param1,
+               uintptr_t     param2,
+               uintptr_t     param3);
 
 /**
  *  \brief Function to log the trace with five additional parameters.
@@ -261,11 +261,11 @@ void GT_trace5(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1,
-               uint32_t      param2,
-               uint32_t      param3,
-               uint32_t      param4);
+               uintptr_t     param0,
+               uintptr_t     param1,
+               uintptr_t     param2,
+               uintptr_t     param3,
+               uintptr_t     param4);
 
 /**
  *  \brief Function to log the trace with six additional parameters.
@@ -288,12 +288,12 @@ void GT_trace6(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1,
-               uint32_t      param2,
-               uint32_t      param3,
-               uint32_t      param4,
-               uint32_t      param5);
+               uintptr_t     param0,
+               uintptr_t     param1,
+               uintptr_t     param2,
+               uintptr_t     param3,
+               uintptr_t     param4,
+               uintptr_t     param5);
 
 /**
  *  \brief Function to log the trace with seven additional parameters.
@@ -317,91 +317,91 @@ void GT_trace7(uint32_t      maskType,
                const char   *fileName,
                int32_t       lineNum,
                const char   *infoString,
-               uint32_t      param0,
-               uint32_t      param1,
-               uint32_t      param2,
-               uint32_t      param3,
-               uint32_t      param4,
-               uint32_t      param5,
-               uint32_t      param6);
+               uintptr_t     param0,
+               uintptr_t     param1,
+               uintptr_t     param2,
+               uintptr_t     param3,
+               uintptr_t     param4,
+               uintptr_t     param5,
+               uintptr_t     param6);
 
 #if defined (FVID2_CFG_TRACE_ENABLE)
 /** \brief Log the trace with zero parameters and information string. */
-#define GT_0trace(maskType, classType, infoString)        \
-    (GT_trace0((maskType), (classType),                   \
-               (const char *) __FILE__, (int32_t) __LINE__, \
+#define GT_0trace(maskType, classType, infoString)                          \
+    (GT_trace0((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
                (const char *) (infoString)))
 
 /** \brief Function to log the trace with one additional parameters. */
-#define GT_1trace(maskType, classType, infoString, param0) \
-    (GT_trace1((maskType), (classType),                    \
-               (const char *) __FILE__, (int32_t) __LINE__,  \
-               (const char *) (infoString), (uint32_t) (param0)))
+#define GT_1trace(maskType, classType, infoString, param0)                  \
+    (GT_trace1((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString), (uintptr_t) (param0)))
 
 /** \brief Function to log the trace with two additional parameters. */
-#define GT_2trace(maskType, classType, infoString, param0, param1) \
-    (GT_trace2((maskType), (classType),                            \
-               (const char *) __FILE__, (int32_t) __LINE__,          \
-               (const char *) (infoString), (uint32_t) (param0), (uint32_t) (param1)))
+#define GT_2trace(maskType, classType, infoString, param0, param1)          \
+    (GT_trace2((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString), (uintptr_t) (param0), (uintptr_t) (param1)))
 
 /** \brief Function to log the trace with three additional parameters. */
-#define GT_3trace(maskType, classType, infoString, param0, param1, param2) \
-    (GT_trace3((maskType), (classType),                                    \
-               (const char *) __FILE__, (int32_t) __LINE__,                  \
-               (const char *) (infoString),                                \
-               (uint32_t) (param0),                                          \
-               (uint32_t) (param1),                                          \
-               (uint32_t) (param2)))
+#define GT_3trace(maskType, classType, infoString, param0, param1, param2)  \
+    (GT_trace3((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString),                                 \
+               (uintptr_t) (param0),                                        \
+               (uintptr_t) (param1),                                        \
+               (uintptr_t) (param2)))
 
 /** \brief Function to log the trace with four additional parameters. */
-#define GT_4trace(maskType, classType, infoString,        \
-                  param0, param1, param2, param3)         \
-    (GT_trace4((maskType), (classType),                   \
-               (const char *) __FILE__, (int32_t) __LINE__, \
-               (const char *) (infoString),               \
-               (uint32_t) (param0),                         \
-               (uint32_t) (param1),                         \
-               (uint32_t) (param2),                         \
-               (uint32_t) (param3)))
+#define GT_4trace(maskType, classType, infoString,                          \
+                  param0, param1, param2, param3)                           \
+    (GT_trace4((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString),                                 \
+               (uintptr_t) (param0),                                        \
+               (uintptr_t) (param1),                                        \
+               (uintptr_t) (param2),                                        \
+               (uintptr_t) (param3)))
 
 /** \brief Function to log the trace with five additional parameters. */
-#define GT_5trace(maskType, classType, infoString,        \
-                  param0, param1, param2, param3, param4) \
-    (GT_trace5((maskType), (classType),                   \
-               (const char *) __FILE__, (int32_t) __LINE__, \
-               (const char *) (infoString),               \
-               (uint32_t) (param0),                         \
-               (uint32_t) (param1),                         \
-               (uint32_t) (param2),                         \
-               (uint32_t) (param3),                         \
-               (uint32_t) (param4)))
+#define GT_5trace(maskType, classType, infoString,                          \
+                  param0, param1, param2, param3, param4)                   \
+    (GT_trace5((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString),                                 \
+               (uintptr_t) (param0),                                        \
+               (uintptr_t) (param1),                                        \
+               (uintptr_t) (param2),                                        \
+               (uintptr_t) (param3),                                        \
+               (uintptr_t) (param4)))
 
 /** \brief Function to log the trace with six additional parameters. */
-#define GT_6trace(maskType, classType, infoString,                \
-                  param0, param1, param2, param3, param4, param5) \
-    (GT_trace6((maskType), (classType),                           \
-               (const char *) __FILE__, (int32_t) __LINE__,         \
-               (const char *) (infoString),                       \
-               (uint32_t) (param0),                                 \
-               (uint32_t) (param1),                                 \
-               (uint32_t) (param2),                                 \
-               (uint32_t) (param3),                                 \
-               (uint32_t) (param4),                                 \
-               (uint32_t) (param5)))
+#define GT_6trace(maskType, classType, infoString,                          \
+                  param0, param1, param2, param3, param4, param5)           \
+    (GT_trace6((maskType), (classType),                                     \
+               (const char *) __FILE__, (int32_t) __LINE__,                 \
+               (const char *) (infoString),                                 \
+               (uintptr_t) (param0),                                        \
+               (uintptr_t) (param1),                                        \
+               (uintptr_t) (param2),                                        \
+               (uintptr_t) (param3),                                        \
+               (uintptr_t) (param4),                                        \
+               (uintptr_t) (param5)))
 
 /** \brief Function to log the trace with seven additional parameters. */
-#define GT_7trace(maskType, classType, infoString,                        \
-                  param0, param1, param2, param3, param4, param5, param6) \
-    (GT_trace7((maskType), (classType),                                   \
+#define GT_7trace(maskType, classType, infoString,                          \
+                  param0, param1, param2, param3, param4, param5, param6)   \
+    (GT_trace7((maskType), (classType),                                     \
                (const char *) __FILE__, (int32_t) __LINE__,                 \
-               (const char *) (infoString),                               \
-               (uint32_t) (param0),                                         \
-               (uint32_t) (param1),                                         \
-               (uint32_t) (param2),                                         \
-               (uint32_t) (param3),                                         \
-               (uint32_t) (param4),                                         \
-               (uint32_t) (param5),                                         \
-               (uint32_t) (param6)))
+               (const char *) (infoString),                                 \
+               (uintptr_t) (param0),                                        \
+               (uintptr_t) (param1),                                        \
+               (uintptr_t) (param2),                                        \
+               (uintptr_t) (param3),                                        \
+               (uintptr_t) (param4),                                        \
+               (uintptr_t) (param5),                                        \
+               (uintptr_t) (param6)))
 
 #else   /* if defined (FVID2_CFG_TRACE_ENABLE) */
 
index cb48055f95f15dfe259fd9818a8b2c72079bfbf5..ceb49cdce2c93996dd7c4dbe3f0b49b1d140d45f 100644 (file)
--- a/makefile
+++ b/makefile
 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+ifeq ($(RULES_MAKE), )
 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
+else
+include $(RULES_MAKE)
+endif
 
-COMP = fvid2
+COMP = drvfvid2
 
 lib_$(COMP)_BUILD_DEPENDENCY = soc
 
index 9097882c154d017892c0de317b0578dcb45fb299..7a98adf65af0ad2ca95cc57f8607fb74be724f3c 100644 (file)
@@ -134,7 +134,7 @@ GT_trace1(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0)
+          uintptr_t     param0)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -173,8 +173,8 @@ GT_trace2(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1)
+          uintptr_t     param0,
+          uintptr_t     param1)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -214,9 +214,9 @@ GT_trace3(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1,
-          uint32_t      param2)
+          uintptr_t     param0,
+          uintptr_t     param1,
+          uintptr_t     param2)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -257,10 +257,10 @@ GT_trace4(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1,
-          uint32_t      param2,
-          uint32_t      param3)
+          uintptr_t     param0,
+          uintptr_t     param1,
+          uintptr_t     param2,
+          uintptr_t     param3)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -303,11 +303,11 @@ GT_trace5(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1,
-          uint32_t      param2,
-          uint32_t      param3,
-          uint32_t      param4)
+          uintptr_t     param0,
+          uintptr_t     param1,
+          uintptr_t     param2,
+          uintptr_t     param3,
+          uintptr_t     param4)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -352,12 +352,12 @@ GT_trace6(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1,
-          uint32_t      param2,
-          uint32_t      param3,
-          uint32_t      param4,
-          uint32_t      param5)
+          uintptr_t     param0,
+          uintptr_t     param1,
+          uintptr_t     param2,
+          uintptr_t     param3,
+          uintptr_t     param4,
+          uintptr_t     param5)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)
@@ -403,13 +403,13 @@ GT_trace7(uint32_t      maskType,
           const char   *fileName,
           int32_t       lineNum,
           const char   *infoString,
-          uint32_t      param0,
-          uint32_t      param1,
-          uint32_t      param2,
-          uint32_t      param3,
-          uint32_t      param4,
-          uint32_t      param5,
-          uint32_t      param6)
+          uintptr_t     param0,
+          uintptr_t     param1,
+          uintptr_t     param2,
+          uintptr_t     param3,
+          uintptr_t     param4,
+          uintptr_t     param5,
+          uintptr_t     param6)
 {
     /* Check if trace is enabled. */
     if (((maskType & GT_TRACESTATE_MASK) >> GT_TRACESTATE_SHIFT)