updated to 6.0.1 and added additional processors/toolchains
This commit is contained in:
150
ports/c667x/ccs/example_build/include/C66XX.h
Normal file
150
ports/c667x/ccs/example_build/include/C66XX.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/******************************************************************************
|
||||
TMS320C66xx KeyStone Multicore DSP Software Development Kit (SDK). Rev 2A.
|
||||
Definitions, macros and API functions for DSP Environment.
|
||||
(C) MicroLAB Systems, 2015
|
||||
|
||||
|
||||
http://www.mlabsys.com
|
||||
ftp://ftp.mlabsys.com
|
||||
email: techsupport@mlabsys.com
|
||||
|
||||
|
||||
Description:
|
||||
------------
|
||||
This file contains definitions, macros and API functions for KeyStone
|
||||
Multicore DSP environment and must be included in the user C-application.
|
||||
DSP Software Development Kit library is based on TI Chip Support Library
|
||||
(CSL), so it's needed to add CSL libraries into the project along with DSP
|
||||
Software Development Kit library.
|
||||
|
||||
Note that C66xx CorePac interrupt controller (INTC) functions are not
|
||||
included in this DSP Software Utilities library.
|
||||
It's delivered as a separate library from the remaining DSP Software
|
||||
Utilities. When using an embedded operating system that contains interrupt
|
||||
controller/dispatcher support, do not link in the INTC library.
|
||||
For interrupt controller support, SYS/BIOS users should use
|
||||
the HWI (Hardware Interrupt) and ECM (Event Combiner Manager) modules
|
||||
supported under SYS/BIOS v5.21 or later.
|
||||
|
||||
|
||||
Revision history:
|
||||
-----------------
|
||||
rev.1A - 2014, initial release for C6678 DSP.
|
||||
rev.1B - 2015, fixed minor bugs.
|
||||
rev.1C - 2015:
|
||||
- changed C66XX_init_ddr3() DDR3 initialization
|
||||
function;
|
||||
- added DSP chip-level (CPINTC) interrupt controller
|
||||
functions;
|
||||
rev.2A - 2015, totally redesigned DSP SDK;
|
||||
|
||||
|
||||
Notes:
|
||||
------
|
||||
1. This C-header file is an include file for TI C6xxx C/C++ Code
|
||||
Generation Tools, which must be invoked to compile code for C66xx DSP
|
||||
platform.
|
||||
|
||||
2. The following additional libraries should be included:
|
||||
TI Chip Support Library (CSL) (ti.csl.ae66) should be included in
|
||||
Linker options (this library is located at
|
||||
$(TI_PDK_C6678_INSTALL_DIR)\packages\ti\csl\lib).
|
||||
|
||||
3. This file is best viewed with the TAB setting set to '4'.
|
||||
|
||||
4. This header file is externally controlled from user C-code by run-time
|
||||
compiler keys definitions in order to apply DSP-type specific
|
||||
definitions to refer to particular definitions included for different
|
||||
DSP type:
|
||||
|
||||
__C66XX_SELECT_C6678_DSP__
|
||||
- if defined in user code prior inclusion of this header file,
|
||||
then DSP-type specific definitions are applied to C6678 DSP
|
||||
|
||||
Copyright:
|
||||
----------
|
||||
This utility is supplied free of charge as it is without any obligation
|
||||
from MicroLAB Systems. No responsibility is assumed for any use or misuse
|
||||
of these utilities.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file C66XX.h
|
||||
*
|
||||
* @brief KeyStone Multicore DSP SDK include file
|
||||
*
|
||||
* This file contains definitions, macros and API functions for KeyStone
|
||||
* Multicore DSP environment
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __C66XX_H__ // check for this file has been already included
|
||||
#define __C66XX_H__ 1
|
||||
|
||||
|
||||
// General defs
|
||||
#define C66XX_ON 1
|
||||
#define C66XX_OFF 0
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//------------ DSP-type specific run-time compiler keys processing ------------
|
||||
// (this is required in order to exclude key confusions)
|
||||
|
||||
// Default setting is C6678 definitions
|
||||
#ifndef __C66XX_SELECT_C6678_DSP__
|
||||
#define __C66XX_SELECT_C6678_DSP__ 1
|
||||
#endif /* __C66XX_SELECT_C6678_DSP__ */
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
/** KeyStone Multicore DSP SDK revision ID */
|
||||
#define C66XX_SDK_REVISION_ID "2A"
|
||||
|
||||
|
||||
// Include TI Chip Support Library (CSL) defs
|
||||
// CSL Chip Functional Layer
|
||||
#include <ti/csl/csl_chipAux.h>
|
||||
// CSL TSC Functional Layer
|
||||
#include <ti/csl/csl_tsc.h>
|
||||
// CSL Cache Functional Layer
|
||||
#include <ti/csl/csl_cacheAux.h>
|
||||
// CSL Boot configuration defs
|
||||
#include <ti/csl/csl_bootcfgAux.h>
|
||||
// CSL Power and Sleep Controller defs
|
||||
#include <ti/csl/csl_pscAux.h>
|
||||
// CSL XMC Controller defs
|
||||
#include <ti/csl/csl_xmcAux.h>
|
||||
// CSL DDR3 defs
|
||||
#include <ti/csl/csl_emif4f.h>
|
||||
#include <ti/csl/csl_emif4fAux.h>
|
||||
// CSL INTC defs
|
||||
#include <ti/csl/src/intc/csl_intcAux.h>
|
||||
// CSL CPINTC defs
|
||||
#include <ti/csl/csl_cpIntcAux.h>
|
||||
// CSL SGMII defs
|
||||
#include <ti/csl/csl_cpsgmiiAux.h>
|
||||
#include <ti/csl/csl_cpgmac_slAux.h>
|
||||
// CSL GPIO Functional Layer
|
||||
#include <ti/csl/csl_gpioAux.h>
|
||||
// CSL Timer Functional Layer
|
||||
#include <ti/csl/csl_tmrAux.h>
|
||||
// CSL UART Functional Layer
|
||||
#include <ti/csl/cslr_uart.h>
|
||||
// CSL SRIO Functional Layer
|
||||
#include <ti/csl/csl_srioAux.h>
|
||||
#include <ti/csl/csl_srioAuxPhyLayer.h>
|
||||
|
||||
|
||||
// Include C66xx DSP defs, macros and aux functions
|
||||
#include "C66XX_DEF.hxx"
|
||||
#include "C66XX_MACROS.hxx"
|
||||
#include "C66XX_FUNCTIONS.hxx"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* __C66XX_H__ */
|
||||
1678
ports/c667x/ccs/example_build/include/C66XX_DEF.hxx
Normal file
1678
ports/c667x/ccs/example_build/include/C66XX_DEF.hxx
Normal file
File diff suppressed because it is too large
Load Diff
1693
ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx
Normal file
1693
ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx
Normal file
File diff suppressed because it is too large
Load Diff
1154
ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx
Normal file
1154
ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx
Normal file
File diff suppressed because it is too large
Load Diff
251
ports/c667x/ccs/example_build/include/TA66XX_DSP.h
Normal file
251
ports/c667x/ccs/example_build/include/TA66XX_DSP.h
Normal file
@@ -0,0 +1,251 @@
|
||||
/******************************************************************************
|
||||
TORNADO AMC modules Software Development Kit (SDK). Rev 4A.
|
||||
General definitions and API functions.
|
||||
(C) MicroLAB Systems, 2015-2017
|
||||
|
||||
|
||||
http://www.mlabsys.com
|
||||
ftp://ftp.mlabsys.com
|
||||
email: techsupport@mlabsys.com
|
||||
|
||||
|
||||
Description:
|
||||
------------
|
||||
This file contains general definitions and API functions for TORNADO AMC
|
||||
modules SDK and must be included in the user C-application for
|
||||
TORNADO AMC modules.
|
||||
|
||||
|
||||
Revision history:
|
||||
-----------------
|
||||
rev.2A - 2015, initial release for TORNADO-A6678 board rev.1B;
|
||||
rev.3A - 2016:
|
||||
- added support for TORNADO-A6678/FMC board rev.1A;
|
||||
rev.3B - 2017:
|
||||
- added support for TORNADO-A6678/FMC board rev.1B;
|
||||
rev.4A - 2017:
|
||||
- added support for TORNADO-AZ/FMC board rev.1A;
|
||||
|
||||
|
||||
Notes:
|
||||
------
|
||||
1. This C-header file is an include file for TI C6xxx C/C++ Code
|
||||
Generation Tools, which must be invoked to compile for C66xx DSP
|
||||
platform.
|
||||
|
||||
2. This file is best viewed with the TAB setting set to '4'.
|
||||
|
||||
|
||||
Copyright:
|
||||
----------
|
||||
This utility is supplied free of charge as it is without any obligation
|
||||
from MicroLAB Systems. No responsibility is assumed for any use or misuse
|
||||
of these utilities.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file TA66XX_DSP.h
|
||||
*
|
||||
* @brief Main include file
|
||||
*
|
||||
* This file contains general definitions and API functions for TORNADO
|
||||
* AMC modules SDK
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TA66XX_DSP_H__ // check for this file has been already included
|
||||
#define __TA66XX_DSP_H__ 1
|
||||
|
||||
|
||||
// General defs
|
||||
#define TA66XX_ON 1
|
||||
#define TA66XX_OFF 0
|
||||
|
||||
|
||||
// Include C66xx DSP defs, macros and aux functions
|
||||
#include "C66XX.h"
|
||||
// Include TORNADO AMC SDK functions errors
|
||||
#include "TASDK_ERR.h"
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/** TORNADO AMC SDK revision ID */
|
||||
#define TA66XX_SDK_REVISION_ID "4A"
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ TORNADO AMC SDK API functions ID defs ==========================
|
||||
//=============================================================================
|
||||
/** @addtogroup TA66XX_FUNCTIONS_ID SDK API functions ID defs
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**< Function name max size */
|
||||
#define TA66XX_FUNCTION_NAME_LEN_MAX 64
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TA66XX_GET_ERROR_MESSAGE_FUNCTION_ID = 0,
|
||||
TA66XX_GET_FUNCTION_NAME_FUNCTION_ID,
|
||||
TA66XX_BC_SET_I2C_INTERRUPT_NUMBER_FUNCTION_ID,
|
||||
TA66XX_BC_SET_UART_INTERRUPT_NUMBER_FUNCTION_ID,
|
||||
TA66XX_BC_INIT_FUNCTION_ID,
|
||||
TA66XX_BC_MAP_DSP_GPIO_INTERRUPT_FUNCTION_ID,
|
||||
TA66XX_BC_UNMAP_DSP_GPIO_INTERRUPT_FUNCTION_ID,
|
||||
TA66XX_BC_INIT_UART_FUNCTION_ID,
|
||||
TA66XX_BC_WRITE_EEPROM_FUNCTION_ID,
|
||||
TA66XX_BC_READ_EEPROM_FUNCTION_ID,
|
||||
TA66XX_BC_ERASE_EEPROM_FUNCTION_ID,
|
||||
TA66XX_BC_GET_DEVICE_INFO_FUNCTION_ID,
|
||||
TA66XX_BC_GET_HW_CFG_INFO_FUNCTION_ID,
|
||||
TA66XX_BC_GET_FMC_INFO_FUNCTION_ID,
|
||||
TA66XX_BC_GET_TEMP_STATE_FUNCTION_ID,
|
||||
TA66XX_BC_GET_POWER_STATE_FUNCTION_ID,
|
||||
TA66XX_BC_GET_FMC_POWER_STATE_FUNCTION_ID,
|
||||
TA66XX_BC_GET_SFP_INFO_FUNCTION_ID,
|
||||
TA66XX_BC_SET_FPGA_HIF_CONFIG_FUNCTION_ID,
|
||||
TA66XX_BC_GET_FPGA_HIF_CONFIG_FUNCTION_ID,
|
||||
TA66XX_BC_CLEAR_FPGA_CNF_FUNCTION_ID,
|
||||
TA66XX_BC_LOAD_FPGA_CNF_FUNCTION_ID,
|
||||
TA66XX_BC_GET_GBE_PORT_INFO_FUNCTION_ID,
|
||||
TA66XX_BC_INIT_GBE_PORT_FUNCTION_ID,
|
||||
TA66XX_BC_ERASE_FLASH_FUNCTION_ID,
|
||||
TA66XX_BC_WRITE_FLASH_FUNCTION_ID,
|
||||
TA66XX_BC_READ_FLASH_FUNCTION_ID,
|
||||
TA66XX_SC_INIT_FLASH_RECORD_LIST_FUNCTION_ID,
|
||||
TA66XX_SC_GET_NUMBER_OF_FLASH_RECORDS_FUNCTION_ID,
|
||||
TA66XX_SC_GET_FLASH_RECORD_LIST_FUNCTION_ID,
|
||||
TA66XX_SC_GET_FLASH_RECORD_INFO_FUNCTION_ID,
|
||||
TA66XX_SC_READ_FLASH_RECORD_DATA_FUNCTION_ID,
|
||||
TA66XX_SC_CREATE_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_SC_WRITE_FLASH_RECORD_DATA_FUNCTION_ID,
|
||||
TA66XX_SC_XCLOSE_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_SC_UPDATE_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_SC_DELETE_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_SC_SQUEEZE_FLASH_RECORDS_FUNCTION_ID,
|
||||
TA66XX_SC_GET_FLASH_FREE_SPACE_FUNCTION_ID,
|
||||
TA66XX_SC_GET_BOOT_SEQ_FUNCTION_ID,
|
||||
TA66XX_SC_DELETE_BOOT_SEQ_FUNCTION_ID,
|
||||
TA66XX_SC_SET_BOOT_SEQ_FUNCTION_ID,
|
||||
TA66XX_SC_LOAD_DSP_APPL_FROM_MEMORY_FUNCTION_ID,
|
||||
TA66XX_SC_LOAD_DSP_APPL_FROM_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_SC_LOAD_FPGA_CNF_FROM_FLASH_RECORD_FUNCTION_ID,
|
||||
TA66XX_NUMBER_OF_FUNCTIONS
|
||||
};
|
||||
/** @}*/
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ General SDK API functions declarations =========================
|
||||
//=============================================================================
|
||||
|
||||
/** @addtogroup TA66XX_GENERAL TORNADO AMC SDK general API functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*------------ TA66XX_set_error() function -------------------------------*//**
|
||||
* @brief Function should be used on exit from SDK API functions in
|
||||
* order to set error code and function ID of SDK API functions
|
||||
*
|
||||
* @param[in] err - error code;
|
||||
* @param[in] function_id - function ID of SDK API functions;
|
||||
*
|
||||
* @return Error code
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_set_error(int32_t err, int32_t function_id);
|
||||
|
||||
|
||||
/*------------ TA66XX_get_last_error() function --------------------------*//**
|
||||
* @brief Function returns error code of last executed API function
|
||||
*
|
||||
* @return Error code of last executed API function
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_get_last_error(void);
|
||||
|
||||
|
||||
/*------------ TA66XX_get_error_flag() function --------------------------*//**
|
||||
* @brief Function returns status of ERROR_FLAG for API functions
|
||||
*
|
||||
* ERROR_FLAG is set by each API function in case error has been detected.
|
||||
* ERROR_FLAG can be reset by TA66XX_clear_error_flag() API function
|
||||
*
|
||||
* @param[out] error_code - pointer to a variable to receive the error code in
|
||||
* case error has been detected. In case pointer is NULL, then
|
||||
* no error code is returned;
|
||||
* @param[out] error_function_id - pointer to a variable to receive ID of the
|
||||
* first API function, which has returned with error. In case
|
||||
* pointer is NULL, then no function ID is returned;
|
||||
*
|
||||
* @return Status of ERROR_FLAG: ON or OFF
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_get_error_flag(int32_t *error_code, int32_t *error_function_id);
|
||||
|
||||
|
||||
/*------------ TA66XX_clear_error_flag() function ------------------------*//**
|
||||
* @brief Function clear ERROR_FLAG for API functions
|
||||
*
|
||||
* @return Always OK
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_clear_error_flag(void);
|
||||
|
||||
|
||||
/*------------ TA66XX_get_error_message() function -----------------------*//**
|
||||
* @brief Function returns the text interpretation of the error code.
|
||||
*
|
||||
* @param[in] error - error code to be interpreted;
|
||||
* @param[out] error_message - pointer to the returned string. In case pointer
|
||||
* is NULL, then no text is filled in;
|
||||
*
|
||||
* @return Error code
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_get_error_message(int32_t error, char *error_message);
|
||||
|
||||
|
||||
/*------------ TA66XX_get_function_name() function -----------------------*//**
|
||||
* @brief Function returns the text interpretation of API function.
|
||||
*
|
||||
* @param[in] function_id - ID of the API function to be interpreted;
|
||||
* @param[out] function_name - pointer to the returned string. In case pointer
|
||||
* is NULL, then no text is filled in;
|
||||
*
|
||||
* @return Error code
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t TA66XX_get_function_name(int32_t function_id, char *function_name);
|
||||
|
||||
|
||||
/** @}*/
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* __TA66XX_DSP_H__ */
|
||||
|
||||
121
ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h
Normal file
121
ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/******************************************************************************
|
||||
TORNADO AMC modules Software Development Kit (SDK). Rev 4A.
|
||||
Definitions, macros and API functions for DSP Environment.
|
||||
(C) MicroLAB Systems, 2014-2017
|
||||
|
||||
|
||||
http://www.mlabsys.com
|
||||
ftp://ftp.mlabsys.com
|
||||
email: techsupport@mlabsys.com
|
||||
|
||||
|
||||
Description:
|
||||
------------
|
||||
This file contains definitions, macros and API functions for TORNADO AMC
|
||||
modules on-board DSP environment and must be included in the user
|
||||
C-application for TORNADO AMC modules.
|
||||
|
||||
|
||||
Revision history:
|
||||
-----------------
|
||||
rev.1A - 2014, initial release for TORNADO-A6678 board rev.1A.
|
||||
rev.1B - 2015, fixed some bugs.
|
||||
rev.1C - 2015, added support for TORNADO-A6678 board rev.1B:
|
||||
- updated DSP external control registers area;
|
||||
- updated TA66XX_init_dsp() DSP initialization
|
||||
function;
|
||||
- added MMC-to-DSP communication functions in DSP
|
||||
I2C functions.
|
||||
rev.2A - 2015, totally redesigned SDK for TORNADO-A6678 board rev.1B;
|
||||
rev.3A - 2016, added support for TORNADO-A6678/FMC board rev.1A;
|
||||
rev.3B - 2017:
|
||||
- added support for TORNADO-A6678/FMC board rev.1B;
|
||||
rev.4A - 2017:
|
||||
- added support for TORNADO-AZ/FMC board rev.1A;
|
||||
|
||||
|
||||
Notes:
|
||||
------
|
||||
1. This C-header file is an include file for TI C6xxx C/C++ Code
|
||||
Generation Tools, which must be invoked to compile for C66xx DSP
|
||||
platform.
|
||||
|
||||
2. This file is best viewed with the TAB setting set to '4'.
|
||||
|
||||
3. This library uses dynamic memory allocation in erase FLASH functions,
|
||||
so user should provide enough memory area for dynamic memory allocation
|
||||
(-heap parameter) and place the section (.sysmem) in the corresponding
|
||||
memory area in linker command file.
|
||||
The max requested memory allocation block length is up to FLASH memory
|
||||
sector length in bytes (128 KB).
|
||||
|
||||
4. This header file is externally controlled from user C-code by run-time
|
||||
compiler keys definitions in order to apply board-type specific
|
||||
definitions to refer to particular definitions included for different
|
||||
board type:
|
||||
|
||||
__TA66XX_BC_USE_BIOS__
|
||||
- if defined in user code prior inclusion of this header file,
|
||||
then TI SYS/BIOS modules(HWI (Hardware Interrupt) and ECM
|
||||
(Event Combiner Manager)), will be used to support
|
||||
C66xx CorePac interrupt controller (INTC).
|
||||
TI INTC Chip Support Library (CSL) should be used in case
|
||||
NO embedded operating system is used in user application.
|
||||
DEFAULT is NOT DEFINED, so CSL INTC library will be used
|
||||
to support C66xx CorePac interrupt controller.
|
||||
|
||||
Copyright:
|
||||
----------
|
||||
This utility is supplied free of charge as it is without any obligation
|
||||
from MicroLAB Systems. No responsibility is assumed for any use or misuse
|
||||
of these utilities.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file TA66XX_DSP_BC.h
|
||||
*
|
||||
* @brief Main include file
|
||||
*
|
||||
* This file contains definitions, macros and API functions for TORNADO
|
||||
* AMC modules on-board DSP environment
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TA66XX_DSP_BC_H__ // check for this file has been already included
|
||||
#define __TA66XX_DSP_BC_H__ 1
|
||||
|
||||
|
||||
#if defined __TA66XX_BC_USE_BIOS__
|
||||
// Include this file to prevent compiler errors
|
||||
// when using SYS/BIOS
|
||||
#include <xdc/std.h>
|
||||
#endif /* __TA66XX_BC_USE_BIOS__ */
|
||||
|
||||
|
||||
// Include general TORNADO AMC SDK defs
|
||||
#include "TA66XX_DSP.h"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//------------ board-type specific run-time compiler keys processing ----------
|
||||
// (this is required in order to exclude key confusions)
|
||||
|
||||
// Default setting is C6678 DSP definitions
|
||||
#define __C66XX_SELECT_C6678_DSP__ 1
|
||||
|
||||
// Finally we must define C-code data type for accessing I/O areas
|
||||
typedef volatile uint16_t __TA66XX_BC_DSP_XCR_RG_DATA_TYPE__;
|
||||
typedef volatile uint16_t __TA66XX_BC_FLASH_DATA_TYPE__;
|
||||
//=============================================================================
|
||||
|
||||
|
||||
// Include TORNADO AMC SDK functions
|
||||
#include "TA66XX_DSP_BC_FUNCTIONS.hxx"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* __TA66XX_DSP_BC_H__ */
|
||||
|
||||
1732
ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx
Normal file
1732
ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx
Normal file
File diff suppressed because it is too large
Load Diff
649
ports/c667x/ccs/example_build/include/TA66XX_OSAL.h
Normal file
649
ports/c667x/ccs/example_build/include/TA66XX_OSAL.h
Normal file
@@ -0,0 +1,649 @@
|
||||
/******************************************************************************
|
||||
TORNADO AMC modules Software Development Kit (SDK). Rev 3A.
|
||||
TI SYS/BIOS RTOS abstraction layer for TORNADO AMC embedded controllers.
|
||||
(C) MicroLAB Systems, 2014-2015
|
||||
|
||||
|
||||
File: This file contains TI SYS/BIOS RTOS abstraction layer definitions
|
||||
----- for TORNADO AMC embedded controllers, which is used for various
|
||||
low-level drivers (LLD) and libraries that the application use.
|
||||
|
||||
|
||||
Revision history:
|
||||
-----------------
|
||||
rev.1A - 2014, initial release for TORNADO-A6678 board
|
||||
rev.2A - 2015, totally redesigned SDK;
|
||||
rev.3A - 2016, added support for TORNADO-A6678/FMC board rev.1A;
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file TA66XX_OSAL.h
|
||||
*
|
||||
* @brief RTOS abstraction layer definitions
|
||||
*
|
||||
* This file contains TI SYS/BIOS RTOS abstraction layer (OSAL) definitions for
|
||||
* TORNADO AMC embedded controllers, which is used for various
|
||||
* low-level drivers (LLD) and libraries that the application use.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TA66XX_OSAL_H__ // check for this file has been already included
|
||||
#define __TA66XX_OSAL_H__ 1
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//------------ Definitions ----------------------------------------------------
|
||||
//=============================================================================
|
||||
/** @addtogroup TA66XX_OSAL_GENERAL OS abstraction layer (OSAL) general definitions
|
||||
* @{
|
||||
*/
|
||||
|
||||
// Hardware semaphore defs
|
||||
#define TA66XX_OSAL_CPPI_HW_SEM 1 /**< CPPI LLD hardware semaphore */
|
||||
#define TA66XX_OSAL_QMSS_HW_SEM 2 /**< QMSS LLD hardware semaphore */
|
||||
#define TA66XX_OSAL_SRIO_HW_SEM 3 /**< SRIO LLD hardware semaphore */
|
||||
#define TA66XX_OSAL_SPI_HW_SEM 4 /**< SPI driver hardware semaphore */
|
||||
|
||||
/** Macro to define high-priority QMSS queue for accumulator (depends on DSP event ID and core number) */
|
||||
#define TA66XX_OSAL_set_qmss_queue_acc(eventid, core) (704 + (eventid - 48) * 8 + core)
|
||||
|
||||
// Interrupts and event IDs used by NIMU library (DSP core 0 is assumed to be used)
|
||||
#define TA66XX_OSAL_ETHERNET_AMC_EVENTID 48 /**< Ethernet AMC port event - used by NIMU library */
|
||||
#define TA66XX_OSAL_ETHERNET_AMC_INTERRUPT 7 /**< Ethernet AMC port interrupt - used by NIMU library */
|
||||
/** QMSS queue for AMC Ethernet port accumulator (depends on TA66XX_OSAL_ETHERNET_AMC_EVENTID) */
|
||||
#define TA66XX_OSAL_ETHERNET_AMC_QMSS_QUEUE_ACC TA66XX_OSAL_set_qmss_queue_acc(TA66XX_OSAL_ETHERNET_AMC_EVENTID, 0)
|
||||
#define TA66XX_OSAL_ETHERNET_PHY_EVENTID 49 /**< Ethernet PHY port event - used by NIMU library */
|
||||
#define TA66XX_OSAL_ETHERNET_PHY_INTERRUPT 8 /**< Ethernet PHY port interrupt - used by NIMU library */
|
||||
/** QMSS queue for PHY Ethernet port accumulator (depends on TA66XX_OSAL_ETHERNET_PHY_EVENTID) */
|
||||
#define TA66XX_OSAL_ETHERNET_PHY_QMSS_QUEUE_ACC TA66XX_OSAL_set_qmss_queue_acc(TA66XX_OSAL_ETHERNET_PHY_EVENTID, 0)
|
||||
|
||||
// Interrupts and event IDs used by SRIO (DSP core 0 is assumed to be used)
|
||||
#define TA66XX_OSAL_SRIO_MESSAGES_EVENTID 50 /**< SRIO event ID used by messages (Type 9 and Type 11) */
|
||||
#define TA66XX_OSAL_SRIO_INTERRUPT 9 /**< SRIO interrupt */
|
||||
/** QMSS queue for SRIO accumulator (depends on TA66XX_OSAL_SRIO_MESSAGES_EVENTID) */
|
||||
#define TA66XX_OSAL_SRIO_QMSS_QUEUE_ACC TA66XX_OSAL_set_qmss_queue_acc(TA66XX_OSAL_SRIO_MESSAGES_EVENTID, 0)
|
||||
#define TA66XX_OSAL_SRIO_DIO_EVENTID 20 /**< SRIO event ID used by DirectIO (INTDST(n + 16), n - core number) */
|
||||
/** @}*/
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//------------ Global variables -----------------------------------------------
|
||||
//=============================================================================
|
||||
extern uint32_t qmssMallocCounter;
|
||||
extern uint32_t qmssFreeCounter;
|
||||
extern uint32_t cppiMallocCounter;
|
||||
extern uint32_t cppiFreeCounter;
|
||||
extern uint32_t srioMallocCounter;
|
||||
extern uint32_t srioFreeCounter;
|
||||
extern uint32_t srioDataBufferMallocCounter;
|
||||
extern uint32_t srioDataBufferFreeCounter;
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ T-AMC controllers OSAL functions declarations ==================
|
||||
//=============================================================================
|
||||
/** @addtogroup TA66XX_OSAL_FUNCTIONS TORNADO AMC OSAL functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ QMSS LLD OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
/*------------ Osal_qmssBeginMemAccess() function ------------------------*//**
|
||||
* @brief Function is used to indicate that a block of memory is about to be
|
||||
* accessed
|
||||
*
|
||||
* If the memory block is cached then this indicates that the application
|
||||
* would need to ensure that the cache is updated with the data from the actual
|
||||
* memory
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_qmssBeginMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_qmssEndMemAccess() function --------------------------*//**
|
||||
* @brief Function is used to indicate that the block of memory has finished
|
||||
* being accessed
|
||||
*
|
||||
* If the memory block is cached then the application would need to ensure that
|
||||
* the contents of the cache are updated immediately to the actual memory.
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_qmssEndMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_qmssMalloc() function --------------------------------*//**
|
||||
* @brief Function implements the memory allocation library function
|
||||
*
|
||||
* This function allocates a memory block of a given size specified by input
|
||||
* parameter 'num_bytes'.
|
||||
*
|
||||
* @param[in] num_bytes - number of bytes to be allocated
|
||||
*
|
||||
* @return Allocated block address
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
Ptr Osal_qmssMalloc(uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_qmssFree() function ----------------------------------*//**
|
||||
* @brief Function implements the memory free library function
|
||||
*
|
||||
* This function frees up memory allocated using Osal_qmssMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] dataPtr - pointer to the memory block to be cleaned up
|
||||
* @param[in] num_bytes - size of the memory block to be cleaned up in bytes
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_qmssFree(Ptr dataPtr, uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_qmssCsEnter() function -------------------------------*//**
|
||||
* @brief Function is used to enter a critical section
|
||||
*
|
||||
* Function protects against access from multiple cores and access from
|
||||
* multiple threads on single core
|
||||
*
|
||||
* @return Handle used to lock critical section
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_qmssCsEnter(void);
|
||||
|
||||
|
||||
/*------------ Osal_qmssCsExit() function --------------------------------*//**
|
||||
* @brief Function is used to exit a critical section protected using
|
||||
* Osal_qmssCsEnter() API.
|
||||
*
|
||||
* @param[in] CsHandle - handle for unlocking critical section
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_qmssCsExit(void *CsHandle);
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ CPPI LLD OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
/*------------ Osal_cppiBeginMemAccess() function ------------------------*//**
|
||||
* @brief Function is used to indicate that a block of memory is about to be
|
||||
* accessed
|
||||
*
|
||||
* If the memory block is cached then this indicates that the application
|
||||
* would need to ensure that the cache is updated with the data from the actual
|
||||
* memory
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_cppiBeginMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_cppiEndMemAccess() function --------------------------*//**
|
||||
* @brief Function is used to indicate that the block of memory has finished
|
||||
* being accessed
|
||||
*
|
||||
* If the memory block is cached then the application would need to ensure that
|
||||
* the contents of the cache are updated immediately to the actual memory.
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_cppiEndMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_cppiMalloc() function --------------------------------*//**
|
||||
* @brief Function implements the memory allocation library function
|
||||
*
|
||||
* This function allocates a memory block of a given size specified by input
|
||||
* parameter 'num_bytes'.
|
||||
*
|
||||
* @param[in] num_bytes - number of bytes to be allocated
|
||||
*
|
||||
* @return Allocated block address
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
Ptr Osal_cppiMalloc(uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_cppiFree() function ----------------------------------*//**
|
||||
* @brief Function implements the memory free library function
|
||||
*
|
||||
* This function frees up memory allocated using Osal_cppiMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] dataPtr - pointer to the memory block to be cleaned up
|
||||
* @param[in] num_bytes - size of the memory block to be cleaned up in bytes
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_cppiFree(Ptr dataPtr, uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_cppiCsEnter() function -------------------------------*//**
|
||||
* @brief Function is used to enter a critical section
|
||||
*
|
||||
* Function protects against access from multiple cores and access from
|
||||
* multiple threads on single core
|
||||
*
|
||||
* @return Handle used to lock critical section
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_cppiCsEnter(void);
|
||||
|
||||
|
||||
/*------------ Osal_cppiCsExit() function --------------------------------*//**
|
||||
* @brief Function is used to exit a critical section protected using
|
||||
* Osal_cppiCsEnter() API.
|
||||
*
|
||||
* @param[in] CsHandle - handle for unlocking critical section
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_cppiCsExit(void *CsHandle);
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifdef __TA66XX_FUNCTIONS_INCLUDE_SRIO__
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ SRIO LLD OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
/*------------ Osal_srioBeginMemAccess() function ------------------------*//**
|
||||
* @brief Function is used to indicate that a block of memory is about to be
|
||||
* accessed
|
||||
*
|
||||
* If the memory block is cached then this indicates that the application
|
||||
* would need to ensure that the cache is updated with the data from the actual
|
||||
* memory
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioBeginMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_srioEndMemAccess() function --------------------------*//**
|
||||
* @brief Function is used to indicate that the block of memory has finished
|
||||
* being accessed
|
||||
*
|
||||
* If the memory block is cached then the application would need to ensure that
|
||||
* the contents of the cache are updated immediately to the actual memory.
|
||||
*
|
||||
* @param[in] ptr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioEndMemAccess(void *ptr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_srioBeginDescriptorAccess() function -----------------*//**
|
||||
* @brief Function is invoked by the SRIO LLD to indicate that a descriptor is
|
||||
* being accessed.
|
||||
*
|
||||
* @param[in] drvHandle - driver instance for which descriptor is being
|
||||
* accessed
|
||||
* @param[in] ptr - pointer to the descriptor being accessed
|
||||
* @param[in] descSize - size of the descriptor (valid only for driver managed
|
||||
* configuration)
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioBeginDescriptorAccess(Srio_DrvHandle drvHandle, void *ptr, uint32_t descSize);
|
||||
|
||||
|
||||
/*------------ Osal_srioEndDescriptorAccess() function -------------------*//**
|
||||
* @brief Function is invoked by the SRIO LLD to indicate that a descriptor is
|
||||
* finished being accessed.
|
||||
*
|
||||
* @param[in] drvHandle - driver instance for which descriptor is being
|
||||
* accessed
|
||||
* @param[in] ptr - pointer to the descriptor being accessed
|
||||
* @param[in] descSize - size of the descriptor (valid only for driver managed
|
||||
* configuration)
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioEndDescriptorAccess(Srio_DrvHandle drvHandle, void *ptr, uint32_t descSize);
|
||||
|
||||
|
||||
/*------------ Osal_srioMalloc() function --------------------------------*//**
|
||||
* @brief Function implements the memory allocation library function
|
||||
*
|
||||
* This function allocates a memory block of a given size specified by input
|
||||
* parameter 'num_bytes'.
|
||||
*
|
||||
* @param[in] num_bytes - number of bytes to be allocated
|
||||
*
|
||||
* @return Allocated block address
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
Ptr Osal_srioMalloc(uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_srioFree() function ----------------------------------*//**
|
||||
* @brief Function implements the memory free library function
|
||||
*
|
||||
* This function frees up memory allocated using Osal_srioMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] dataPtr - pointer to the memory block to be cleaned up
|
||||
* @param[in] num_bytes - size of the memory block to be cleaned up in bytes
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioFree(Ptr dataPtr, uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_dataBufferInitMemory() function ----------------------*//**
|
||||
* @brief Function is used to allocate a block of memory for all the data
|
||||
* buffer operations. This function is called by the application.
|
||||
*
|
||||
* @param[in] dataBufferSize - size of each data buffer
|
||||
*
|
||||
* @return Error code
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize);
|
||||
|
||||
|
||||
/*------------ Osal_srioDataBufferMalloc() function ----------------------*//**
|
||||
* @brief Function is used to allocate a data buffer of the specified size.
|
||||
* Data buffers should always be allocated from the global address space.
|
||||
*
|
||||
* @param[in] numBytes - number of bytes to be allocated
|
||||
*
|
||||
* @return Allocated block address
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_srioDataBufferMalloc(uint32_t numBytes);
|
||||
|
||||
|
||||
/*------------ Osal_srioDataBufferFree() function ------------------------*//**
|
||||
* @brief Function is used to clean up a previously allocated data buffer
|
||||
* block. All data buffers are in the global address space.
|
||||
*
|
||||
* @param[in] ptr - pointer to the memory block to be cleaned up
|
||||
* @param[in] numBytes - size of the memory block to be cleaned up in bytes
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioDataBufferFree(void *ptr, uint32_t numBytes);
|
||||
|
||||
|
||||
/*------------ Osal_srioLog() function -----------------------------------*//**
|
||||
* @brief Function is used to log the messages from SRIO LLD on the console.
|
||||
*
|
||||
* @param[in] fmt - formatted string
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioLog(String fmt, ... );
|
||||
|
||||
|
||||
/*------------ Osal_srioCreateSem() function -----------------------------*//**
|
||||
* @brief Function is used to create a critical section.
|
||||
*
|
||||
* @return Semaphore handle created
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_srioCreateSem(void);
|
||||
|
||||
|
||||
/*------------ Osal_srioDeleteSem() function -----------------------------*//**
|
||||
* @brief Function is used to delete a critical section.
|
||||
*
|
||||
* @param[in] semHandle - semaphore handle to be deleted
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioDeleteSem(void *semHandle);
|
||||
|
||||
|
||||
/*------------ Osal_srioPendSem() function -------------------------------*//**
|
||||
* @brief Function is used to pend on a semaphore
|
||||
*
|
||||
* @param[in] semHandle - semaphore handle on which the API will pend
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioPendSem(void *semHandle);
|
||||
|
||||
|
||||
/*------------ Osal_srioPostSem() function -------------------------------*//**
|
||||
* @brief Function is used to post a semaphore
|
||||
*
|
||||
* @param[in] semHandle - semaphore handle which will be posted
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioPostSem(void *semHandle);
|
||||
|
||||
|
||||
/*------------ Osal_srioEnterMultipleCoreCriticalSection() function ------*//**
|
||||
* @brief Function is used to protect the driver shared resources across
|
||||
* multiple cores.
|
||||
*
|
||||
* @return Handle used to lock critical section
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_srioEnterMultipleCoreCriticalSection(void);
|
||||
|
||||
|
||||
/*------------ Osal_srioExitMultipleCoreCriticalSection() function -------*//**
|
||||
* @brief Function is called to end the critical section which was protecting
|
||||
* shared resources from access across multiple cores.
|
||||
*
|
||||
* @param[in] critSectHandle - handle for unlocking critical section
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioExitMultipleCoreCriticalSection(void *critSectHandle);
|
||||
|
||||
|
||||
/*------------ Osal_srioEnterSingleCoreCriticalSection() function --------*//**
|
||||
* @brief Function is used to provide critical section to prevent access of
|
||||
* shared resources from single core and multiple threads.
|
||||
*
|
||||
* @param[in] drvHandle - driver handle which needs critical section to
|
||||
* protect its resources
|
||||
*
|
||||
* @return Handle used to lock critical section
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void *Osal_srioEnterSingleCoreCriticalSection(Srio_DrvHandle drvHandle);
|
||||
|
||||
|
||||
/*------------ Osal_srioExitSingleCoreCriticalSection() function ---------*//**
|
||||
* @brief Function is called to end the critical section access of shared
|
||||
* resources from single cores.
|
||||
*
|
||||
* @param[in] drvHandle - driver handle which needs critical section to
|
||||
* protect its resources
|
||||
* @param[in] critSectHandle - critical handle retreived by
|
||||
* Osal_srioEnterSingleCoreCriticalSection() function call
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_srioExitSingleCoreCriticalSection(Srio_DrvHandle drvHandle, void *critSectHandle);
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#endif /* __TA66XX_FUNCTIONS_INCLUDE_SRIO__ */
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ NIMU LLD OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
/*------------ Osal_nimuMalloc() function --------------------------------*//**
|
||||
* @brief Function implements the memory allocate function for the NIMU
|
||||
* library.
|
||||
*
|
||||
* This function allocates a memory block of a given size specified by input
|
||||
* parameter 'num_bytes'.
|
||||
*
|
||||
* @param[in] num_bytes - number of bytes to be allocated
|
||||
* @param[in] alignment - alignment of allocated memory block in bytes
|
||||
*
|
||||
* @return Allocated block address
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
Ptr Osal_nimuMalloc(uint32_t num_bytes, uint32_t alignment);
|
||||
|
||||
|
||||
/*------------ Osal_nimuFree() function ----------------------------------*//**
|
||||
* @brief Function implements the memory free function for the NIMU library.
|
||||
*
|
||||
* This function frees up memory allocated using Osal_nimuMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] dataPtr - pointer to the memory block to be cleaned up
|
||||
* @param[in] num_bytes - size of the memory block to be cleaned up in bytes
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_nimuFree(Ptr dataPtr, uint32_t num_bytes);
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ PASS LLD OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
|
||||
/*------------ Osal_paBeginMemAccess() function --------------------------*//**
|
||||
* @brief Function is used to indicate that a block of memory is about to be
|
||||
* accessed
|
||||
*
|
||||
* If the memory block is cached then this indicates that the application
|
||||
* would need to ensure that the cache is updated with the data from the actual
|
||||
* memory
|
||||
*
|
||||
* @param[in] addr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_paBeginMemAccess(Ptr addr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_paEndMemAccess() function ----------------------------*//**
|
||||
* @brief Function is used to indicate that the block of memory has finished
|
||||
* being accessed
|
||||
*
|
||||
* If the memory block is cached then the application would need to ensure that
|
||||
* the contents of the cache are updated immediately to the actual memory.
|
||||
*
|
||||
* @param[in] addr - address of memory block
|
||||
* @param[in] size - size of memory block
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_paEndMemAccess(Ptr addr, uint32_t size);
|
||||
|
||||
|
||||
/*------------ Osal_paMtCsEnter() function -------------------------------*//**
|
||||
* @brief Function is used to enter a critical section
|
||||
*
|
||||
* Function protects against access from multiple cores and access from
|
||||
* multiple threads on single core
|
||||
*
|
||||
* @param[out] key - pointer to a variable to receive a handle for unlocking
|
||||
* critical section
|
||||
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_paMtCsEnter(uint32_t *key);
|
||||
|
||||
|
||||
/*------------ Osal_paMtCsExit() function --------------------------------*//**
|
||||
* @brief Function is used to exit a critical section protected using
|
||||
* Osal_paMtCsEnter() API.
|
||||
*
|
||||
* @param[in] key - handle for unlocking critical section
|
||||
*
|
||||
* @return None
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
void Osal_paMtCsExit(uint32_t key);
|
||||
|
||||
/** @}*/
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* __TA66XX_OSAL_H__ */
|
||||
87
ports/c667x/ccs/example_build/include/TASDK_ERR.h
Normal file
87
ports/c667x/ccs/example_build/include/TASDK_ERR.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/******************************************************************************
|
||||
TORNADO AMC modules Software Development Kit (SDK). Rev 4A.
|
||||
(C) MicroLAB Systems, 2015-2017
|
||||
|
||||
|
||||
File: TORNADO AMC SDK functions errors
|
||||
-----
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file TASDK_ERR.h
|
||||
*
|
||||
* @brief SDK functions errors
|
||||
*
|
||||
* This file contains TORNADO AMC SDK functions errors
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TASDK_ERR_H__ // check for this file has been already included
|
||||
#define __TASDK_ERR_H__ 1
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Returned error codes ===========================================
|
||||
//=============================================================================
|
||||
/** @addtogroup TASDK_ERRORS SDK API functions returned error codes
|
||||
* @{
|
||||
*/
|
||||
#define TASDK_OK 0 /**< No errors */
|
||||
#define TASDK_PARAM_ERR -100 /**< Erroneous function parameter */
|
||||
#define TASDK_INVALID_HW_ERR -101 /**< Invalid H/W error (invalid board, etc.) */
|
||||
#define TASDK_HW_ERR -102 /**< H/W error (error writing to the DSP control registers, etc) */
|
||||
#define TASDK_SYS_CALL_ERR -103 /**< system API call error */
|
||||
#define TASDK_INVALID_DSP_CORE_ERR -104 /**< Only DSP core 0 may call the function */
|
||||
#define TASDK_INVALID_DSP_CORE_BOOT_ADDR_ERR -105 /**< Invalid DSP core boot address */
|
||||
#define TASDK_API_OPEN_ERR -106 /**< API has not been open */
|
||||
#define TASDK_MMC_TO_CPU_COMM_CHECKSUM_ERR -150 /**< Invalid data frame checksum */
|
||||
#define TASDK_MMC_TO_CPU_COMM_DATA_BUF_LEN_ERR -151 /**< Data buffer is not large enough to store received data frame */
|
||||
#define TASDK_MMC_TO_CPU_COMM_INV_CMD_ERR -152 /**< Invalid command */
|
||||
#define TASDK_MMC_TO_CPU_COMM_RECV_DATA_LEN_ERR -153 /**< Invalid received data length */
|
||||
#define TASDK_MMC_TO_CPU_COMM_RECV_DATA_INV_ERR -154 /**< Received data is invalid */
|
||||
#define TASDK_MMC_TO_CPU_COMM_TIMEOUT_ERR -155 /**< MMC-to-DSP communication timeout error */
|
||||
#define TASDK_SFP_NOT_INSTALLED_ERR -156 /**< SFP module is not installed */
|
||||
#define TASDK_FMC_NOT_INSTALLED_ERR -157 /**< FMC module is not installed */
|
||||
#define TASDK_FMC_INFO_INVALID_ERR -158 /**< FMC module info is invalid */
|
||||
#define TASDK_FLASH_INV_DEV_ERR -200 /**< unsupported FLASH device */
|
||||
#define TASDK_FLASH_ERASE_ERR -201 /**< FLASH erase error */
|
||||
#define TASDK_FLASH_WR_ERR -202 /**< FLASH write error */
|
||||
#define TASDK_FLASH_CANNOT_WR_ERR -203 /**< FLASH contents does not allow to write this data */
|
||||
#define TASDK_FLASH_INV_RD_ERR -204 /**< invalid FLASH read data during AUTO-SELECT */
|
||||
#define TASDK_FLASH_INFO_NOT_MATCH_ERR -205 /**< FLASH info from the FLASH chip does not match FLASH_LEN_ID from System Configuration register */
|
||||
#define TASDK_FLASH_SECTOR_WRPROT_ERR -206 /**< FLASH sector is write-protected */
|
||||
#define TASDK_FLASH_WR_BUF_ABORT_ERR -207 /**< FLASH write-to-buffer program is aborted */
|
||||
#define TASDK_FLASH_HW_WP_ERR -208 /**< FLASH writes are disabled by on-board switch */
|
||||
#define TASDK_FLASH_WR_DISABLED_ERR -209 /**< FLASH writes are disabled by application */
|
||||
#define TASDK_FPGA_CNF_BITFILE_HD_FORMAT_ERR -500 /**< invalid FPGA bitfile header format */
|
||||
#define TASDK_FPGA_CNF_LOAD_ERR -501 /**< error during FPGA configuration */
|
||||
#define TASDK_FPGA_CNF_CRC_ERR -502 /**< CRC check failed during FPGA configuration */
|
||||
#define TASDK_FPGA_CNF_LOAD_LEN_ERR -503 /**< not all the data has been loaded */
|
||||
#define TASDK_FPGA_CNF_BITFILE_INV_PART_ERR -504 /**< invalid FPGA bitfile header part name */
|
||||
#define TASDK_FPGA_CNF_INV_IF_ERR -505 /**< invalid FPGA configuration interface selected */
|
||||
#define TASDK_FLASH_RECORD_GLOBAL_HD_NOT_VALID_ERR -600 /**< FLASH record global header is invalid */
|
||||
#define TASDK_FLASH_RECORD_HD_NOT_VALID_ERR -601 /**< FLASH record header is invalid */
|
||||
#define TASDK_FLASH_RECORD_HD_LIST_NOT_VALID_ERR -602 /**< FLASH record header list is invalid */
|
||||
#define TASDK_FLASH_RECORD_FREE_SPACE_ERR -603 /**< not available free space in FLASH */
|
||||
#define TASDK_FLASH_RECORD_CHECKSUM_ERR -604 /**< FLASH record checksum mismatch */
|
||||
#define TASDK_FLASH_RECORD_ALREADY_OPENED_ERR -605 /**< another FLASH record is opened for writing */
|
||||
#define TASDK_FLASH_RECORD_INVALID_LOAD_ADDR_ERR -606 /**< invalid FLASH record load address */
|
||||
#define TASDK_FLASH_RECORD_INV_NUMBER_ERR -607 /**< invalid FLASH record number */
|
||||
#define TASDK_FLASH_BOOT_SEQ_NOT_VALID_ERR -608 /**< FLASH boot sequence is invalid */
|
||||
#define ELF_LOADER_BASE_ERR -1000 /**< ELF file loader base error */
|
||||
#define ELF_LOADER_PARAM_ERR (ELF_LOADER_BASE_ERR) /**< erroneous function parameter */
|
||||
#define ELF_LOADER_INV_ELF_HEADER_ERR (ELF_LOADER_BASE_ERR - 1) /**< invalid ELF header */
|
||||
#define ELF_LOADER_INV_FILE_TYPE_ERR (ELF_LOADER_BASE_ERR - 2) /**< invalid file type (non-executable) */
|
||||
#define ELF_LOADER_INV_ENTRY_POINT_ERR (ELF_LOADER_BASE_ERR - 3) /**< invalid entry-point address */
|
||||
#define ELF_LOADER_INV_SEGMENT_ERR (ELF_LOADER_BASE_ERR - 4) /**< invalid or missing segment data */
|
||||
/** @}*/
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* __TASDK_ERR_H__ */
|
||||
|
||||
Reference in New Issue
Block a user