summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSivaraj R2018-09-27 23:25:54 -0500
committerSivaraj R2018-09-27 23:25:54 -0500
commit0d70f61e0b5d46e3e7bf9a8762f0d4cf928f3390 (patch)
treef4c91a6a447ba1fe9724965dd51ed55ec3989c91
parent844a5cbf3636f21c68f50d4b9a52a06883e9d3d6 (diff)
downloadcal-lld-0d70f61e0b5d46e3e7bf9a8762f0d4cf928f3390.tar.gz
cal-lld-0d70f61e0b5d46e3e7bf9a8762f0d4cf928f3390.tar.xz
cal-lld-0d70f61e0b5d46e3e7bf9a8762f0d4cf928f3390.zip
Added CAL utils for sesor config
Signed-off-by: Sivaraj R <sivaraj@ti.com>
-rw-r--r--cal_component.mk44
-rw-r--r--examples/cal_capture_test/makefile.mk13
-rw-r--r--examples/cal_capture_test/src/CaptureCal_main.c21
-rw-r--r--examples/cal_capture_test/src/CaptureCal_main.h6
-rw-r--r--examples/utils/calutils.h (renamed from examples/cal_capture_test/src/calutils_mem.h)27
-rw-r--r--examples/utils/makefile47
-rw-r--r--examples/utils/makefile_baremetal48
-rw-r--r--examples/utils/src/V0/calapp_sensor.c (renamed from examples/cal_capture_test/src/am65xx/calapp_sensor.c)20
-rw-r--r--examples/utils/src/V0/calutils_ub95x.c (renamed from examples/cal_capture_test/src/am65xx/calutils_ub95x.c)0
-rw-r--r--examples/utils/src/V0/calutils_ub95x.h (renamed from examples/cal_capture_test/src/am65xx/calutils_ub95x.h)0
-rw-r--r--examples/utils/src/V0/calutils_ub964_sat88_ov1063x.c (renamed from examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.c)0
-rw-r--r--examples/utils/src/V0/calutils_ub964_sat88_ov1063x.h (renamed from examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.h)0
-rw-r--r--examples/utils/src/V0/calutils_ub964_sat88_ov1063x_reg.c (renamed from examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x_reg.c)0
-rw-r--r--examples/utils/src/V0/linker_cal_a53.lds (renamed from examples/cal_capture_test/src/am65xx/linker_cal_a53.lds)4
-rw-r--r--examples/utils/src/calutils_mem.c (renamed from examples/cal_capture_test/src/calutils_mem.c)21
15 files changed, 199 insertions, 52 deletions
diff --git a/cal_component.mk b/cal_component.mk
index ff03b64..d06b942 100644
--- a/cal_component.mk
+++ b/cal_component.mk
@@ -79,6 +79,50 @@ export cal_SOCLIST
79cal_$(SOC)_CORELIST = $(drvcal_$(SOC)_CORELIST) 79cal_$(SOC)_CORELIST = $(drvcal_$(SOC)_CORELIST)
80export cal_$(SOC)_CORELIST 80export cal_$(SOC)_CORELIST
81 81
82cal_app_utils_COMP_LIST = cal_app_utils
83cal_app_utils_RELPATH = ti/drv/cal/examples/utils
84cal_app_utils_PATH = $(PDK_CAL_COMP_PATH)/examples/utils
85cal_app_utils_LIBNAME = cal_app_utils
86cal_app_utils_LIBPATH = $(PDK_CAL_COMP_PATH)/lib
87cal_app_utils_MAKEFILE = -fmakefile
88export cal_app_utils_LIBNAME
89export cal_app_utils_LIBPATH
90export cal_app_utils_MAKEFILE
91cal_app_utils_BOARD_DEPENDENCY = yes
92cal_app_utils_CORE_DEPENDENCY = yes
93export cal_app_utils_COMP_LIST
94export cal_app_utils_BOARD_DEPENDENCY
95export cal_app_utils_CORE_DEPENDENCY
96cal_app_utils_PKG_LIST = cal_app_utils
97cal_app_utils_INCLUDE = $(cal_app_utils_PATH)
98cal_app_utils_SOCLIST = $(drvcal_SOCLIST)
99export cal_app_utils_SOCLIST
100cal_app_utils_$(SOC)_CORELIST = $(drvcal_$(SOC)_CORELIST)
101export cal_app_utils_$(SOC)_CORELIST
102cal_LIB_LIST += cal_app_utils
103
104cal_app_utils_baremetal_COMP_LIST = cal_app_utils_baremetal
105cal_app_utils_baremetal_RELPATH = ti/drv/cal/examples/utils
106cal_app_utils_baremetal_PATH = $(PDK_CAL_COMP_PATH)/examples/utils
107cal_app_utils_baremetal_LIBNAME = cal_app_utils_baremetal
108cal_app_utils_baremetal_LIBPATH = $(PDK_CAL_COMP_PATH)/lib
109cal_app_utils_baremetal_MAKEFILE = -fmakefile_baremetal
110export cal_app_utils_baremetal_LIBNAME
111export cal_app_utils_baremetal_LIBPATH
112export cal_app_utils_baremetal_MAKEFILE
113cal_app_utils_baremetal_BOARD_DEPENDENCY = yes
114cal_app_utils_baremetal_CORE_DEPENDENCY = yes
115export cal_app_utils_baremetal_COMP_LIST
116export cal_app_utils_baremetal_BOARD_DEPENDENCY
117export cal_app_utils_baremetal_CORE_DEPENDENCY
118cal_app_utils_baremetal_PKG_LIST = cal_app_utils_baremetal
119cal_app_utils_baremetal_INCLUDE = $(cal_app_utils_baremetal_PATH)
120cal_app_utils_baremetal_SOCLIST = $(drvcal_SOCLIST)
121export cal_app_utils_baremetal_SOCLIST
122cal_app_utils_baremetal_$(SOC)_CORELIST = $(drvcal_$(SOC)_CORELIST)
123export cal_app_utils_baremetal_$(SOC)_CORELIST
124cal_LIB_LIST += cal_app_utils_baremetal
125
82# 126#
83# CAL Examples 127# CAL Examples
84# 128#
diff --git a/examples/cal_capture_test/makefile.mk b/examples/cal_capture_test/makefile.mk
index 2d4a8a8..032a3fe 100644
--- a/examples/cal_capture_test/makefile.mk
+++ b/examples/cal_capture_test/makefile.mk
@@ -1,8 +1,8 @@
1# 1#
2# This file is the makefile for building CAL capture example application. 2# This file is the makefile for building CAL capture example application.
3# 3#
4SRCDIR = src src/$(SOC) 4SRCDIR = src
5INCDIR = . src src/$(SOC) 5INCDIR = . src
6 6
7# List all the external components/interfaces, whose interface header files 7# List all the external components/interfaces, whose interface header files
8# need to be included for this component 8# need to be included for this component
@@ -14,7 +14,7 @@ COMP_LIST_COMMON = csl fvid2 cal board uart i2c
14CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CAL_CFLAGS) 14CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CAL_CFLAGS)
15 15
16ifeq ($(BUILD_OS_TYPE), baremetal) 16ifeq ($(BUILD_OS_TYPE), baremetal)
17 COMP_LIST_COMMON += csl_init osal_nonos 17 COMP_LIST_COMMON += csl_init osal_nonos cal_app_utils_baremetal
18 SRCS_COMMON = main_baremetal.c 18 SRCS_COMMON = main_baremetal.c
19 ifeq ($(ISA),$(filter $(ISA), a53)) 19 ifeq ($(ISA),$(filter $(ISA), a53))
20 LNKFLAGS_LOCAL_$(CORE) += --entry Entry 20 LNKFLAGS_LOCAL_$(CORE) += --entry Entry
@@ -22,23 +22,20 @@ ifeq ($(BUILD_OS_TYPE), baremetal)
22 CFLAGS_LOCAL_COMMON += -DBARE_METAL 22 CFLAGS_LOCAL_COMMON += -DBARE_METAL
23else 23else
24 INCLUDE_EXTERNAL_INTERFACES += xdc bios 24 INCLUDE_EXTERNAL_INTERFACES += xdc bios
25 COMP_LIST_COMMON += osal_tirtos 25 COMP_LIST_COMMON += osal_tirtos cal_app_utils
26 SRCS_COMMON = main_tirtos.c 26 SRCS_COMMON = main_tirtos.c
27 # Enable XDC build for application by providing XDC CFG File per core 27 # Enable XDC build for application by providing XDC CFG File per core
28 XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/sysbios_$(ISA).cfg 28 XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/sysbios_$(ISA).cfg
29endif 29endif
30 30
31ifeq ($(CORE),$(filter $(CORE), mpu1_0 mpu1_1)) 31ifeq ($(CORE),$(filter $(CORE), mpu1_0 mpu1_1))
32EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_CAL_COMP_PATH)/examples/cal_capture_test/src/am65xx/linker_cal_a53.lds 32EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_CAL_COMP_PATH)/examples/utils/src/V0/linker_cal_a53.lds
33endif 33endif
34 34
35PACKAGE_SRCS_COMMON = . 35PACKAGE_SRCS_COMMON = .
36 36
37# Common source files and CFLAGS across all platforms and cores 37# Common source files and CFLAGS across all platforms and cores
38SRCS_COMMON += CaptureCal_main.c 38SRCS_COMMON += CaptureCal_main.c
39SRCS_COMMON += calutils_mem.c
40SRCS_COMMON += calapp_sensor.c calutils_ub95x.c
41SRCS_COMMON += calutils_ub964_sat88_ov1063x.c calutils_ub964_sat88_ov1063x_reg.c
42 39
43# Core/SoC/platform specific source files and CFLAGS 40# Core/SoC/platform specific source files and CFLAGS
44# Example: 41# Example:
diff --git a/examples/cal_capture_test/src/CaptureCal_main.c b/examples/cal_capture_test/src/CaptureCal_main.c
index f9786ac..a416827 100644
--- a/examples/cal_capture_test/src/CaptureCal_main.c
+++ b/examples/cal_capture_test/src/CaptureCal_main.c
@@ -45,6 +45,7 @@
45/* ========================================================================== */ 45/* ========================================================================== */
46 46
47#include <CaptureCal_main.h> 47#include <CaptureCal_main.h>
48#include <ti/board/board.h>
48 49
49/* ========================================================================== */ 50/* ========================================================================== */
50/* Macros & Typedefs */ 51/* Macros & Typedefs */
@@ -53,7 +54,6 @@
53/**< CSI2 PHY Clock Custom sensor. */ 54/**< CSI2 PHY Clock Custom sensor. */
54#define APP_CAPT_CAL_SENSOR_BYPASS_PHY_CLK_MHz (400U) 55#define APP_CAPT_CAL_SENSOR_BYPASS_PHY_CLK_MHz (400U)
55 56
56/* TODO: Update the height to full frame once the buffers are moved to DDR. */
57#define APP_CAPT_MAX_WIDTH (1280U) 57#define APP_CAPT_MAX_WIDTH (1280U)
58#define APP_CAPT_MAX_HEIGHT (720U) 58#define APP_CAPT_MAX_HEIGHT (720U)
59 59
@@ -87,6 +87,8 @@ static int32_t appCaptEnableErrorReporting(appCaptObj_t *appObj);
87static int32_t appCaptEnableFrameEventNotification(appCaptObj_t *appObj, 87static int32_t appCaptEnableFrameEventNotification(appCaptObj_t *appObj,
88 appCaptCfg_t *pCfg); 88 appCaptCfg_t *pCfg);
89static void appCaptChkFrameEvents(appCaptObj_t *appObj); 89static void appCaptChkFrameEvents(appCaptObj_t *appObj);
90static int32_t appBoardInit(void);
91
90/* ========================================================================== */ 92/* ========================================================================== */
91/* Global Variables */ 93/* Global Variables */
92/* ========================================================================== */ 94/* ========================================================================== */
@@ -131,7 +133,7 @@ void Cal_captureTest(void)
131 appCaptObj_t *appObj = &gCaptAppObj; 133 appCaptObj_t *appObj = &gCaptAppObj;
132 uint32_t testId; 134 uint32_t testId;
133 135
134 memset(&gCaptAppObj, 0x0, sizeof (appCaptObj_t)); 136 memset(&gCaptAppObj, 0x0, sizeof (appCaptObj_t));
135 GT_0trace(CalTrace, GT_INFO, 137 GT_0trace(CalTrace, GT_INFO,
136 APP_NAME ": Sample Application - STARTS !!!\r\n"); 138 APP_NAME ": Sample Application - STARTS !!!\r\n");
137 appCaptInit(appObj); 139 appCaptInit(appObj);
@@ -263,7 +265,7 @@ static void appCapture4GivenConfig(appCaptObj_t *appObj, appCaptCfg_t *pCfg)
263 return; 265 return;
264 } 266 }
265 267
266 appSensorConfigInit(pCfg->sensorDriverId); 268 CalUtils_sensorConfigInit(pCfg->sensorDriverId);
267 269
268 appObj->rcvedFramesCount = 0x0; 270 appObj->rcvedFramesCount = 0x0;
269 appObj->frameWithCrcErrorCnt = 0x0; 271 appObj->frameWithCrcErrorCnt = 0x0;
@@ -330,7 +332,7 @@ static void appCapture4GivenConfig(appCaptObj_t *appObj, appCaptCfg_t *pCfg)
330 { 332 {
331 return; 333 return;
332 } 334 }
333 appSensorConfigDeInit(pCfg->sensorDriverId); 335 CalUtils_sensorConfigDeInit(pCfg->sensorDriverId);
334 336
335 return; 337 return;
336} 338}
@@ -1258,3 +1260,14 @@ static void appCaptChkFrameEvents(appCaptObj_t *appObj)
1258 1260
1259} 1261}
1260 1262
1263static int32_t appBoardInit(void)
1264{
1265 Board_initCfg boardCfg;
1266
1267 boardCfg = BOARD_INIT_PINMUX_CONFIG |
1268 BOARD_INIT_UNLOCK_MMR |
1269 BOARD_INIT_UART_STDIO;
1270 Board_init(boardCfg);
1271
1272 return FVID2_SOK;
1273}
diff --git a/examples/cal_capture_test/src/CaptureCal_main.h b/examples/cal_capture_test/src/CaptureCal_main.h
index bf8827e..e1d5903 100644
--- a/examples/cal_capture_test/src/CaptureCal_main.h
+++ b/examples/cal_capture_test/src/CaptureCal_main.h
@@ -59,7 +59,7 @@
59#include <ti/drv/fvid2/fvid2.h> 59#include <ti/drv/fvid2/fvid2.h>
60#include <ti/drv/cal/cal.h> 60#include <ti/drv/cal/cal.h>
61 61
62#include <calutils_mem.h> 62#include <ti/drv/cal/examples/utils/calutils.h>
63 63
64#ifdef __cplusplus 64#ifdef __cplusplus
65extern "C" { 65extern "C" {
@@ -237,9 +237,7 @@ typedef struct appCaptObj
237/* Function Declarations */ 237/* Function Declarations */
238/* ========================================================================== */ 238/* ========================================================================== */
239 239
240void appSensorConfigInit(uint32_t sensorDriverId); 240/* None */
241void appSensorConfigDeInit(uint32_t sensorDriverId);
242int32_t appBoardInit(void);
243 241
244#ifdef __cplusplus 242#ifdef __cplusplus
245} 243}
diff --git a/examples/cal_capture_test/src/calutils_mem.h b/examples/utils/calutils.h
index bed6254..70d39d7 100644
--- a/examples/cal_capture_test/src/calutils_mem.h
+++ b/examples/utils/calutils.h
@@ -44,20 +44,12 @@
44 * \brief Frame buffer memory allocator API. 44 * \brief Frame buffer memory allocator API.
45 */ 45 */
46 46
47#ifndef CALUTILS_MEM_H_ 47#ifndef CALUTILS_H_
48#define CALUTILS_MEM_H_ 48#define CALUTILS_H_
49 49
50/* ========================================================================== */ 50/* ========================================================================== */
51/* Include Files */ 51/* Include Files */
52/* ========================================================================== */ 52/* ========================================================================== */
53#if defined(BARE_METAL)
54/** \brief Typedef for Heap memory handle */
55typedef void* HeapMem_Handle;
56#endif
57
58#if !defined (BARE_METAL)
59#include <ti/sysbios/BIOS.h>
60#endif
61 53
62#include <ti/drv/fvid2/fvid2.h> 54#include <ti/drv/fvid2/fvid2.h>
63 55
@@ -84,6 +76,12 @@ extern "C" {
84/** \brief Log enable for CAL Utils modules. */ 76/** \brief Log enable for CAL Utils modules. */
85#define CalUtilsTrace (GT_INFO | GT_TraceState_Enable) 77#define CalUtilsTrace (GT_INFO | GT_TraceState_Enable)
86 78
79#define FVID2_VID_SENSOR_MULDES_OV1063X_DRV (0x1001U)
80/** \brief Multi Deserializer OV1063X video sensor driver ID. */
81
82#define FVID2_VID_SENSOR_BYPASS_CSI2_DRV (0x1002U)
83/** \brief By Pass sensor configurations */
84
87/* ========================================================================== */ 85/* ========================================================================== */
88/* Structure Declarations */ 86/* Structure Declarations */
89/* ========================================================================== */ 87/* ========================================================================== */
@@ -197,7 +195,7 @@ int32_t CalUtils_memFrameGetSize(const Fvid2_Format *pFormat,
197 * 195 *
198 * \return NULL or error, else memory pointer 196 * \return NULL or error, else memory pointer
199 */ 197 */
200Ptr CalUtils_memAlloc(uint32_t size, uint32_t align); 198void * CalUtils_memAlloc(uint32_t size, uint32_t align);
201 199
202/** 200/**
203 * \brief Free previously allocate memory pointer 201 * \brief Free previously allocate memory pointer
@@ -207,7 +205,7 @@ Ptr CalUtils_memAlloc(uint32_t size, uint32_t align);
207 * 205 *
208 * \return 0 on sucess, else failure 206 * \return 0 on sucess, else failure
209 */ 207 */
210int32_t CalUtils_memFree(Ptr addr, uint32_t size); 208int32_t CalUtils_memFree(void *addr, uint32_t size);
211 209
212/** 210/**
213 * \brief Control if allocated buffer needs to be cleared to 0 211 * \brief Control if allocated buffer needs to be cleared to 0
@@ -280,10 +278,13 @@ static inline uint32_t CalUtils_align(uint32_t val, uint32_t align)
280 return (CalUtils_floor((uint32_t) (val + (align - 1U)), align)); 278 return (CalUtils_floor((uint32_t) (val + (align - 1U)), align));
281} 279}
282 280
281void CalUtils_sensorConfigInit(uint32_t sensorDriverId);
282void CalUtils_sensorConfigDeInit(uint32_t sensorDriverId);
283
283#ifdef __cplusplus 284#ifdef __cplusplus
284} 285}
285#endif 286#endif
286 287
287#endif /* #define CALUTILS_MEM_H_ */ 288#endif /* #define CALUTILS_H_ */
288 289
289/* @} */ 290/* @} */
diff --git a/examples/utils/makefile b/examples/utils/makefile
new file mode 100644
index 0000000..6788be9
--- /dev/null
+++ b/examples/utils/makefile
@@ -0,0 +1,47 @@
1#
2# This file is the makefile for building CAL app utils library.
3#
4ifeq ($(RULES_MAKE), )
5include $(PDK_INSTALL_PATH)/ti/build/Rules.make
6else
7include $(RULES_MAKE)
8endif
9
10MODULE_NAME = cal_app_utils
11
12SRCDIR = . src src/V0
13INCDIR = . src src/V0
14
15# List all the external components/interfaces, whose interface header files
16# need to be included for this component
17INCLUDE_EXTERNAL_INTERFACES = pdk
18INCLUDE_EXTERNAL_INTERFACES += xdc bios
19INCLUDE_INTERNAL_INTERFACES = csl
20
21# Common source files and CFLAGS across all platforms and cores
22SRCS_COMMON = calutils_mem.c
23ifeq ($(BOARD),$(filter $(BOARD), am65xx_evm))
24SRCS_COMMON += calapp_sensor.c calutils_ub95x.c
25SRCS_COMMON += calutils_ub964_sat88_ov1063x.c calutils_ub964_sat88_ov1063x_reg.c
26endif
27
28PACKAGE_SRCS_COMMON = .
29CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CAL_CFLAGS)
30
31# Core/SoC/platform specific source files and CFLAGS
32# Example:
33# SRCS_<core/SoC/platform-name> =
34# CFLAGS_LOCAL_<core/SoC/platform-name> =
35
36# Include common make files
37ifeq ($(MAKERULEDIR), )
38#Makerule path not defined, define this and assume relative path from ROOTDIR
39 MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
40 export MAKERULEDIR
41endif
42include $(MAKERULEDIR)/common.mk
43
44# OBJs and libraries are built by using rule defined in rules_<target>.mk
45# and need not be explicitly specified here
46
47# Nothing beyond this point
diff --git a/examples/utils/makefile_baremetal b/examples/utils/makefile_baremetal
new file mode 100644
index 0000000..970dfd7
--- /dev/null
+++ b/examples/utils/makefile_baremetal
@@ -0,0 +1,48 @@
1#
2# This file is the makefile for building CAL app utils library.
3#
4ifeq ($(RULES_MAKE), )
5include $(PDK_INSTALL_PATH)/ti/build/Rules.make
6else
7include $(RULES_MAKE)
8endif
9
10MODULE_NAME = cal_app_utils_baremetal
11BUILD_OS_TYPE=baremetal
12
13SRCDIR = . src src/V0
14INCDIR = . src src/V0
15
16# List all the external components/interfaces, whose interface header files
17# need to be included for this component
18INCLUDE_EXTERNAL_INTERFACES = pdk
19INCLUDE_INTERNAL_INTERFACES = csl
20
21# Common source files and CFLAGS across all platforms and cores
22SRCS_COMMON = calutils_mem.c
23ifeq ($(BOARD),$(filter $(BOARD), am65xx_evm))
24SRCS_COMMON += calapp_sensor.c calutils_ub95x.c
25SRCS_COMMON += calutils_ub964_sat88_ov1063x.c calutils_ub964_sat88_ov1063x_reg.c
26endif
27
28PACKAGE_SRCS_COMMON = .
29CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CAL_CFLAGS)
30CFLAGS_LOCAL_COMMON += -DBARE_METAL
31
32# Core/SoC/platform specific source files and CFLAGS
33# Example:
34# SRCS_<core/SoC/platform-name> =
35# CFLAGS_LOCAL_<core/SoC/platform-name> =
36
37# Include common make files
38ifeq ($(MAKERULEDIR), )
39#Makerule path not defined, define this and assume relative path from ROOTDIR
40 MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
41 export MAKERULEDIR
42endif
43include $(MAKERULEDIR)/common.mk
44
45# OBJs and libraries are built by using rule defined in rules_<target>.mk
46# and need not be explicitly specified here
47
48# Nothing beyond this point
diff --git a/examples/cal_capture_test/src/am65xx/calapp_sensor.c b/examples/utils/src/V0/calapp_sensor.c
index a5f5fc5..49e51fc 100644
--- a/examples/cal_capture_test/src/am65xx/calapp_sensor.c
+++ b/examples/utils/src/V0/calapp_sensor.c
@@ -33,7 +33,7 @@
33/** 33/**
34 * \file calapp_sensor.c 34 * \file calapp_sensor.c
35 * 35 *
36 * \brief Frame buffer memory allocator API. 36 * \brief Sensor API.
37 * 37 *
38 */ 38 */
39 39
@@ -41,13 +41,12 @@
41/* Include Files */ 41/* Include Files */
42/* ========================================================================== */ 42/* ========================================================================== */
43 43
44#include <CaptureCal_main.h> 44#include <calutils.h>
45#include <ti/drv/fvid2/fvid2.h> 45#include <ti/drv/fvid2/fvid2.h>
46#include <ti/board/board.h> 46#include <ti/drv/cal/cal.h>
47#include <calutils_ub95x.h> 47#include <calutils_ub95x.h>
48#include <calutils_ub964_sat88_ov1063x.h> 48#include <calutils_ub964_sat88_ov1063x.h>
49 49
50
51/* ========================================================================== */ 50/* ========================================================================== */
52/* Macros & Typedefs */ 51/* Macros & Typedefs */
53/* ========================================================================== */ 52/* ========================================================================== */
@@ -75,13 +74,8 @@
75/* ========================================================================== */ 74/* ========================================================================== */
76/* Function Definitions */ 75/* Function Definitions */
77/* ========================================================================== */ 76/* ========================================================================== */
78int32_t appBoardInit(void)
79{
80 Board_init(BOARD_INIT_PINMUX_CONFIG);
81 return FVID2_SOK;
82}
83 77
84void appSensorConfigInit(uint32_t sensorDriverId) 78void CalUtils_sensorConfigInit(uint32_t sensorDriverId)
85{ 79{
86 if (sensorDriverId == FVID2_VID_SENSOR_BYPASS_CSI2_DRV) 80 if (sensorDriverId == FVID2_VID_SENSOR_BYPASS_CSI2_DRV)
87 { 81 {
@@ -93,11 +87,11 @@ void appSensorConfigInit(uint32_t sensorDriverId)
93 } 87 }
94 else 88 else
95 { 89 {
96 GT_0trace(CalTrace, GT_ERR, APP_NAME "Sensor Driver Not Supported\r\n"); 90 GT_0trace(CalUtilsTrace, GT_ERR, "Sensor Driver Not Supported\r\n");
97 } 91 }
98} 92}
99 93
100void appSensorConfigDeInit(uint32_t sensorDriverId) 94void CalUtils_sensorConfigDeInit(uint32_t sensorDriverId)
101{ 95{
102 if (sensorDriverId == FVID2_VID_SENSOR_BYPASS_CSI2_DRV) 96 if (sensorDriverId == FVID2_VID_SENSOR_BYPASS_CSI2_DRV)
103 { 97 {
@@ -109,7 +103,7 @@ void appSensorConfigDeInit(uint32_t sensorDriverId)
109 } 103 }
110 else 104 else
111 { 105 {
112 GT_0trace(CalTrace, GT_ERR, APP_NAME "Sensor Driver Not Supported\r\n"); 106 GT_0trace(CalUtilsTrace, GT_ERR, "Sensor Driver Not Supported\r\n");
113 } 107 }
114} 108}
115 109
diff --git a/examples/cal_capture_test/src/am65xx/calutils_ub95x.c b/examples/utils/src/V0/calutils_ub95x.c
index 1ede966..1ede966 100644
--- a/examples/cal_capture_test/src/am65xx/calutils_ub95x.c
+++ b/examples/utils/src/V0/calutils_ub95x.c
diff --git a/examples/cal_capture_test/src/am65xx/calutils_ub95x.h b/examples/utils/src/V0/calutils_ub95x.h
index 5f28f20..5f28f20 100644
--- a/examples/cal_capture_test/src/am65xx/calutils_ub95x.h
+++ b/examples/utils/src/V0/calutils_ub95x.h
diff --git a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.c b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x.c
index 6598fb3..6598fb3 100644
--- a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.c
+++ b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x.c
diff --git a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.h b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x.h
index 281f36e..281f36e 100644
--- a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x.h
+++ b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x.h
diff --git a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x_reg.c b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x_reg.c
index 9f7b21f..9f7b21f 100644
--- a/examples/cal_capture_test/src/am65xx/calutils_ub964_sat88_ov1063x_reg.c
+++ b/examples/utils/src/V0/calutils_ub964_sat88_ov1063x_reg.c
diff --git a/examples/cal_capture_test/src/am65xx/linker_cal_a53.lds b/examples/utils/src/V0/linker_cal_a53.lds
index 53cb75f..d3450d1 100644
--- a/examples/cal_capture_test/src/am65xx/linker_cal_a53.lds
+++ b/examples/utils/src/V0/linker_cal_a53.lds
@@ -1,8 +1,8 @@
1/* File: linker_sa2ul_a53.lds 1/* File: linker_a53.lds
2 * Semihosting supported gcc Linker script for AM65XX A53 for QT 2 * Semihosting supported gcc Linker script for AM65XX A53 for QT
3 * Purpose: single core A53 C app 3 * Purpose: single core A53 C app
4*/ 4*/
5__STACK_SIZE = 0x4000; 5__STACK_SIZE = 0x10000;
6__TI_STACK_SIZE = __STACK_SIZE; 6__TI_STACK_SIZE = __STACK_SIZE;
7 7
8MEMORY 8MEMORY
diff --git a/examples/cal_capture_test/src/calutils_mem.c b/examples/utils/src/calutils_mem.c
index c02a7a1..521a9e0 100644
--- a/examples/cal_capture_test/src/calutils_mem.c
+++ b/examples/utils/src/calutils_mem.c
@@ -45,13 +45,15 @@
45#if defined (BARE_METAL) 45#if defined (BARE_METAL)
46#include <stdlib.h> 46#include <stdlib.h>
47#else 47#else
48#include <xdc/std.h>
49#include <ti/sysbios/BIOS.h>
48#include <xdc/runtime/System.h> 50#include <xdc/runtime/System.h>
49#include <xdc/runtime/Memory.h> 51#include <xdc/runtime/Memory.h>
50#include <xdc/runtime/IHeap.h> 52#include <xdc/runtime/IHeap.h>
51#include <ti/sysbios/heaps/HeapMem.h> 53#include <ti/sysbios/heaps/HeapMem.h>
52#endif 54#endif
53#include <ti/osal/osal.h> 55#include <ti/osal/osal.h>
54#include <calutils_mem.h> 56#include <calutils.h>
55 57
56/* See calutils_mem.h for function documentation */ 58/* See calutils_mem.h for function documentation */
57 59
@@ -59,7 +61,10 @@
59/* Macros & Typedefs */ 61/* Macros & Typedefs */
60/* ========================================================================== */ 62/* ========================================================================== */
61 63
62/* None */ 64#if defined(BARE_METAL)
65/** \brief Typedef for Heap memory handle */
66typedef void* HeapMem_Handle;
67#endif
63 68
64/* ========================================================================== */ 69/* ========================================================================== */
65/* Structure Declarations */ 70/* Structure Declarations */
@@ -336,10 +341,10 @@ static uint8_t *fw_mem_alloc_ptr = (uint8_t*)gCalUtils_heapMemFrame;
336/* Macro to align x to y */ 341/* Macro to align x to y */
337#define align(x,y) ((x + y) & (~y)) 342#define align(x,y) ((x + y) & (~y))
338 343
339Ptr CalUtils_alignedMalloc(uint32_t size, uint32_t alignment) 344void * CalUtils_alignedMalloc(uint32_t size, uint32_t alignment)
340{ 345{
341 uint8_t *alloc_ptr; 346 uint8_t *alloc_ptr;
342 Ptr p_block = (Ptr) NULL; 347 void * p_block = (void *) NULL;
343 348
344 alloc_ptr = (uint8_t*)align((uint32_t)fw_mem_alloc_ptr, alignment); 349 alloc_ptr = (uint8_t*)align((uint32_t)fw_mem_alloc_ptr, alignment);
345 350
@@ -351,15 +356,15 @@ Ptr CalUtils_alignedMalloc(uint32_t size, uint32_t alignment)
351 return p_block; 356 return p_block;
352} 357}
353 358
354void CalUtils_alignedFree(Ptr p, uint32_t size ) 359void CalUtils_alignedFree(void *p, uint32_t size )
355{ 360{
356 /* Nothing to be done here */ 361 /* Nothing to be done here */
357} 362}
358#endif 363#endif
359 364
360Ptr CalUtils_memAlloc(uint32_t size, uint32_t align) 365void * CalUtils_memAlloc(uint32_t size, uint32_t align)
361{ 366{
362 Ptr addr; 367 void * addr;
363 368
364 /* allocate memory */ 369 /* allocate memory */
365#if defined (BARE_METAL) 370#if defined (BARE_METAL)
@@ -377,7 +382,7 @@ Ptr CalUtils_memAlloc(uint32_t size, uint32_t align)
377 return (addr); 382 return (addr);
378} 383}
379 384
380int32_t CalUtils_memFree(Ptr addr, uint32_t size) 385int32_t CalUtils_memFree(void *addr, uint32_t size)
381{ 386{
382 /* free previously allocated memory */ 387 /* free previously allocated memory */
383#if defined (BARE_METAL) 388#if defined (BARE_METAL)