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__ */
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<deviceVariant value="TMS320C66XX.TMS320C6678"/>
|
||||
<deviceFamily value="C6000"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="7.4.20"/>
|
||||
<isElfFormat value="true"/>
|
||||
<connection value="common/targetdb/connections/TIXDS100usb_Connection.xml"/>
|
||||
<rts value="libc.a"/>
|
||||
<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
|
||||
<isTargetManual value="false"/>
|
||||
<origin value="C:/release/threadx/sample_threadx_c6678evm"/>
|
||||
</projectOptions>
|
||||
167
ports/c667x/ccs/example_build/sample_threadx_c6678evm/.cproject
Normal file
167
ports/c667x/ccs/example_build/sample_threadx_c6678evm/.cproject
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.DebugToolchain.64304217" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug.2100535781">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1287921372" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS320C66XX.TMS320C6678"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=sample_threadx.cmd"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCTS="/>
|
||||
<listOptionValue builtIn="false" value="PRODUCT_MACRO_IMPORTS={}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1725672517" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.2.5" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.targetPlatformDebug.981326933" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.builderDebug.1057626667" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="true" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.compilerDebug.1787916763" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION.206044182" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.1203006280" name="Application binary interface (coffabi not supported) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.433605690" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH.394813546" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/inc_generic}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/inc_port}"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx}"/>
|
||||
<listOptionValue builtIn="false" value="c:\ti\pdk_C6678_1_1_2_6\packages"/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER.2116217573" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING.1237190301" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE.1888360984" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS.97538788" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS.1119499022" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS.1821423071" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS.1864654763" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug.2100535781" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.OUTPUT_FILE.729952471" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.MAP_FILE.1869241467" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.LIBRARY.1427878913" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="tx.lib"/>
|
||||
<listOptionValue builtIn="false" value="C66XX_DSP.lib"/>
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.SEARCH_PATH.141236019" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/Debug}"/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.DISPLAY_ERROR_NUMBER.456846460" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.XML_LINK_INFO.1940154938" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD_SRCS.1154505425" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD2_SRCS.1256571074" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__GEN_CMDS.1083871547" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.hex.549224929" name="C6000 Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.hex"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="sample_threadx_coff.cmd|tx_initialize_low_level_c66xx.c|sample_threadx_eabi.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949" name="Release" parent="com.ti.ccstudio.buildDefinitions.C6000.Release">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.ReleaseToolchain.90306702" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease.998313649">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.151553215" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.GenericC674xDevice"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=COFF"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.392978422" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.3.4" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.targetPlatformRelease.319204404" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.targetPlatformRelease"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.builderRelease.141715821" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.builderRelease"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.compilerRelease.159632685" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.compilerRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION.303722149" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION" value="6740" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING.1765266621" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER.1773551018" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH.1723913498" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.2043470764" name="Application binary interface (coffabi, eabi) [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.coffabi" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS.384290240" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS.1541283167" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS.1810509774" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS.1148466239" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease.998313649" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE.632244326" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE" useByScannerDiscovery="false" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE.1445784323" name="Input and output sections listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.DISPLAY_ERROR_NUMBER.1855368593" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH.1845797039" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY.538535709" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value=""libc.a""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.XML_LINK_INFO.499733938" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD_SRCS.1613219748" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD2_SRCS.1041720846" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__GEN_CMDS.1908930597" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="sample_threadx.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="sample_threadx.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.869979204" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
||||
<project-mappings>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
</project-mappings>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>sample_threadx_c6678evm</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-k</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>${CCS_UTILS_DIR}/bin/gmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${BuildDirectory}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.ti.ccstudio.core.ccsNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>ORIGINAL_PROJECT_ROOT</name>
|
||||
<value>file:/C:/release/threadx/sample_threadx_c6678evm</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
|
||||
@@ -0,0 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
@@ -0,0 +1,441 @@
|
||||
/*
|
||||
* board_setup.c
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "board_setup.h"
|
||||
#include "C66XX.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ General definitions ============================================
|
||||
//=============================================================================
|
||||
// DSP Timer-8 definition
|
||||
#define C66XX_DSP_TIMER C66XX_TIMER_8
|
||||
// DSP Timer-8 output frequency in Hz
|
||||
#define C66XX_DSP_TIMER_FREQ 100
|
||||
/* DSP Timer-8 interrupt event ID */
|
||||
#define C66XX_DSP_TIMER_EVENT_ID 67
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Global functions ===============================================
|
||||
//=============================================================================
|
||||
void _tx_nmi_vector(void);
|
||||
void _tx_int4_vector(void);
|
||||
void _tx_int5_vector(void);
|
||||
void _tx_int6_vector(void);
|
||||
void _tx_int7_vector(void);
|
||||
void _tx_int8_vector(void);
|
||||
void _tx_int9_vector(void);
|
||||
void _tx_int10_vector(void);
|
||||
void _tx_int11_vector(void);
|
||||
void _tx_int12_vector(void);
|
||||
void _tx_int13_vector(void);
|
||||
void _tx_int14_vector(void);
|
||||
void _tx_int15_vector(void);
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Static functions ===============================================
|
||||
//=============================================================================
|
||||
static int32_t tx_timer_init(C66XX_TIMER timer, uint32_t frequency);
|
||||
static int32_t tx_interrupt_init(void);
|
||||
//=============================================================================
|
||||
|
||||
|
||||
/*------------ init_output_timer() function -----------------------------------
|
||||
* DESCRIPTION: Function initializes Timer64 module
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: Error code
|
||||
-----------------------------------------------------------------------------*/
|
||||
static int32_t tx_timer_init(C66XX_TIMER timer, uint32_t frequency)
|
||||
{
|
||||
int32_t r;
|
||||
C66XX_TIMER_CFG_DD cfg_dd;
|
||||
|
||||
// Reset 64-bit timer
|
||||
if ((r = C66XX_TIMER_reset(timer, C66XX_TIMER_HW_CFG_64BIT)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Fill configuration data descriptor
|
||||
memset(&cfg_dd, 0, C66XX_TIMER_CFG_DD_LEN);
|
||||
cfg_dd.timer_mode = C66XX_TIMER_MODE_32BIT_UNCHAINED;
|
||||
cfg_dd.timer_high.clk_src_output_mode = C66XX_TIMER_CLK_OUTPUT_MODE_CLK;
|
||||
// Init DSP Timer64 module
|
||||
if ((r = C66XX_TIMER_init(timer, frequency, &cfg_dd)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Enable timer interrupt
|
||||
if ((r = C66XX_TIMER_enable_interrupts(timer, C66XX_TIMER_HW_CFG_32BIT_HIGH)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Start 32-bit timer high to enable continuously
|
||||
if ((r = C66XX_TIMER_start(timer, C66XX_TIMER_HW_CFG_32BIT_HIGH, C66XX_TIMER_COUNT_MODE_CONTINUOUSLY)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// TIMER module configuration is completed
|
||||
printf("Timer #%u configuration is completed\n", timer);
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_interrupt_init() function -----------------------------------
|
||||
* DESCRIPTION: Function initializes CorePack interrupt module
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: Error code
|
||||
-----------------------------------------------------------------------------*/
|
||||
static int32_t tx_interrupt_init(void)
|
||||
{
|
||||
int32_t r;
|
||||
|
||||
// Set DSP interrupt handlers to the ones defined in tx_initialize_low_level.asm
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_NMI, _tx_nmi_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_4, _tx_int4_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_5, _tx_int5_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_6, _tx_int6_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_7, _tx_int7_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_8, _tx_int8_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_9, _tx_int9_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_10, _tx_int10_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_11, _tx_int11_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_12, _tx_int12_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_13, _tx_int13_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_14, _tx_int14_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_15, _tx_int15_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
/* CorePack interrupt module configuration is completed */
|
||||
printf("INTC configuration is completed\n");
|
||||
// Exit without errors
|
||||
r = C66XX_OK;
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ hardware_setup() function --------------------------------------
|
||||
* DESCRIPTION: Function intializes board hardware
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
int hardware_setup()
|
||||
{
|
||||
platform_init_flags init_flags;
|
||||
platform_init_config init_config;
|
||||
platform_info p_info;
|
||||
int32_t r;
|
||||
|
||||
/*
|
||||
* Initialize all platform peripherals with default values:
|
||||
* PLL, DDR, TCSL, PHY, ECC
|
||||
*/
|
||||
init_flags.pll = 1;
|
||||
init_flags.ddr = 1;
|
||||
init_flags.tcsl = 1;
|
||||
init_flags.phy = 1;
|
||||
init_flags.ecc = 0;
|
||||
memset(&init_config, 0, sizeof(platform_init_config));
|
||||
if ((r = platform_init(&init_flags, &init_config)) != Platform_EOK)
|
||||
goto exit;
|
||||
|
||||
/* Initialize platform UART */
|
||||
if ((r = platform_uart_init()) != Platform_EOK)
|
||||
goto exit;
|
||||
if ((r = platform_uart_set_baudrate(115200)) != Platform_EOK)
|
||||
goto exit;
|
||||
|
||||
/* Get platform info */
|
||||
platform_get_info(&p_info);
|
||||
/* Write data to the UART */
|
||||
platform_write("Platform library version is %s\n", p_info.version);
|
||||
platform_write("Board name is %s\n", p_info.board_name);
|
||||
platform_write("Board serial number is %s\n", p_info.serial_nbr);
|
||||
platform_write("Board revision ID is %u\n", p_info.board_rev);
|
||||
platform_write("CPU name is %s\n", p_info.cpu.name);
|
||||
platform_write("CPU revision ID is %u\n", p_info.cpu.revision_id);
|
||||
platform_write("Number of CPU cores is %u\n", p_info.cpu.core_count);
|
||||
platform_write("CPU frequency is %u MHz\n", p_info.frequency);
|
||||
|
||||
// Init CorePac INTC
|
||||
if ((r = C66XX_INT_init_core()) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Init DSP Timer
|
||||
if ((r = tx_timer_init(C66XX_DSP_TIMER, C66XX_DSP_TIMER_FREQ)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Init DSP interrupt controller
|
||||
if ((r = tx_interrupt_init()) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
printf("Board is initialized\n");
|
||||
/* Exit with no errors */
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_nmi_handler() function --------------------------------------
|
||||
* DESCRIPTION: Function handles NMI interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_nmi_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int4_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT4 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int4_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int5_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT5 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int5_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int6_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT6 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int6_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int7_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT7 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int7_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int8_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT8 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int8_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int9_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT9 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int9_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int10_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT10 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int10_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int11_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT11 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int11_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int12_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT12 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int12_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int13_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT13 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int13_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int14_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT14 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int14_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int15_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT15 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int15_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Platform OSAL functions ========================================
|
||||
//=============================================================================
|
||||
|
||||
/*------------ Osal_platformMalloc() function ----------------------------*//**
|
||||
* @brief Function implements the memory allocate function for the platform
|
||||
* 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
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
uint8_t *Osal_platformMalloc(uint32_t num_bytes, uint32_t alignment)
|
||||
{
|
||||
// Allocate memory from default system heap
|
||||
return (NULL);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ Osal_platformFree() function ------------------------------*//**
|
||||
* @brief Function implements the memory free function for the platform
|
||||
* library.
|
||||
*
|
||||
* This function frees up memory allocated using Osal_platformMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] mem_ptr - 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_platformFree(uint8_t *mem_ptr, uint32_t num_bytes)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ Osal_platformSpiCsEnter() 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_platformSpiCsEnter(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ Osal_platformSpiCsExit() 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_platformSpiCsExit(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
* board_setup.h
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOARD_SETUP_H /* check for this file has been already included */
|
||||
#define BOARD_SETUP_H 1
|
||||
|
||||
|
||||
#include "ti\platform\platform.h"
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/*============ Printf output definitions ====================================*/
|
||||
/*===========================================================================*/
|
||||
#define printf platform_write
|
||||
/*===========================================================================*/
|
||||
|
||||
|
||||
/*------------ hardware_setup() function --------------------------------------
|
||||
* DESCRIPTION: Function intializes board hardware
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
int hardware_setup();
|
||||
|
||||
|
||||
/*------------ tx_nmi_handler() function --------------------------------------
|
||||
* DESCRIPTION: Function handles NMI interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_nmi_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int4_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT4 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int4_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int5_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT5 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int5_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int6_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT6 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int6_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int7_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT7 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int7_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int8_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT8 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int8_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int9_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT9 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int9_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int10_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT10 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int10_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int11_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT11 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int11_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int12_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT12 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int12_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int13_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT13 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int13_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int14_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT14 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int14_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int15_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT15 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int15_handler(void);
|
||||
|
||||
|
||||
/*------------ Osal_platformMalloc() function ----------------------------*//**
|
||||
* @brief Function implements the memory allocate function for the platform
|
||||
* 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
|
||||
*
|
||||
-----------------------------------------------------------------------------*/
|
||||
uint8_t *Osal_platformMalloc(uint32_t num_bytes, uint32_t alignment);
|
||||
|
||||
|
||||
/*------------ Osal_platformFree() function ------------------------------*//**
|
||||
* @brief Function implements the memory free function for the platform
|
||||
* library.
|
||||
*
|
||||
* This function frees up memory allocated using Osal_platformMalloc()
|
||||
* function call.
|
||||
*
|
||||
* @param[in] mem_ptr - 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_platformFree(uint8_t *mem_ptr, uint32_t num_bytes);
|
||||
|
||||
|
||||
/*------------ Osal_platformSpiCsEnter() 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_platformSpiCsEnter(void);
|
||||
|
||||
|
||||
/*------------ Osal_platformSpiCsExit() 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_platformSpiCsExit(void);
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
#endif /* BOARD_SETUP_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,528 @@
|
||||
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
|
||||
threads of different priorities, using a message queue, semaphore, mutex, event flags group,
|
||||
byte pool, and block pool. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "board_setup.h"
|
||||
|
||||
#define DEMO_STACK_SIZE 1024
|
||||
#define DEMO_BYTE_POOL_SIZE 9120
|
||||
#define DEMO_BLOCK_POOL_SIZE 100
|
||||
#define DEMO_QUEUE_SIZE 100
|
||||
|
||||
|
||||
/* Define TraceX trace oblects */
|
||||
#define TRACE_BUFFER_SIZE (4 * 1024)
|
||||
#define TRACE_OBJECTS_COUNT 20
|
||||
/* Define TraceX trace buffer */
|
||||
UCHAR tx_trace_buffer[TRACE_BUFFER_SIZE];
|
||||
|
||||
|
||||
/* Define the ThreadX object control blocks... */
|
||||
|
||||
TX_THREAD thread_0;
|
||||
TX_THREAD thread_1;
|
||||
TX_THREAD thread_2;
|
||||
TX_THREAD thread_3;
|
||||
TX_THREAD thread_4;
|
||||
TX_THREAD thread_5;
|
||||
TX_THREAD thread_6;
|
||||
TX_THREAD thread_7;
|
||||
TX_QUEUE queue_0;
|
||||
TX_SEMAPHORE semaphore_0;
|
||||
TX_MUTEX mutex_0;
|
||||
TX_EVENT_FLAGS_GROUP event_flags_0;
|
||||
TX_BYTE_POOL byte_pool_0;
|
||||
TX_BLOCK_POOL block_pool_0;
|
||||
|
||||
|
||||
/* Define demo timer */
|
||||
#define DEMO_TIMER_PERIOD 10
|
||||
#define DEMO_TIMER_VALUE 0xaaaaaaaa
|
||||
TX_TIMER timer_0;
|
||||
ULONG timer_0_counter;
|
||||
|
||||
|
||||
/* Define the counters used in the demo application... */
|
||||
|
||||
ULONG thread_0_counter;
|
||||
ULONG thread_1_counter;
|
||||
ULONG thread_1_messages_sent;
|
||||
ULONG thread_2_counter;
|
||||
ULONG thread_2_messages_received;
|
||||
ULONG thread_3_counter;
|
||||
ULONG thread_4_counter;
|
||||
ULONG thread_5_counter;
|
||||
ULONG thread_6_counter;
|
||||
ULONG thread_7_counter;
|
||||
|
||||
|
||||
/* Define thread prototypes. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input);
|
||||
void thread_1_entry(ULONG thread_input);
|
||||
void thread_2_entry(ULONG thread_input);
|
||||
void thread_3_and_4_entry(ULONG thread_input);
|
||||
void thread_5_entry(ULONG thread_input);
|
||||
void thread_6_and_7_entry(ULONG thread_input);
|
||||
void my_stack_error_handler(TX_THREAD *thread_ptr);
|
||||
void my_timer_function(ULONG timer_input);
|
||||
|
||||
|
||||
/* Define main entry point. */
|
||||
|
||||
void main()
|
||||
{
|
||||
/* Setup the hardware. */
|
||||
hardware_setup();
|
||||
|
||||
/* Enter the ThreadX kernel. */
|
||||
tx_kernel_enter();
|
||||
}
|
||||
|
||||
|
||||
/* Define what the initial system looks like. */
|
||||
|
||||
void tx_application_define(void *first_unused_memory)
|
||||
{
|
||||
|
||||
CHAR *pointer = TX_NULL;
|
||||
UINT status;
|
||||
|
||||
/* Enable event tracing using the global <20>trace_buffer<65> memory and supporting
|
||||
a maximum of TRACE_OBJECTS_COUNT ThreadX objects in the registry. */
|
||||
if ((status = tx_trace_enable(tx_trace_buffer, TRACE_BUFFER_SIZE, TRACE_OBJECTS_COUNT)) != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Register thread stack error notification callback */
|
||||
if ((status = tx_thread_stack_error_notify(my_stack_error_handler)) != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create a byte memory pool from which to allocate the thread stacks. */
|
||||
status = tx_byte_pool_create(&byte_pool_0, "byte pool 0", first_unused_memory, DEMO_BYTE_POOL_SIZE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Put system definition stuff in here, e.g. thread creates and other assorted
|
||||
create information. */
|
||||
|
||||
/* Allocate the stack for thread 0. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the main thread. */
|
||||
status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 1. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 1 and 2. These threads pass information through a ThreadX
|
||||
message queue. It is also interesting to note that these threads have a time
|
||||
slice. */
|
||||
status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 2. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 3. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
|
||||
An interesting thing here is that both threads share the same instruction area. */
|
||||
status = tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 4. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 5. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create thread 5. This thread simply pends on an event flag which will be set
|
||||
by thread_0. */
|
||||
status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 6. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
|
||||
status = tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 7. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the message queue. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the message queue shared by threads 1 and 2. */
|
||||
status = tx_queue_create(&queue_0, "queue 0", TX_1_ULONG, pointer, DEMO_QUEUE_SIZE*sizeof(ULONG));
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the semaphore used by threads 3 and 4. */
|
||||
status = tx_semaphore_create(&semaphore_0, "semaphore 0", 1);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the event flags group used by threads 1 and 5. */
|
||||
status = tx_event_flags_create(&event_flags_0, "event flags 0");
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the mutex used by thread 6 and 7 without priority inheritance. */
|
||||
status = tx_mutex_create(&mutex_0, "mutex 0", TX_NO_INHERIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the memory for a small block pool. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_BLOCK_POOL_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create a block memory pool to allocate a message buffer from. */
|
||||
status = tx_block_pool_create(&block_pool_0, "block pool 0", sizeof(ULONG), pointer, DEMO_BLOCK_POOL_SIZE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate a block and release the block memory. */
|
||||
status = tx_block_allocate(&block_pool_0, (VOID **) &pointer, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Release the block back to the pool. */
|
||||
status = tx_block_release(pointer);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the periodic timer. */
|
||||
status = tx_timer_create(&timer_0, "timer 0", my_timer_function, (ULONG) DEMO_TIMER_VALUE, DEMO_TIMER_PERIOD, DEMO_TIMER_PERIOD, TX_AUTO_ACTIVATE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Define the test threads. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sits in while-forever-sleep loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_0_counter++;
|
||||
|
||||
/* Sleep for 10 ticks. */
|
||||
tx_thread_sleep(10);
|
||||
|
||||
/* Set event flag 0 to wakeup thread 5. */
|
||||
status = tx_event_flags_set(&event_flags_0, 0x1, TX_OR);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_1_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sends messages to a queue shared by thread 2. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_1_counter++;
|
||||
|
||||
/* Send message to queue 0. */
|
||||
status = tx_queue_send(&queue_0, &thread_1_messages_sent, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Increment the message sent. */
|
||||
thread_1_messages_sent++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_2_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
ULONG received_message;
|
||||
UINT status;
|
||||
|
||||
/* This thread retrieves messages placed on the queue by thread 1. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_2_counter++;
|
||||
|
||||
/* Retrieve a message from the queue. */
|
||||
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status and make sure the message is what we
|
||||
expected. */
|
||||
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
|
||||
break;
|
||||
|
||||
/* Otherwise, all is okay. Increment the received message count. */
|
||||
thread_2_messages_received++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_3_and_4_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 3 and thread 4. As the loop
|
||||
below shows, these function compete for ownership of semaphore_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 3)
|
||||
thread_3_counter++;
|
||||
else
|
||||
thread_4_counter++;
|
||||
|
||||
/* Get the semaphore with suspension. */
|
||||
status = tx_semaphore_get(&semaphore_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the semaphore. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the semaphore. */
|
||||
status = tx_semaphore_put(&semaphore_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_5_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
ULONG actual_flags;
|
||||
|
||||
|
||||
/* This thread simply waits for an event in a forever loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_5_counter++;
|
||||
|
||||
/* Wait for event flag 0. */
|
||||
status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
|
||||
&actual_flags, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if ((status != TX_SUCCESS) || (actual_flags != 0x1))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_6_and_7_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 6 and thread 7. As the loop
|
||||
below shows, these function compete for ownership of mutex_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 6)
|
||||
thread_6_counter++;
|
||||
else
|
||||
thread_7_counter++;
|
||||
|
||||
/* Get the mutex with suspension. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Get the mutex again with suspension. This shows
|
||||
that an owning thread may retrieve the mutex it
|
||||
owns multiple times. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the mutex. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the mutex. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Release the mutex again. This will actually
|
||||
release ownership since it was obtained twice. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void my_stack_error_handler(TX_THREAD *thread_ptr)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
void my_timer_function(ULONG timer_input)
|
||||
{
|
||||
/* Increment the thread counter. */
|
||||
timer_0_counter++;
|
||||
|
||||
if (timer_input != DEMO_TIMER_VALUE)
|
||||
while(1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
-c
|
||||
-heap 0x400
|
||||
-stack 0x1000
|
||||
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66
|
||||
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.intc.ae66
|
||||
-l c:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\release\ti.platform.evm6678l.ae66
|
||||
|
||||
/* Memory Map */
|
||||
MEMORY
|
||||
{
|
||||
L1PSRAM (RWX) : org = 0x00E00000, len = 0x00008000
|
||||
L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
|
||||
CODE_RAM (RWX) : org = 0x00800000, len = 0x00020000
|
||||
DATA_RAM (RWX) : org = 0x00820000, len = 0x00060000
|
||||
MSMCSRAM (RWX) : org = 0x0c000000, len = 0x00400000
|
||||
DDR3 (RWX) : org = 0x80000000, len = 0x80000000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text > CODE_RAM
|
||||
.stack > CODE_RAM
|
||||
.cio > CODE_RAM
|
||||
.const > CODE_RAM
|
||||
.data > CODE_RAM
|
||||
.switch > CODE_RAM
|
||||
.sysmem > CODE_RAM
|
||||
.far > CODE_RAM
|
||||
.args > CODE_RAM
|
||||
.ppinfo > CODE_RAM
|
||||
.ppdata > CODE_RAM
|
||||
.csl_vect > CODE_RAM
|
||||
platform_lib > CODE_RAM
|
||||
|
||||
GROUP
|
||||
{
|
||||
.neardata
|
||||
.rodata
|
||||
.bss
|
||||
} > CODE_RAM
|
||||
|
||||
/* COFF sections */
|
||||
.pinit > CODE_RAM
|
||||
.cinit > CODE_RAM
|
||||
|
||||
/* EABI sections */
|
||||
.binit > CODE_RAM
|
||||
.init_array > CODE_RAM
|
||||
.fardata > CODE_RAM
|
||||
.c6xabi.exidx > CODE_RAM
|
||||
.c6xabi.extab > CODE_RAM
|
||||
|
||||
/* ThreadX section which should be the last RAM section loaded */
|
||||
.zend > DATA_RAM
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Debug Probe_0" href="connections/TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Debug Probe_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100csstm.xml" id="drivers" xml="tixds100csstm.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100etbcs.xml" id="drivers" xml="tixds100etbcs.xml" xmlpath="drivers"/>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="TMS320C6678_0" href="devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
||||
@@ -0,0 +1,9 @@
|
||||
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
|
||||
on the device and connection settings specified in your project on the Properties > General page.
|
||||
|
||||
Please note that in automatic target-configuration management, changes to the project's device and/or
|
||||
connection settings will either modify an existing or generate a new target-configuration file. Thus,
|
||||
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
|
||||
you may create your own target-configuration file for this project and manage it manually. You can
|
||||
always switch back to automatic target-configuration management by checking the "Manage the project's
|
||||
target-configuration automatically" checkbox on the project's Properties > General page.
|
||||
@@ -0,0 +1,405 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Initialize */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_initialize.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
|
||||
SP .set B15
|
||||
ADDRESS_MSK .set 0xFFFFFFF0 ; Ensure 16-byte alignment
|
||||
|
||||
; Use Timer 8 as it's available for all DSP cores at C6678
|
||||
; Timer 8 interrupt high event (TINT8H) ID is 67
|
||||
; Assume DSP core clock 1000 MHz
|
||||
; Timer is clocked at DSP core clock / 6 = 167 MHz
|
||||
; Timer frequency will set to 100 Hz
|
||||
TMR8_INTCTLSTAT_ADDR .set 0x02280044 ; Timer 8 Interrupt Control and Status Register
|
||||
INTCTLSTAT_VAL .set 0x00010000 ; Enable TIMHI interrupt
|
||||
|
||||
EVTCLR2_ADDR .set 0x01800048 ; Event Clear register 2 address
|
||||
EVTCLR2_TMR8_VAL .set 0x00000008 ; Clear event 67 - TINT8H
|
||||
|
||||
EVTMASK2_ADDR .set 0x01800088 ; Event Mask register 2 address
|
||||
EVTMASK2_TMR8_VAL .set 0x00000008 ; Mask event 67 - TINT8H
|
||||
|
||||
INTMUX1_ADDR .set 0x01800104 ; Interrupt Mux Register 1 address
|
||||
INTMUX1_TMR8_VAL .set 0x43 ; Tie in Event 67 (TINT8H) to INT4
|
||||
;
|
||||
;
|
||||
.global _tx_thread_system_stack_ptr
|
||||
.global _tx_initialize_unused_memory
|
||||
.global _tx_thread_context_save
|
||||
.global _tx_thread_context_restore
|
||||
.global _tx_timer_interrupt
|
||||
|
||||
|
||||
; External interrupt handlers - should be defined by user
|
||||
.global tx_nmi_handler
|
||||
.global tx_int5_handler
|
||||
.global tx_int6_handler
|
||||
.global tx_int7_handler
|
||||
.global tx_int8_handler
|
||||
.global tx_int9_handler
|
||||
.global tx_int10_handler
|
||||
.global tx_int11_handler
|
||||
.global tx_int12_handler
|
||||
.global tx_int13_handler
|
||||
.global tx_int14_handler
|
||||
.global tx_int15_handler
|
||||
|
||||
;
|
||||
;
|
||||
;/* Define the first available address in memory, which is typically just the last
|
||||
; RAM section loaded. */
|
||||
.sect ".zend"
|
||||
.space 20
|
||||
.global _tx_first_free_memory
|
||||
.align 16
|
||||
_tx_first_free_memory:
|
||||
.space 4
|
||||
|
||||
; Useful macro definitions
|
||||
; Load 32-bit integer into register
|
||||
MVK_LH .macro val,reg
|
||||
MVKL val,reg
|
||||
MVKH val,reg
|
||||
.endm
|
||||
; Interrupt entry - allocate stack space, save A0-A4 and B3 registers to stack,
|
||||
; build return address in B3 register for context save function and
|
||||
; call context save function
|
||||
TX_INTERRUPT_ENTRY .macro
|
||||
ADDK.S2 -288,SP
|
||||
STW B3,*+SP(96)
|
||||
STW A0,*+SP(20)
|
||||
STW A1,*+SP(24)
|
||||
STW A2,*+SP(28)
|
||||
STW A3,*+SP(32)
|
||||
STW A4,*+SP(36)
|
||||
B _tx_thread_context_save
|
||||
.endm
|
||||
; Interrupt exit - jump to context restore function
|
||||
TX_INTERRUPT_EXIT .macro
|
||||
B _tx_thread_context_restore
|
||||
NOP 5
|
||||
.endm
|
||||
|
||||
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_initialize_low_level C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function is responsible for any low-level processor */
|
||||
;/* initialization, including setting up interrupt vectors, setting */
|
||||
;/* up a periodic timer interrupt source, saving the system stack */
|
||||
;/* pointer for use in ISR processing later, and finding the first */
|
||||
;/* available RAM memory address for tx_application_define. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* _tx_initialize_kernel_enter ThreadX entry function */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_initialize_low_level(VOID)
|
||||
;{
|
||||
.global _tx_initialize_low_level
|
||||
_tx_initialize_low_level:
|
||||
;
|
||||
; /* Save the system stack pointer. */
|
||||
; _tx_thread_system_stack_ptr = (VOID_PTR) (SP);
|
||||
;
|
||||
MVK_LH _tx_thread_system_stack_ptr,A0 ; Build address of system stack
|
||||
STW SP,*A0 ; Save system stack address
|
||||
;
|
||||
; /* Pickup the first available memory address. */
|
||||
;
|
||||
MVK_LH ADDRESS_MSK,A0 ; Build address mask
|
||||
MVK_LH _tx_first_free_memory,A1 ; Build address of free memory
|
||||
AND A0,A1,A1 ; Ensure alignment
|
||||
;
|
||||
; /* Save the first available memory address. */
|
||||
; _tx_initialize_unused_memory = (VOID_PTR) end;
|
||||
;
|
||||
MVK_LH _tx_initialize_unused_memory,A0 ; Build address of variable
|
||||
STW A1,*A0 ; Save free memory address
|
||||
;
|
||||
; /* Setup Timer 8 HIGH interrupt event */
|
||||
;
|
||||
MVK_LH INTMUX1_ADDR,A0 ; Select event 67 to send through INT4
|
||||
MVK_LH INTMUX1_TMR8_VAL,A1
|
||||
STW A1,*A0
|
||||
|
||||
MVK_LH EVTMASK2_ADDR,A0 ; Build address of Event Mask 2 Register
|
||||
MVK_LH EVTMASK2_TMR8_VAL,A1 ; Build value of Event Mask 2 Register
|
||||
STW A1,*A0
|
||||
;
|
||||
; /* Done, return to caller. */
|
||||
;
|
||||
B B3 ; Return to caller
|
||||
NOP 5 ; Delay slots
|
||||
;}
|
||||
;
|
||||
|
||||
|
||||
.global _tx_nmi_vector
|
||||
.global _tx_nmi_vector_processing
|
||||
_tx_nmi_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_nmi_vector_processing,B3
|
||||
MVKH _tx_nmi_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_nmi_vector_processing:
|
||||
CALLP tx_nmi_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int4_vector
|
||||
_tx_int4_vector:
|
||||
ADDK.S2 -288,SP ; Allocate stack space
|
||||
STW B3,*+SP(96) ; Save B3
|
||||
STW A0,*+SP(20) ; Save A0
|
||||
STW A1,*+SP(24) ; Save A1
|
||||
STW A2,*+SP(28) ; Save A2
|
||||
STW A3,*+SP(32) ; Save A3
|
||||
STW A4,*+SP(36) ; Save A4
|
||||
NOP
|
||||
|
||||
;_tx_timer_interrupt_preamble:
|
||||
|
||||
MVK_LH TMR8_INTCTLSTAT_ADDR,A0 ; Build address of Timer Interrupt Control Register
|
||||
MVK_LH INTCTLSTAT_VAL,A1 ; Build value of Timer Interrupt Control Register
|
||||
STW A1,*A0 ; Clear Timer Interrupts
|
||||
|
||||
; Clear DSP Event flag - DSP events are not self-cleared
|
||||
MVK_LH EVTCLR2_ADDR,A0 ; Build address of Event Clear 2 Register
|
||||
MVK_LH EVTCLR2_TMR8_VAL,A1 ; Build value of Event Clear 2 Register
|
||||
STW A1,*A0 ; Clear Timer Event
|
||||
|
||||
MVK_LH _tx_timer_interrupt,A0
|
||||
B A0 ; Branch ThreadX timer ISR routine
|
||||
NOP 5 ; Delay slots
|
||||
NOP
|
||||
|
||||
|
||||
|
||||
.global _tx_int5_vector
|
||||
.global _tx_int5_vector_processing
|
||||
_tx_int5_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int5_vector_processing,B3
|
||||
MVKH _tx_int5_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int5_vector_processing:
|
||||
CALLP tx_int5_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int6_vector
|
||||
.global _tx_int6_vector_processing
|
||||
_tx_int6_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int6_vector_processing,B3
|
||||
MVKH _tx_int6_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int6_vector_processing:
|
||||
CALLP tx_int6_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int7_vector
|
||||
.global _tx_int7_vector_processing
|
||||
_tx_int7_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int7_vector_processing,B3
|
||||
MVKH _tx_int7_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int7_vector_processing:
|
||||
CALLP tx_int7_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int8_vector
|
||||
.global _tx_int8_vector_processing
|
||||
_tx_int8_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int8_vector_processing,B3
|
||||
MVKH _tx_int8_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int8_vector_processing:
|
||||
CALLP tx_int8_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int9_vector
|
||||
.global _tx_int9_vector_processing
|
||||
_tx_int9_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int9_vector_processing,B3
|
||||
MVKH _tx_int9_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int9_vector_processing:
|
||||
CALLP tx_int9_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int10_vector
|
||||
.global _tx_int10_vector_processing
|
||||
_tx_int10_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int10_vector_processing,B3
|
||||
MVKH _tx_int10_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int10_vector_processing:
|
||||
CALLP tx_int10_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int11_vector
|
||||
.global _tx_int11_vector_processing
|
||||
_tx_int11_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int11_vector_processing,B3
|
||||
MVKH _tx_int11_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int11_vector_processing:
|
||||
CALLP tx_int11_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int12_vector
|
||||
.global _tx_int12_vector_processing
|
||||
_tx_int12_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int12_vector_processing,B3
|
||||
MVKH _tx_int12_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int12_vector_processing:
|
||||
CALLP tx_int12_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int13_vector
|
||||
.global _tx_int13_vector_processing
|
||||
_tx_int13_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int13_vector_processing,B3
|
||||
MVKH _tx_int13_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int13_vector_processing:
|
||||
CALLP tx_int13_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int14_vector
|
||||
.global _tx_int14_vector_processing
|
||||
_tx_int14_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int14_vector_processing,B3
|
||||
MVKH _tx_int14_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int14_vector_processing:
|
||||
CALLP tx_int14_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int15_vector
|
||||
.global _tx_int15_vector_processing
|
||||
_tx_int15_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int15_vector_processing,B3
|
||||
MVKH _tx_int15_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int15_vector_processing:
|
||||
CALLP tx_int15_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<deviceVariant value="TMS320C66XX.TMS320C6678"/>
|
||||
<deviceFamily value="C6000"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="7.4.20"/>
|
||||
<isElfFormat value="true"/>
|
||||
<connection value="common/targetdb/connections/TIXDS100usb_Connection.xml"/>
|
||||
<rts value="libc.a"/>
|
||||
<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
|
||||
<isTargetManual value="false"/>
|
||||
<origin value="C:/release/threadx/sample_threadx_ta6678fmc"/>
|
||||
</projectOptions>
|
||||
168
ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/.cproject
Normal file
168
ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/.cproject
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.846961876." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.DebugToolchain.1016787538" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug.289825208">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1499025916" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS320C66XX.TMS320C6678"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=sample_threadx.cmd"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCTS="/>
|
||||
<listOptionValue builtIn="false" value="PRODUCT_MACRO_IMPORTS={}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1870836759" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.2.5" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.targetPlatformDebug.1937484540" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.builderDebug.1651217286" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="true" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.compilerDebug.31749926" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION.1103021134" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.1704586848" name="Application binary interface (coffabi not supported) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.338790199" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH.1971914009" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/inc_generic}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/inc_port}"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
<listOptionValue builtIn="false" value="C:\ti\pdk_C6678_1_1_2_6\packages"/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER.1163813604" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING.406812226" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE.179183794" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS.790833726" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS.661437522" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS.70410549" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS.114424515" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug.289825208" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.OUTPUT_FILE.965663998" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.MAP_FILE.64990652" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.LIBRARY.416324183" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="tx.lib"/>
|
||||
<listOptionValue builtIn="false" value="C66XX_DSP.lib"/>
|
||||
<listOptionValue builtIn="false" value="TA66XX_DSP.lib"/>
|
||||
<listOptionValue builtIn="false" value="TA66XX_DSP_BC.lib"/>
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.SEARCH_PATH.76327986" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/tx/Debug}"/>
|
||||
<listOptionValue builtIn="false" value="../../include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.DISPLAY_ERROR_NUMBER.1684196593" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.XML_LINK_INFO.135972852" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD_SRCS.1019082881" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD2_SRCS.1148975579" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__GEN_CMDS.1562873674" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.hex.812200189" name="C6000 Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.hex"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="sample_threadx_coff.cmd|tx_initialize_low_level_c66xx.c|sample_threadx_eabi.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949" name="Release" parent="com.ti.ccstudio.buildDefinitions.C6000.Release">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Release.2052286949." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.ReleaseToolchain.90306702" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease.998313649">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.151553215" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.GenericC674xDevice"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=COFF"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.392978422" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.3.4" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.targetPlatformRelease.319204404" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.targetPlatformRelease"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.builderRelease.141715821" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.builderRelease"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.compilerRelease.159632685" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.compilerRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION.303722149" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION" value="6740" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING.1765266621" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER.1773551018" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH.1723913498" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.2043470764" name="Application binary interface (coffabi, eabi) [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.coffabi" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS.384290240" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS.1541283167" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS.1810509774" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS.1148466239" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease.998313649" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE.632244326" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE" useByScannerDiscovery="false" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE.1445784323" name="Input and output sections listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.DISPLAY_ERROR_NUMBER.1855368593" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH.1845797039" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY.538535709" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value=""libc.a""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.XML_LINK_INFO.499733938" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD_SRCS.1613219748" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD2_SRCS.1041720846" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__GEN_CMDS.1908930597" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="sample_threadx.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="sample_threadx.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.869979204" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
||||
<project-mappings>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
</project-mappings>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>sample_threadx_ta6678fmc</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-k</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>${CCS_UTILS_DIR}/bin/gmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${BuildDirectory}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.ti.ccstudio.core.ccsNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>ORIGINAL_PROJECT_ROOT</name>
|
||||
<value>file:/C:/release/threadx/sample_threadx_ta6678fmc</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
|
||||
@@ -0,0 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
@@ -0,0 +1,329 @@
|
||||
/*
|
||||
* board_setup.c
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "board_setup.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ General definitions ============================================
|
||||
//=============================================================================
|
||||
// DSP Timer-8 definition
|
||||
#define C66XX_DSP_TIMER C66XX_TIMER_8
|
||||
// DSP Timer-8 output frequency in Hz
|
||||
#define C66XX_DSP_TIMER_FREQ 100
|
||||
/* DSP Timer-8 interrupt event ID */
|
||||
#define C66XX_DSP_TIMER_EVENT_ID 67
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Global functions ===============================================
|
||||
//=============================================================================
|
||||
void _tx_nmi_vector(void);
|
||||
void _tx_int4_vector(void);
|
||||
void _tx_int5_vector(void);
|
||||
void _tx_int6_vector(void);
|
||||
void _tx_int7_vector(void);
|
||||
void _tx_int8_vector(void);
|
||||
void _tx_int9_vector(void);
|
||||
void _tx_int10_vector(void);
|
||||
void _tx_int11_vector(void);
|
||||
void _tx_int12_vector(void);
|
||||
void _tx_int13_vector(void);
|
||||
void _tx_int14_vector(void);
|
||||
void _tx_int15_vector(void);
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Static functions ===============================================
|
||||
//=============================================================================
|
||||
static int32_t tx_timer_init(C66XX_TIMER timer, uint32_t frequency);
|
||||
static int32_t tx_interrupt_init(void);
|
||||
//=============================================================================
|
||||
|
||||
|
||||
/*------------ init_output_timer() function -----------------------------------
|
||||
* DESCRIPTION: Function initializes Timer64 module
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: Error code
|
||||
-----------------------------------------------------------------------------*/
|
||||
static int32_t tx_timer_init(C66XX_TIMER timer, uint32_t frequency)
|
||||
{
|
||||
int32_t r;
|
||||
C66XX_TIMER_CFG_DD cfg_dd;
|
||||
|
||||
// Reset 64-bit timer
|
||||
if ((r = C66XX_TIMER_reset(timer, C66XX_TIMER_HW_CFG_64BIT)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Fill configuration data descriptor
|
||||
memset(&cfg_dd, 0, C66XX_TIMER_CFG_DD_LEN);
|
||||
cfg_dd.timer_mode = C66XX_TIMER_MODE_32BIT_UNCHAINED;
|
||||
cfg_dd.timer_high.clk_src_output_mode = C66XX_TIMER_CLK_OUTPUT_MODE_CLK;
|
||||
// Init DSP Timer64 module
|
||||
if ((r = C66XX_TIMER_init(timer, frequency, &cfg_dd)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Enable timer interrupt
|
||||
if ((r = C66XX_TIMER_enable_interrupts(timer, C66XX_TIMER_HW_CFG_32BIT_HIGH)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// Start 32-bit timer high to enable continuously
|
||||
if ((r = C66XX_TIMER_start(timer, C66XX_TIMER_HW_CFG_32BIT_HIGH, C66XX_TIMER_COUNT_MODE_CONTINUOUSLY)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
// TIMER module configuration is completed
|
||||
printf("Timer #%u configuration is completed\n", timer);
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_interrupt_init() function -----------------------------------
|
||||
* DESCRIPTION: Function initializes CorePack interrupt module
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: Error code
|
||||
-----------------------------------------------------------------------------*/
|
||||
static int32_t tx_interrupt_init(void)
|
||||
{
|
||||
int32_t r;
|
||||
|
||||
// Set DSP interrupt handlers to the ones defined in tx_initialize_low_level.asm
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_NMI, _tx_nmi_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_4, _tx_int4_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_5, _tx_int5_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_6, _tx_int6_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_7, _tx_int7_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_8, _tx_int8_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_9, _tx_int9_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_10, _tx_int10_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_11, _tx_int11_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_12, _tx_int12_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_13, _tx_int13_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_14, _tx_int14_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
if ((r = C66XX_INT_set_core_dsp_interrupt_handler(C66XX_DSP_VECTID_15, _tx_int15_vector)) != C66XX_OK)
|
||||
goto exit;
|
||||
|
||||
/* CorePack interrupt module configuration is completed */
|
||||
printf("INTC configuration is completed\n");
|
||||
// Exit without errors
|
||||
r = TASDK_OK;
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ hardware_setup() function --------------------------------------
|
||||
* DESCRIPTION: Function intializes board hardware
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
int hardware_setup()
|
||||
{
|
||||
int r;
|
||||
|
||||
/* Init DSP */
|
||||
if ((r = TA66XX_BC_init()) != TASDK_OK)
|
||||
goto exit;
|
||||
|
||||
// Initialize UART
|
||||
if ((r = TA66XX_BC_init_uart(C66XX_UART_BAUD_RATE_115200, C66XX_UART_DATA_BITS_8BITS, C66XX_UART_PARITY_NONE, C66XX_UART_STOP_BITS_1BIT)) != TASDK_OK)
|
||||
goto exit;
|
||||
|
||||
// Init DSP Timer
|
||||
if ((r = tx_timer_init(C66XX_DSP_TIMER, C66XX_DSP_TIMER_FREQ)) != TASDK_OK)
|
||||
goto exit;
|
||||
|
||||
// Init DSP interrupt controller
|
||||
if ((r = tx_interrupt_init()) != TASDK_OK)
|
||||
goto exit;
|
||||
|
||||
printf("Board is initialized\n");
|
||||
/* Exit with no errors */
|
||||
|
||||
exit:
|
||||
return (r);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_nmi_handler() function --------------------------------------
|
||||
* DESCRIPTION: Function handles NMI interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_nmi_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int4_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT4 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int4_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int5_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT5 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int5_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int6_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT6 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int6_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int7_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT7 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int7_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int8_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT8 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int8_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int9_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT9 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int9_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int10_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT10 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int10_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int11_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT11 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int11_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int12_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT12 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int12_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int13_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT13 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int13_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int14_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT14 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int14_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*------------ tx_int15_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT15 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int15_handler(void)
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* board_setup.h
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOARD_SETUP_H // check for this file has been already included
|
||||
#define BOARD_SETUP_H 1
|
||||
|
||||
|
||||
/* Include T-AMC DSP API */
|
||||
#include "TA66XX_DSP_BC.h"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//============ Printf output definitions ======================================
|
||||
//=============================================================================
|
||||
#define printf TA66XX_BC_uart_printf
|
||||
//=============================================================================
|
||||
|
||||
|
||||
/*------------ hardware_setup() function --------------------------------------
|
||||
* DESCRIPTION: Function intializes board hardware
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
int hardware_setup();
|
||||
|
||||
|
||||
/*------------ tx_nmi_handler() function --------------------------------------
|
||||
* DESCRIPTION: Function handles NMI interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_nmi_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int4_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT4 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int4_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int5_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT5 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int5_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int6_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT6 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int6_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int7_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT7 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int7_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int8_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT8 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int8_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int9_handler() function -------------------------------------
|
||||
* DESCRIPTION: Function handles INT9 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int9_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int10_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT10 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int10_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int11_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT11 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int11_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int12_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT12 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int12_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int13_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT13 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int13_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int14_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT14 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int14_handler(void);
|
||||
|
||||
|
||||
/*------------ tx_int15_handler() function ------------------------------------
|
||||
* DESCRIPTION: Function handles INT15 interrupt
|
||||
* ARGUMENTS:
|
||||
* None
|
||||
* RETURNED VALUE: None
|
||||
-----------------------------------------------------------------------------*/
|
||||
void tx_int15_handler(void);
|
||||
|
||||
|
||||
//=============================================================================
|
||||
#endif /* BOARD_SETUP_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,528 @@
|
||||
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
|
||||
threads of different priorities, using a message queue, semaphore, mutex, event flags group,
|
||||
byte pool, and block pool. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "board_setup.h"
|
||||
|
||||
#define DEMO_STACK_SIZE 1024
|
||||
#define DEMO_BYTE_POOL_SIZE 9120
|
||||
#define DEMO_BLOCK_POOL_SIZE 100
|
||||
#define DEMO_QUEUE_SIZE 100
|
||||
|
||||
|
||||
/* Define TraceX trace oblects */
|
||||
#define TRACE_BUFFER_SIZE (4 * 1024)
|
||||
#define TRACE_OBJECTS_COUNT 20
|
||||
/* Define TraceX trace buffer */
|
||||
UCHAR tx_trace_buffer[TRACE_BUFFER_SIZE];
|
||||
|
||||
|
||||
/* Define the ThreadX object control blocks... */
|
||||
|
||||
TX_THREAD thread_0;
|
||||
TX_THREAD thread_1;
|
||||
TX_THREAD thread_2;
|
||||
TX_THREAD thread_3;
|
||||
TX_THREAD thread_4;
|
||||
TX_THREAD thread_5;
|
||||
TX_THREAD thread_6;
|
||||
TX_THREAD thread_7;
|
||||
TX_QUEUE queue_0;
|
||||
TX_SEMAPHORE semaphore_0;
|
||||
TX_MUTEX mutex_0;
|
||||
TX_EVENT_FLAGS_GROUP event_flags_0;
|
||||
TX_BYTE_POOL byte_pool_0;
|
||||
TX_BLOCK_POOL block_pool_0;
|
||||
|
||||
|
||||
/* Define demo timer */
|
||||
#define DEMO_TIMER_PERIOD 10
|
||||
#define DEMO_TIMER_VALUE 0xaaaaaaaa
|
||||
TX_TIMER timer_0;
|
||||
ULONG timer_0_counter;
|
||||
|
||||
|
||||
/* Define the counters used in the demo application... */
|
||||
|
||||
ULONG thread_0_counter;
|
||||
ULONG thread_1_counter;
|
||||
ULONG thread_1_messages_sent;
|
||||
ULONG thread_2_counter;
|
||||
ULONG thread_2_messages_received;
|
||||
ULONG thread_3_counter;
|
||||
ULONG thread_4_counter;
|
||||
ULONG thread_5_counter;
|
||||
ULONG thread_6_counter;
|
||||
ULONG thread_7_counter;
|
||||
|
||||
|
||||
/* Define thread prototypes. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input);
|
||||
void thread_1_entry(ULONG thread_input);
|
||||
void thread_2_entry(ULONG thread_input);
|
||||
void thread_3_and_4_entry(ULONG thread_input);
|
||||
void thread_5_entry(ULONG thread_input);
|
||||
void thread_6_and_7_entry(ULONG thread_input);
|
||||
void my_stack_error_handler(TX_THREAD *thread_ptr);
|
||||
void my_timer_function(ULONG timer_input);
|
||||
|
||||
|
||||
/* Define main entry point. */
|
||||
|
||||
void main()
|
||||
{
|
||||
/* Setup the hardware. */
|
||||
hardware_setup();
|
||||
|
||||
/* Enter the ThreadX kernel. */
|
||||
tx_kernel_enter();
|
||||
}
|
||||
|
||||
|
||||
/* Define what the initial system looks like. */
|
||||
|
||||
void tx_application_define(void *first_unused_memory)
|
||||
{
|
||||
|
||||
CHAR *pointer = TX_NULL;
|
||||
UINT status;
|
||||
|
||||
/* Enable event tracing using the global <20>trace_buffer<65> memory and supporting
|
||||
a maximum of TRACE_OBJECTS_COUNT ThreadX objects in the registry. */
|
||||
if ((status = tx_trace_enable(tx_trace_buffer, TRACE_BUFFER_SIZE, TRACE_OBJECTS_COUNT)) != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Register thread stack error notification callback */
|
||||
if ((status = tx_thread_stack_error_notify(my_stack_error_handler)) != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create a byte memory pool from which to allocate the thread stacks. */
|
||||
status = tx_byte_pool_create(&byte_pool_0, "byte pool 0", first_unused_memory, DEMO_BYTE_POOL_SIZE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Put system definition stuff in here, e.g. thread creates and other assorted
|
||||
create information. */
|
||||
|
||||
/* Allocate the stack for thread 0. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the main thread. */
|
||||
status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 1. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 1 and 2. These threads pass information through a ThreadX
|
||||
message queue. It is also interesting to note that these threads have a time
|
||||
slice. */
|
||||
status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 2. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 3. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
|
||||
An interesting thing here is that both threads share the same instruction area. */
|
||||
status = tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 4. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 5. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create thread 5. This thread simply pends on an event flag which will be set
|
||||
by thread_0. */
|
||||
status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 6. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
|
||||
status = tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the stack for thread 7. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
status = tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the message queue. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the message queue shared by threads 1 and 2. */
|
||||
status = tx_queue_create(&queue_0, "queue 0", TX_1_ULONG, pointer, DEMO_QUEUE_SIZE*sizeof(ULONG));
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the semaphore used by threads 3 and 4. */
|
||||
status = tx_semaphore_create(&semaphore_0, "semaphore 0", 1);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the event flags group used by threads 1 and 5. */
|
||||
status = tx_event_flags_create(&event_flags_0, "event flags 0");
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the mutex used by thread 6 and 7 without priority inheritance. */
|
||||
status = tx_mutex_create(&mutex_0, "mutex 0", TX_NO_INHERIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate the memory for a small block pool. */
|
||||
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_BLOCK_POOL_SIZE, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create a block memory pool to allocate a message buffer from. */
|
||||
status = tx_block_pool_create(&block_pool_0, "block pool 0", sizeof(ULONG), pointer, DEMO_BLOCK_POOL_SIZE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Allocate a block and release the block memory. */
|
||||
status = tx_block_allocate(&block_pool_0, (VOID **) &pointer, TX_NO_WAIT);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Release the block back to the pool. */
|
||||
status = tx_block_release(pointer);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
/* Create the periodic timer. */
|
||||
status = tx_timer_create(&timer_0, "timer 0", my_timer_function, (ULONG) DEMO_TIMER_VALUE, DEMO_TIMER_PERIOD, DEMO_TIMER_PERIOD, TX_AUTO_ACTIVATE);
|
||||
if (status != TX_SUCCESS)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Define the test threads. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sits in while-forever-sleep loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_0_counter++;
|
||||
|
||||
/* Sleep for 10 ticks. */
|
||||
tx_thread_sleep(10);
|
||||
|
||||
/* Set event flag 0 to wakeup thread 5. */
|
||||
status = tx_event_flags_set(&event_flags_0, 0x1, TX_OR);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_1_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sends messages to a queue shared by thread 2. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_1_counter++;
|
||||
|
||||
/* Send message to queue 0. */
|
||||
status = tx_queue_send(&queue_0, &thread_1_messages_sent, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Increment the message sent. */
|
||||
thread_1_messages_sent++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_2_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
ULONG received_message;
|
||||
UINT status;
|
||||
|
||||
/* This thread retrieves messages placed on the queue by thread 1. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_2_counter++;
|
||||
|
||||
/* Retrieve a message from the queue. */
|
||||
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status and make sure the message is what we
|
||||
expected. */
|
||||
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
|
||||
break;
|
||||
|
||||
/* Otherwise, all is okay. Increment the received message count. */
|
||||
thread_2_messages_received++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_3_and_4_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 3 and thread 4. As the loop
|
||||
below shows, these function compete for ownership of semaphore_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 3)
|
||||
thread_3_counter++;
|
||||
else
|
||||
thread_4_counter++;
|
||||
|
||||
/* Get the semaphore with suspension. */
|
||||
status = tx_semaphore_get(&semaphore_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the semaphore. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the semaphore. */
|
||||
status = tx_semaphore_put(&semaphore_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_5_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
ULONG actual_flags;
|
||||
|
||||
|
||||
/* This thread simply waits for an event in a forever loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_5_counter++;
|
||||
|
||||
/* Wait for event flag 0. */
|
||||
status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
|
||||
&actual_flags, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if ((status != TX_SUCCESS) || (actual_flags != 0x1))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_6_and_7_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 6 and thread 7. As the loop
|
||||
below shows, these function compete for ownership of mutex_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 6)
|
||||
thread_6_counter++;
|
||||
else
|
||||
thread_7_counter++;
|
||||
|
||||
/* Get the mutex with suspension. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Get the mutex again with suspension. This shows
|
||||
that an owning thread may retrieve the mutex it
|
||||
owns multiple times. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the mutex. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the mutex. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Release the mutex again. This will actually
|
||||
release ownership since it was obtained twice. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void my_stack_error_handler(TX_THREAD *thread_ptr)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
void my_timer_function(ULONG timer_input)
|
||||
{
|
||||
/* Increment the thread counter. */
|
||||
timer_0_counter++;
|
||||
|
||||
if (timer_input != DEMO_TIMER_VALUE)
|
||||
while(1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
-c
|
||||
-heap 0x400
|
||||
-stack 0x1000
|
||||
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66
|
||||
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.intc.ae66
|
||||
|
||||
/* Memory Map */
|
||||
MEMORY
|
||||
{
|
||||
L1PSRAM (RWX) : org = 0x00E00000, len = 0x00008000
|
||||
L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
|
||||
CODE_RAM (RWX) : org = 0x00800000, len = 0x00020000
|
||||
DATA_RAM (RWX) : org = 0x00820000, len = 0x00060000
|
||||
MSMCSRAM (RWX) : org = 0x0c000000, len = 0x00400000
|
||||
DDR3 (RWX) : org = 0x80000000, len = 0x80000000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text > CODE_RAM
|
||||
.stack > CODE_RAM
|
||||
.cio > CODE_RAM
|
||||
.const > CODE_RAM
|
||||
.data > CODE_RAM
|
||||
.switch > CODE_RAM
|
||||
.sysmem > CODE_RAM
|
||||
.far > CODE_RAM
|
||||
.args > CODE_RAM
|
||||
.ppinfo > CODE_RAM
|
||||
.ppdata > CODE_RAM
|
||||
.csl_vect > CODE_RAM
|
||||
|
||||
GROUP
|
||||
{
|
||||
.neardata
|
||||
.rodata
|
||||
.bss
|
||||
} > CODE_RAM
|
||||
|
||||
/* COFF sections */
|
||||
.pinit > CODE_RAM
|
||||
.cinit > CODE_RAM
|
||||
|
||||
/* EABI sections */
|
||||
.binit > CODE_RAM
|
||||
.init_array > CODE_RAM
|
||||
.fardata > CODE_RAM
|
||||
.c6xabi.exidx > CODE_RAM
|
||||
.c6xabi.extab > CODE_RAM
|
||||
|
||||
/* ThreadX section which should be the last RAM section loaded */
|
||||
.zend > DATA_RAM
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Debug Probe_0" href="connections/TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Debug Probe_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100csstm.xml" id="drivers" xml="tixds100csstm.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100etbcs.xml" id="drivers" xml="tixds100etbcs.xml" xmlpath="drivers"/>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="TMS320C6678_0" href="devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
||||
@@ -0,0 +1,9 @@
|
||||
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
|
||||
on the device and connection settings specified in your project on the Properties > General page.
|
||||
|
||||
Please note that in automatic target-configuration management, changes to the project's device and/or
|
||||
connection settings will either modify an existing or generate a new target-configuration file. Thus,
|
||||
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
|
||||
you may create your own target-configuration file for this project and manage it manually. You can
|
||||
always switch back to automatic target-configuration management by checking the "Manage the project's
|
||||
target-configuration automatically" checkbox on the project's Properties > General page.
|
||||
@@ -0,0 +1,406 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Initialize */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_initialize.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
|
||||
SP .set B15
|
||||
ADDRESS_MSK .set 0xFFFFFFF0 ; Ensure 16-byte alignment
|
||||
|
||||
; Use Timer 8 as it's available for all DSP cores at C6678
|
||||
; Timer 8 interrupt high event (TINT8H) ID is 67
|
||||
; Assume DSP core clock 1250 MHz
|
||||
; Timer is clocked at DSP core clock / 6 = 208 MHz
|
||||
; Timer frequency will set to 100 Hz
|
||||
TMR8_INTCTLSTAT_ADDR .set 0x02280044 ; Timer 8 Interrupt Control and Status Register
|
||||
INTCTLSTAT_VAL .set 0x00010000 ; Enable TIMHI interrupt
|
||||
|
||||
EVTCLR2_ADDR .set 0x01800048 ; Event Clear register 2 address
|
||||
EVTCLR2_TMR8_VAL .set 0x00000008 ; Clear event 67 - TINT8H
|
||||
|
||||
EVTMASK2_ADDR .set 0x01800088 ; Event Mask register 2 address
|
||||
EVTMASK2_TMR8_VAL .set 0x00000008 ; Mask event 67 - TINT8H
|
||||
|
||||
INTMUX1_ADDR .set 0x01800104 ; Interrupt Mux Register 1 address
|
||||
INTMUX1_TMR8_VAL .set 0x43 ; Tie in Event 67 (TINT8H) to INT4
|
||||
;
|
||||
;
|
||||
.global _tx_thread_system_stack_ptr
|
||||
.global _tx_initialize_unused_memory
|
||||
.global _tx_thread_context_save
|
||||
.global _tx_thread_context_restore
|
||||
.global _tx_timer_interrupt
|
||||
|
||||
|
||||
; External interrupt handlers - should be defined by user
|
||||
.global tx_nmi_handler
|
||||
.global tx_int5_handler
|
||||
.global tx_int6_handler
|
||||
.global tx_int7_handler
|
||||
.global tx_int8_handler
|
||||
.global tx_int9_handler
|
||||
.global tx_int10_handler
|
||||
.global tx_int11_handler
|
||||
.global tx_int12_handler
|
||||
.global tx_int13_handler
|
||||
.global tx_int14_handler
|
||||
.global tx_int15_handler
|
||||
|
||||
;
|
||||
;
|
||||
;/* Define the first available address in memory, which is typically just the last
|
||||
; RAM section loaded. */
|
||||
.sect ".zend"
|
||||
.space 20
|
||||
.global _tx_first_free_memory
|
||||
.align 16
|
||||
_tx_first_free_memory:
|
||||
.space 4
|
||||
|
||||
; Useful macro definitions
|
||||
; Load 32-bit integer into register
|
||||
MVK_LH .macro val,reg
|
||||
MVKL val,reg
|
||||
MVKH val,reg
|
||||
.endm
|
||||
; Interrupt entry - allocate stack space, save A0-A4 and B3 registers to stack,
|
||||
; build return address in B3 register for context save function and
|
||||
; call context save function
|
||||
TX_INTERRUPT_ENTRY .macro
|
||||
ADDK.S2 -288,SP
|
||||
STW B3,*+SP(96)
|
||||
STW A0,*+SP(20)
|
||||
STW A1,*+SP(24)
|
||||
STW A2,*+SP(28)
|
||||
STW A3,*+SP(32)
|
||||
STW A4,*+SP(36)
|
||||
B _tx_thread_context_save
|
||||
.endm
|
||||
; Interrupt exit - jump to context restore function
|
||||
TX_INTERRUPT_EXIT .macro
|
||||
B _tx_thread_context_restore
|
||||
NOP 5
|
||||
.endm
|
||||
|
||||
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_initialize_low_level C667x+/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function is responsible for any low-level processor */
|
||||
;/* initialization, including setting up interrupt vectors, setting */
|
||||
;/* up a periodic timer interrupt source, saving the system stack */
|
||||
;/* pointer for use in ISR processing later, and finding the first */
|
||||
;/* available RAM memory address for tx_application_define. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* _tx_initialize_kernel_enter ThreadX entry function */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_initialize_low_level(VOID)
|
||||
;{
|
||||
.global _tx_initialize_low_level
|
||||
_tx_initialize_low_level:
|
||||
;
|
||||
; /* Save the system stack pointer. */
|
||||
; _tx_thread_system_stack_ptr = (VOID_PTR) (SP);
|
||||
;
|
||||
MVK_LH _tx_thread_system_stack_ptr,A0 ; Build address of system stack
|
||||
STW SP,*A0 ; Save system stack address
|
||||
;
|
||||
; /* Pickup the first available memory address. */
|
||||
;
|
||||
MVK_LH ADDRESS_MSK,A0 ; Build address mask
|
||||
MVK_LH _tx_first_free_memory,A1 ; Build address of free memory
|
||||
AND A0,A1,A1 ; Ensure alignment
|
||||
;
|
||||
; /* Save the first available memory address. */
|
||||
; _tx_initialize_unused_memory = (VOID_PTR) end;
|
||||
;
|
||||
MVK_LH _tx_initialize_unused_memory,A0 ; Build address of variable
|
||||
STW A1,*A0 ; Save free memory address
|
||||
;
|
||||
; /* Setup Timer 8 HIGH interrupt event */
|
||||
;
|
||||
MVK_LH INTMUX1_ADDR,A0 ; Select event 67 to send through INT4
|
||||
MVK_LH INTMUX1_TMR8_VAL,A1
|
||||
STW A1,*A0
|
||||
|
||||
MVK_LH EVTMASK2_ADDR,A0 ; Build address of Event Mask 2 Register
|
||||
MVK_LH EVTMASK2_TMR8_VAL,A1 ; Build value of Event Mask 2 Register
|
||||
STW A1,*A0
|
||||
;
|
||||
; /* Done, return to caller. */
|
||||
;
|
||||
B B3 ; Return to caller
|
||||
NOP 5 ; Delay slots
|
||||
;}
|
||||
;
|
||||
|
||||
|
||||
.global _tx_nmi_vector
|
||||
.global _tx_nmi_vector_processing
|
||||
_tx_nmi_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_nmi_vector_processing,B3
|
||||
MVKH _tx_nmi_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_nmi_vector_processing:
|
||||
CALLP tx_nmi_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int4_vector
|
||||
_tx_int4_vector:
|
||||
ADDK.S2 -288,SP ; Allocate stack space
|
||||
STW B3,*+SP(96) ; Save B3
|
||||
STW A0,*+SP(20) ; Save A0
|
||||
STW A1,*+SP(24) ; Save A1
|
||||
STW A2,*+SP(28) ; Save A2
|
||||
STW A3,*+SP(32) ; Save A3
|
||||
STW A4,*+SP(36) ; Save A4
|
||||
NOP
|
||||
|
||||
;_tx_timer_interrupt_preamble:
|
||||
|
||||
MVK_LH TMR8_INTCTLSTAT_ADDR,A0 ; Build address of Timer Interrupt Control Register
|
||||
MVK_LH INTCTLSTAT_VAL,A1 ; Build value of Timer Interrupt Control Register
|
||||
STW A1,*A0 ; Clear Timer Interrupts
|
||||
|
||||
; Clear DSP Event flag - DSP events are not self-cleared
|
||||
MVK_LH EVTCLR2_ADDR,A0 ; Build address of Event Clear 2 Register
|
||||
MVK_LH EVTCLR2_TMR8_VAL,A1 ; Build value of Event Clear 2 Register
|
||||
STW A1,*A0 ; Clear Timer Event
|
||||
|
||||
|
||||
MVK_LH _tx_timer_interrupt,A0
|
||||
B A0 ; Branch ThreadX timer ISR routine
|
||||
NOP 5 ; Delay slots
|
||||
NOP
|
||||
|
||||
|
||||
|
||||
.global _tx_int5_vector
|
||||
.global _tx_int5_vector_processing
|
||||
_tx_int5_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int5_vector_processing,B3
|
||||
MVKH _tx_int5_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int5_vector_processing:
|
||||
CALLP tx_int5_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int6_vector
|
||||
.global _tx_int6_vector_processing
|
||||
_tx_int6_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int6_vector_processing,B3
|
||||
MVKH _tx_int6_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int6_vector_processing:
|
||||
CALLP tx_int6_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int7_vector
|
||||
.global _tx_int7_vector_processing
|
||||
_tx_int7_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int7_vector_processing,B3
|
||||
MVKH _tx_int7_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int7_vector_processing:
|
||||
CALLP tx_int7_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int8_vector
|
||||
.global _tx_int8_vector_processing
|
||||
_tx_int8_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int8_vector_processing,B3
|
||||
MVKH _tx_int8_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int8_vector_processing:
|
||||
CALLP tx_int8_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int9_vector
|
||||
.global _tx_int9_vector_processing
|
||||
_tx_int9_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int9_vector_processing,B3
|
||||
MVKH _tx_int9_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int9_vector_processing:
|
||||
CALLP tx_int9_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int10_vector
|
||||
.global _tx_int10_vector_processing
|
||||
_tx_int10_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int10_vector_processing,B3
|
||||
MVKH _tx_int10_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int10_vector_processing:
|
||||
CALLP tx_int10_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int11_vector
|
||||
.global _tx_int11_vector_processing
|
||||
_tx_int11_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int11_vector_processing,B3
|
||||
MVKH _tx_int11_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int11_vector_processing:
|
||||
CALLP tx_int11_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int12_vector
|
||||
.global _tx_int12_vector_processing
|
||||
_tx_int12_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int12_vector_processing,B3
|
||||
MVKH _tx_int12_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int12_vector_processing:
|
||||
CALLP tx_int12_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int13_vector
|
||||
.global _tx_int13_vector_processing
|
||||
_tx_int13_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int13_vector_processing,B3
|
||||
MVKH _tx_int13_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int13_vector_processing:
|
||||
CALLP tx_int13_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int14_vector
|
||||
.global _tx_int14_vector_processing
|
||||
_tx_int14_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int14_vector_processing,B3
|
||||
MVKH _tx_int14_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int14_vector_processing:
|
||||
CALLP tx_int14_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
.global _tx_int15_vector
|
||||
.global _tx_int15_vector_processing
|
||||
_tx_int15_vector:
|
||||
TX_INTERRUPT_ENTRY
|
||||
;
|
||||
; /* Application specific processing goes here! */
|
||||
;
|
||||
MVKL _tx_int15_vector_processing,B3
|
||||
MVKH _tx_int15_vector_processing,B3
|
||||
NOP 3
|
||||
_tx_int15_vector_processing:
|
||||
CALLP tx_int15_handler,B3 ; CALLP instruction should be used here to call handler and save return address to B3
|
||||
TX_INTERRUPT_EXIT
|
||||
|
||||
|
||||
12
ports/c667x/ccs/example_build/tx/.ccsproject
Normal file
12
ports/c667x/ccs/example_build/tx/.ccsproject
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<deviceVariant value="com.ti.ccstudio.deviceModel.C6000.GenericC62xxDevice"/>
|
||||
<deviceFamily value="C6000"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="7.3.4"/>
|
||||
<isElfFormat value="false"/>
|
||||
<connection value=""/>
|
||||
<templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
|
||||
<isTargetManual value="false"/>
|
||||
</projectOptions>
|
||||
126
ports/c667x/ccs/example_build/tx/.cproject
Normal file
126
ports/c667x/ccs/example_build/tx/.cproject
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="lib" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.2.libraryDebugToolchain.1327787266" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.libraryDebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianDebug.1999522240">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.595213316" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS320C66XX.TMS320C6678"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=staticLibrary"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1102326510" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.2.5" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.targetPlatformDebug.1885281669" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.builderDebug.1552990214" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="true" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.compilerDebug.537602571" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION.504082056" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.1773772732" name="Application binary interface (coffabi not supported) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.702613718" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH.1880977296" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/inc_generic}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/inc_port}"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE.1699221181" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="TX_ENABLE_EVENT_TRACE"/>
|
||||
<listOptionValue builtIn="false" value="TX_ENABLE_STACK_CHECKING"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER.2004467600" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING.2039373439" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS.1047893315" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS.1584200101" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS.1222315488" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS.1917028109" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianDebug.1999522240" name="C6000 Archiver" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.archiverID.OUTPUT_FILE.180454448" name="Output file" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.archiverID.OUTPUT_FILE" value="${ProjName}.lib" valueType="string"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Release.758214915">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Release.758214915" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="lib" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.C6000.Release.758214915" name="Release" parent="com.ti.ccstudio.buildDefinitions.C6000.Release">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Release.758214915." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.ReleaseToolchain.1136091576" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianRelease.1477572467">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2111880104" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS320C66XX.TMS320C6678"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=staticLibrary"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1971817502" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.2.5" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.targetPlatformRelease.1939700034" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.targetPlatformRelease"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.builderRelease.567122587" name="GNU Make.Release" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="true" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.builderRelease"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.compilerRelease.1419235652" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.compilerRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION.1154568986" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.1566621045" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH.894819299" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER.1459970438" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING.1863284507" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS.853854688" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS.544305463" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS.1665595500" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS.219132884" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianRelease.1477572467" name="C6000 Archiver" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.library.librarianRelease">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.C6000_8.2.archiverID.OUTPUT_FILE.256691019" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.2.archiverID.OUTPUT_FILE" value="${ProjName}.lib" valueType="string"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="tx.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1433968872" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
||||
<project-mappings>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
|
||||
</project-mappings>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
105
ports/c667x/ccs/example_build/tx/.project
Normal file
105
ports/c667x/ccs/example_build/tx/.project
Normal file
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tx</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-k</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>${CCS_UTILS_DIR}/bin/gmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${BuildDirectory}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.ti.ccstudio.core.ccsNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>inc_generic</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/common/inc</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>inc_port</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/inc</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_generic</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/common/src</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_port</name>
|
||||
<type>2</type>
|
||||
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/src</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
@@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
environment/project/com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006/append=true
|
||||
environment/project/com.ti.ccstudio.buildDefinitions.C6000.Debug.832256006/appendContributed=true
|
||||
environment/project/com.ti.ccstudio.buildDefinitions.C6000.Release.758214915/append=true
|
||||
environment/project/com.ti.ccstudio.buildDefinitions.C6000.Release.758214915/appendContributed=true
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
|
||||
@@ -0,0 +1,6 @@
|
||||
#Fri Aug 03 15:02:35 PDT 2012
|
||||
com.ti.ccstudio.buildDefinitions.C6000.Debug.2070078368/internalBuilder/enabled=false
|
||||
com.ti.ccstudio.buildDefinitions.C6000.Debug.2070078368/internalBuilder/ignoreErr=true
|
||||
com.ti.ccstudio.buildDefinitions.C6000.Release.664540310/internalBuilder/enabled=false
|
||||
com.ti.ccstudio.buildDefinitions.C6000.Release.664540310/internalBuilder/ignoreErr=true
|
||||
eclipse.preferences.version=1
|
||||
@@ -0,0 +1,15 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/src_generic/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/src_generic/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/src_port/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/src_port/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
encoding//Release/makefile=UTF-8
|
||||
encoding//Release/objects.mk=UTF-8
|
||||
encoding//Release/sources.mk=UTF-8
|
||||
encoding//Release/subdir_rules.mk=UTF-8
|
||||
encoding//Release/subdir_vars.mk=UTF-8
|
||||
1
ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt
Normal file
1
ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt
Normal file
File diff suppressed because one or more lines are too long
8
ports/c667x/ccs/example_build/tx/Release/objects.mk
Normal file
8
ports/c667x/ccs/example_build/tx/Release/objects.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS :=
|
||||
|
||||
110
ports/c667x/ccs/example_build/tx/Release/sources.mk
Normal file
110
ports/c667x/ccs/example_build/tx/Release/sources.mk
Normal file
@@ -0,0 +1,110 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
C55_SRCS :=
|
||||
A_SRCS :=
|
||||
ASM_UPPER_SRCS :=
|
||||
LDS_UPPER_SRCS :=
|
||||
CPP_SRCS :=
|
||||
CMD_SRCS :=
|
||||
O_SRCS :=
|
||||
C??_SRCS :=
|
||||
C64_SRCS :=
|
||||
C67_SRCS :=
|
||||
SA_SRCS :=
|
||||
S64_SRCS :=
|
||||
OPT_SRCS :=
|
||||
CXX_SRCS :=
|
||||
S67_SRCS :=
|
||||
S??_SRCS :=
|
||||
PDE_SRCS :=
|
||||
SV7A_SRCS :=
|
||||
K_SRCS :=
|
||||
CLA_SRCS :=
|
||||
S55_SRCS :=
|
||||
LD_UPPER_SRCS :=
|
||||
INO_SRCS :=
|
||||
LIB_SRCS :=
|
||||
ASM_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
S43_SRCS :=
|
||||
LD_SRCS :=
|
||||
CMD_UPPER_SRCS :=
|
||||
C_UPPER_SRCS :=
|
||||
C++_SRCS :=
|
||||
C43_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
LDS_SRCS :=
|
||||
S_SRCS :=
|
||||
CC_SRCS :=
|
||||
S62_SRCS :=
|
||||
C62_SRCS :=
|
||||
C_SRCS :=
|
||||
C55_DEPS :=
|
||||
C_UPPER_DEPS :=
|
||||
S67_DEPS :=
|
||||
S62_DEPS :=
|
||||
S_DEPS :=
|
||||
OPT_DEPS :=
|
||||
C??_DEPS :=
|
||||
ASM_UPPER_DEPS :=
|
||||
S??_DEPS :=
|
||||
C64_DEPS :=
|
||||
CXX_DEPS :=
|
||||
S64_DEPS :=
|
||||
INO_DEPS :=
|
||||
CLA_DEPS :=
|
||||
S55_DEPS :=
|
||||
SV7A_DEPS :=
|
||||
C62_DEPS :=
|
||||
C67_DEPS :=
|
||||
PDE_DEPS :=
|
||||
K_DEPS :=
|
||||
C_DEPS :=
|
||||
LIB_OUTPUTS :=
|
||||
CC_DEPS :=
|
||||
C++_DEPS :=
|
||||
C43_DEPS :=
|
||||
S43_DEPS :=
|
||||
OBJS :=
|
||||
ASM_DEPS :=
|
||||
S_UPPER_DEPS :=
|
||||
CPP_DEPS :=
|
||||
SA_DEPS :=
|
||||
C++_DEPS__QUOTED :=
|
||||
OPT_DEPS__QUOTED :=
|
||||
S_UPPER_DEPS__QUOTED :=
|
||||
SA_DEPS__QUOTED :=
|
||||
C??_DEPS__QUOTED :=
|
||||
S67_DEPS__QUOTED :=
|
||||
C55_DEPS__QUOTED :=
|
||||
CC_DEPS__QUOTED :=
|
||||
ASM_UPPER_DEPS__QUOTED :=
|
||||
SV7A_DEPS__QUOTED :=
|
||||
S??_DEPS__QUOTED :=
|
||||
OBJS__QUOTED :=
|
||||
C67_DEPS__QUOTED :=
|
||||
LIB_OUTPUTS__QUOTED :=
|
||||
K_DEPS__QUOTED :=
|
||||
S55_DEPS__QUOTED :=
|
||||
INO_DEPS__QUOTED :=
|
||||
C62_DEPS__QUOTED :=
|
||||
C_DEPS__QUOTED :=
|
||||
C_UPPER_DEPS__QUOTED :=
|
||||
C43_DEPS__QUOTED :=
|
||||
CPP_DEPS__QUOTED :=
|
||||
C64_DEPS__QUOTED :=
|
||||
CXX_DEPS__QUOTED :=
|
||||
CLA_DEPS__QUOTED :=
|
||||
S_DEPS__QUOTED :=
|
||||
ASM_DEPS__QUOTED :=
|
||||
S43_DEPS__QUOTED :=
|
||||
S64_DEPS__QUOTED :=
|
||||
S62_DEPS__QUOTED :=
|
||||
PDE_DEPS__QUOTED :=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS := \
|
||||
. \
|
||||
|
||||
22
ports/c667x/ccs/example_build/tx/Release/subdir_rules.mk
Normal file
22
ports/c667x/ccs/example_build/tx/Release/subdir_rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL = cmd.exe
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
%.obj: ../%.c $(GEN_OPTS) | $(GEN_FILES)
|
||||
@echo 'Building file: "$<"'
|
||||
@echo 'Invoking: C6000 Compiler'
|
||||
"C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --abi=eabi -O2 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="$(basename $(<F)).d_raw" $(GEN_OPTS__FLAG) "$<"
|
||||
@echo 'Finished building: "$<"'
|
||||
@echo ' '
|
||||
|
||||
%.obj: ../%.asm $(GEN_OPTS) | $(GEN_FILES)
|
||||
@echo 'Building file: "$<"'
|
||||
@echo 'Invoking: C6000 Compiler'
|
||||
"C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --abi=eabi -O2 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="$(basename $(<F)).d_raw" $(GEN_OPTS__FLAG) "$<"
|
||||
@echo 'Finished building: "$<"'
|
||||
@echo ' '
|
||||
|
||||
|
||||
1174
ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk
Normal file
1174
ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk
Normal file
File diff suppressed because it is too large
Load Diff
277
ports/c667x/ccs/inc/tx_port.h
Normal file
277
ports/c667x/ccs/inc/tx_port.h
Normal file
@@ -0,0 +1,277 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Port Specific */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* tx_port.h C667x/TI */
|
||||
/* 6.0.1 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file contains data type definitions that make the ThreadX */
|
||||
/* real-time kernel function identically on a variety of different */
|
||||
/* processor architectures. For example, the size or number of bits */
|
||||
/* in an "int" data type vary between microprocessor architectures and */
|
||||
/* even C compilers for the same microprocessor. ThreadX does not */
|
||||
/* directly use native C data types. Instead, ThreadX creates its */
|
||||
/* own special types that can be mapped to actual data types by this */
|
||||
/* file to guarantee consistency in the interface and functionality. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_PORT_H
|
||||
#define TX_PORT_H
|
||||
|
||||
|
||||
/* Determine if the optional ThreadX user define file should be used. */
|
||||
|
||||
#ifdef TX_INCLUDE_USER_DEFINE_FILE
|
||||
|
||||
|
||||
/* Yes, include the user defines in tx_user.h. The defines in this file may
|
||||
alternately be defined on the command line. */
|
||||
|
||||
#include "tx_user.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Define compiler library include files. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <c6x.h>
|
||||
|
||||
|
||||
/* Define ThreadX basic types for this port. */
|
||||
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef unsigned char UCHAR;
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef int LONG;
|
||||
typedef unsigned int ULONG;
|
||||
typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
|
||||
|
||||
/* Define the priority levels for ThreadX. Legal values range
|
||||
from 32 to 1024 and MUST be evenly divisible by 32. */
|
||||
|
||||
#ifndef TX_MAX_PRIORITIES
|
||||
#define TX_MAX_PRIORITIES 32
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the minimum stack for a ThreadX thread on this processor. If the size supplied during
|
||||
thread creation is less than this value, the thread create call will return an error. */
|
||||
|
||||
#ifndef TX_MINIMUM_STACK
|
||||
#define TX_MINIMUM_STACK 400 /* Minimum stack size for this port */
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the system timer thread's default stack size and priority. These are only applicable
|
||||
if TX_TIMER_PROCESS_IN_ISR is not defined. */
|
||||
|
||||
#ifndef TX_TIMER_THREAD_STACK_SIZE
|
||||
#define TX_TIMER_THREAD_STACK_SIZE 2048 /* Default timer thread stack size */
|
||||
#endif
|
||||
|
||||
#ifndef TX_TIMER_THREAD_PRIORITY
|
||||
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
|
||||
#endif
|
||||
|
||||
|
||||
/* Define various constants for the ThreadX C6xxx port. */
|
||||
|
||||
#define TX_INT_DISABLE 0x00 /* Disable interrupts */
|
||||
#define TX_INT_ENABLE 0x01 /* Enable interrupts */
|
||||
|
||||
|
||||
#ifndef TX_TIMER_TICKS_PER_SECOND
|
||||
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
|
||||
For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
|
||||
source constants would be:
|
||||
|
||||
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
|
||||
#define TX_TRACE_TIME_MASK 0x0000FFFFUL
|
||||
|
||||
*/
|
||||
/*
|
||||
#ifndef TX_TRACE_TIME_SOURCE
|
||||
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x01f0c014)
|
||||
#endif
|
||||
#ifndef TX_TRACE_TIME_MASK
|
||||
#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Define the port specific options for the _tx_build_options variable. This variable indicates
|
||||
how the ThreadX library was built. */
|
||||
|
||||
#define TX_PORT_SPECIFIC_BUILD_OPTIONS 0
|
||||
|
||||
|
||||
/* Define the in-line initialization constant so that modules with in-line
|
||||
initialization capabilities can prevent their initialization from being
|
||||
a function call. */
|
||||
|
||||
#define TX_INLINE_INITIALIZATION
|
||||
|
||||
|
||||
/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
|
||||
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
|
||||
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
|
||||
define is negated, thereby forcing the stack fill which is necessary for the stack checking
|
||||
logic. */
|
||||
|
||||
#ifdef TX_ENABLE_STACK_CHECKING
|
||||
#undef TX_DISABLE_STACK_FILLING
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the TX_THREAD control block extensions for this port. The main reason
|
||||
for the multiple macros is so that backward compatibility can be maintained with
|
||||
existing ThreadX kernel awareness modules. */
|
||||
|
||||
#define TX_THREAD_EXTENSION_0
|
||||
#define TX_THREAD_EXTENSION_1
|
||||
#define TX_THREAD_EXTENSION_2
|
||||
#define TX_THREAD_EXTENSION_3
|
||||
|
||||
|
||||
/* Define the port extensions of the remaining ThreadX objects. */
|
||||
|
||||
#define TX_BLOCK_POOL_EXTENSION
|
||||
#define TX_BYTE_POOL_EXTENSION
|
||||
#define TX_EVENT_FLAGS_GROUP_EXTENSION
|
||||
#define TX_MUTEX_EXTENSION
|
||||
#define TX_QUEUE_EXTENSION
|
||||
#define TX_SEMAPHORE_EXTENSION
|
||||
#define TX_TIMER_EXTENSION
|
||||
/*
|
||||
#define TX_TIMER_INTERNAL_EXTENSION ULONG tx_timer_internal_padding;
|
||||
*/
|
||||
|
||||
/* Define the user extension field of the thread control block. Nothing
|
||||
additional is needed for this port so it is defined as white space. */
|
||||
|
||||
#ifndef TX_THREAD_USER_EXTENSION
|
||||
#define TX_THREAD_USER_EXTENSION
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the macros for processing extensions in tx_thread_create, tx_thread_delete,
|
||||
tx_thread_shell_entry, and tx_thread_terminate. */
|
||||
|
||||
|
||||
#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
|
||||
#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
|
||||
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
|
||||
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
|
||||
|
||||
|
||||
/* Define the ThreadX object creation extensions for the remaining objects. */
|
||||
|
||||
#define TX_BLOCK_POOL_CREATE_EXTENSION(pool_ptr)
|
||||
#define TX_BYTE_POOL_CREATE_EXTENSION(pool_ptr)
|
||||
#define TX_EVENT_FLAGS_GROUP_CREATE_EXTENSION(group_ptr)
|
||||
#define TX_MUTEX_CREATE_EXTENSION(mutex_ptr)
|
||||
#define TX_QUEUE_CREATE_EXTENSION(queue_ptr)
|
||||
#define TX_SEMAPHORE_CREATE_EXTENSION(semaphore_ptr)
|
||||
#define TX_TIMER_CREATE_EXTENSION(timer_ptr)
|
||||
|
||||
|
||||
/* Define the ThreadX object deletion extensions for the remaining objects. */
|
||||
|
||||
#define TX_BLOCK_POOL_DELETE_EXTENSION(pool_ptr)
|
||||
#define TX_BYTE_POOL_DELETE_EXTENSION(pool_ptr)
|
||||
#define TX_EVENT_FLAGS_GROUP_DELETE_EXTENSION(group_ptr)
|
||||
#define TX_MUTEX_DELETE_EXTENSION(mutex_ptr)
|
||||
#define TX_QUEUE_DELETE_EXTENSION(queue_ptr)
|
||||
#define TX_SEMAPHORE_DELETE_EXTENSION(semaphore_ptr)
|
||||
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
|
||||
|
||||
|
||||
/* Define ThreadX interrupt lockout and restore macros for protection on
|
||||
access of critical kernel information. The restore interrupt macro must
|
||||
restore the interrupt posture of the running thread prior to the value
|
||||
present prior to the disable macro. In most cases, the save area macro
|
||||
is used to define a local function save area for the disable and restore
|
||||
macros. */
|
||||
|
||||
#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
|
||||
|
||||
#ifdef TX_SKIP_INTRINSICS
|
||||
unsigned int _tx_thread_interrupt_control(unsigned int);
|
||||
|
||||
#define TX_DISABLE interrupt_save = _tx_thread_interrupt_control(TX_INT_DISABLE);
|
||||
#define TX_RESTORE _tx_thread_interrupt_control(interrupt_save);
|
||||
#else
|
||||
#define TX_DISABLE interrupt_save = _disable_interrupts();
|
||||
#define TX_RESTORE _restore_interrupts(interrupt_save);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the interrupt lockout macros for each ThreadX object. */
|
||||
|
||||
#define TX_BLOCK_POOL_DISABLE TX_DISABLE
|
||||
#define TX_BYTE_POOL_DISABLE TX_DISABLE
|
||||
#define TX_EVENT_FLAGS_GROUP_DISABLE TX_DISABLE
|
||||
#define TX_MUTEX_DISABLE TX_DISABLE
|
||||
#define TX_QUEUE_DISABLE TX_DISABLE
|
||||
#define TX_SEMAPHORE_DISABLE TX_DISABLE
|
||||
|
||||
|
||||
/* Define the version ID of ThreadX. This may be utilized by the application. */
|
||||
|
||||
#ifdef TX_THREAD_INIT
|
||||
CHAR _tx_version_id[] =
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX C667x/TI Version 6.0 *";
|
||||
#else
|
||||
extern CHAR _tx_version_id[];
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
248
ports/c667x/ccs/readme_threadx.txt
Normal file
248
ports/c667x/ccs/readme_threadx.txt
Normal file
@@ -0,0 +1,248 @@
|
||||
Microsoft's Azure RTOS ThreadX for TMS320C667x
|
||||
|
||||
Using the TI Code Composer Tools
|
||||
|
||||
1. Installation
|
||||
|
||||
TI Code Composer Studio and the TI MCSDK must be installed prior to
|
||||
building ThreadX. The following links can be used to download these
|
||||
packages:
|
||||
|
||||
|
||||
http://processors.wiki.ti.com/index.php/Download_CCS
|
||||
http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html
|
||||
|
||||
It is assumed the tools are installed in the default directories:
|
||||
|
||||
CCS path by default - c:\ti\ccsv(version number)
|
||||
MCSDK path by default - c:\ti
|
||||
|
||||
If the packages are installed in different directories, the ThreadX project
|
||||
settings must be adjusted.
|
||||
|
||||
2. Open the Azure RTOS Workspace
|
||||
|
||||
In order to build the ThreadX library and the ThreadX demonstration first open
|
||||
the Azure RTOS Workspace inside your ThreadX installation directory.
|
||||
|
||||
|
||||
3. Building the ThreadX run-time Library
|
||||
|
||||
Building the ThreadX library is easy; simply import the CCS project file
|
||||
"tx" and then select the build button. You should now observe the compilation
|
||||
and assembly of the ThreadX library. This project build produces the ThreadX
|
||||
library file tx.lib.
|
||||
|
||||
|
||||
4. Demonstration System
|
||||
|
||||
The ThreadX demonstration is designed to execute on the C6678EVM evaluation board.
|
||||
|
||||
Building the demonstration is easy; simply import the "sample_threadx_c6678evm" project.
|
||||
Now select "Project -> Build Active Project" to build the ThreadX demonstration,
|
||||
which produces the sample_threadx.out file in the "Debug" directory. You are now
|
||||
ready to run the ThreadX demonstration on the C6678EVM evaluation board.
|
||||
|
||||
Please refer to Chapter 6 of the ThreadX User Guide for a complete description
|
||||
of this demonstration.
|
||||
|
||||
|
||||
5. System Initialization
|
||||
|
||||
The entry point in ThreadX for the TMS320C667x using the TI tools is at label
|
||||
_c_int00. This is defined within the TI library. In addition, this is
|
||||
where all static and global pre-set C variable initialization processing
|
||||
takes place.
|
||||
|
||||
The ThreadX initialization file tx_initialize_low_level.asm is responsible
|
||||
for setting up various system data structures, the vector area, and a periodic
|
||||
timer interrupt source. By default, the vector area is defined to be located in
|
||||
the "vectors" section, which is defined at the top of tx_initialize_low_level.asm.
|
||||
This area is located at address 0 for the demonstration.
|
||||
|
||||
tx_initialize_low_level.asm is also where initialization of a periodic timer
|
||||
interrupt source should take place.
|
||||
|
||||
In addition, _tx_initialize_low_level determines the first available address
|
||||
for use by the application. By default, free memory is assumed to start after
|
||||
the .zend section in RAM (defined in tx_initialize_low_level). This section
|
||||
must be placed at the end of your other RAM sections. Please see sample_threadx.cmd
|
||||
for an example. The address of this section is passed to the application definition
|
||||
function, tx_application_define.
|
||||
|
||||
|
||||
6. Register Usage and Stack Frames
|
||||
|
||||
The TI TMS320C667x compiler assumes that registers A0-A9, A16-A31, B0-B9, and
|
||||
B16-B31 are scratch registers for each function. All other registers used by
|
||||
a C function must be preserved by the function. ThreadX takes advantage of this
|
||||
in situations where a context switch happens as a result of making a ThreadX
|
||||
service call (which is itself a C function). In such cases, the saved context
|
||||
of a thread is only the non-scratch registers.
|
||||
|
||||
The following defines the saved context stack frames for context switches
|
||||
that occur as a result of interrupt handling or from thread-level API calls.
|
||||
All suspended threads have one of these two types of stack frames. The top
|
||||
of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
|
||||
associated thread control block TX_THREAD.
|
||||
|
||||
|
||||
|
||||
Offset Interrupted Stack Frame Non-Interrupt Stack Frame
|
||||
|
||||
0x04 1 0
|
||||
0x08 CSR CSR
|
||||
0x0C IPR B3
|
||||
0x10 AMR AMR
|
||||
0x14 A0 A10
|
||||
0x18 A1 A11
|
||||
0x1C A2 A12
|
||||
0x20 A3 A13
|
||||
0x24 A4 A14
|
||||
0x28 A5 A15
|
||||
0x2C A6 B10
|
||||
0x30 A7 B11
|
||||
0x34 A8 B12
|
||||
0x38 A9 B13
|
||||
0x3C A10 ILC
|
||||
0x40 A11 RILC
|
||||
0x44 A12
|
||||
0x48 A13
|
||||
0x4C A14
|
||||
0x50 A15
|
||||
0x54 B0
|
||||
0x58 B1
|
||||
0x5C B2
|
||||
0x60 B3
|
||||
0x64 B4
|
||||
0x68 B5
|
||||
0x6C B6
|
||||
0x70 B7
|
||||
0x74 B8
|
||||
0x78 B9
|
||||
0x7C B10
|
||||
0x80 B11
|
||||
0x84 B12
|
||||
0x88 B13
|
||||
0x8C A16
|
||||
0x90 A17
|
||||
0x94 A18
|
||||
0x98 A19
|
||||
0x9C A20
|
||||
0xA0 A21
|
||||
0xA4 A22
|
||||
0xA8 A23
|
||||
0xAC A24
|
||||
0xB0 A25
|
||||
0xB4 A26
|
||||
0xB8 A27
|
||||
0xBC A28
|
||||
0xC0 A29
|
||||
0xC4 A30
|
||||
0xC8 A31
|
||||
0xCC B16
|
||||
0xD0 B17
|
||||
0xD4 B18
|
||||
0xD8 B19
|
||||
0xDC B20
|
||||
0xE0 B21
|
||||
0xE4 B22
|
||||
0xE8 B23
|
||||
0xEC B24
|
||||
0xF0 B25
|
||||
0xF4 B26
|
||||
0xF8 B27
|
||||
0xFC B28
|
||||
0x100 B29
|
||||
0x104 B30
|
||||
0x108 B31
|
||||
0x10C ILC
|
||||
0x110 RILC
|
||||
0x114 ITSR
|
||||
|
||||
|
||||
7. Improving Performance
|
||||
|
||||
The distribution version of ThreadX is built without any compiler
|
||||
optimizations. This makes it easy to debug because you can trace or set
|
||||
breakpoints inside of ThreadX itself. Of course, this costs some performance.
|
||||
To make it run faster, you can replace the -g compiler option
|
||||
to a -O3 in the ThreadX project file to enable all compiler optimizations.
|
||||
|
||||
In addition, you can eliminate the ThreadX basic API error checking by
|
||||
compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
|
||||
defined.
|
||||
|
||||
|
||||
8. Interrupt Handling
|
||||
|
||||
ThreadX provides complete and high-performance interrupt handling for
|
||||
TMS320C667x targets. There are a certain set of requirements that are
|
||||
defined in the following sub-sections:
|
||||
|
||||
|
||||
8.1 Vector Area
|
||||
|
||||
The TMS320C667x interrupt vectors at in the section "vectors" and is defined at
|
||||
the top of tx_initialize_low_level.asm. Each interrupt vector entry contains
|
||||
a jump to a template interrupt processing shell.
|
||||
|
||||
|
||||
8.2 Interrupt Service Routine Shells
|
||||
|
||||
The following interrupt processing shells are defined at the bottom of
|
||||
tx_initialize_low_level.asm:
|
||||
|
||||
|
||||
__tx_int4_ISR
|
||||
__tx_int5_ISR
|
||||
__tx_int6_ISR
|
||||
__tx_int7_ISR
|
||||
__tx_int8_ISR
|
||||
__tx_int9_ISR
|
||||
__tx_int10_ISR
|
||||
__tx_int11_ISR
|
||||
__tx_int12_ISR
|
||||
__tx_int13_ISR
|
||||
__tx_int14_ISR
|
||||
__tx_int15_ISR
|
||||
|
||||
Each interrupt ISR is entered with B3, A0-A4 is available (these registers are
|
||||
saved in the initial vector processing). The default interrupt handling
|
||||
includes calls to __tx_thread_context_save and __tx_thread_context_restore.
|
||||
Application ISR processing can be added between the context save/restore
|
||||
calls. Note that only the compiler scratch registers are available for use
|
||||
after context save return to the ISR.
|
||||
|
||||
High-frequency interrupt handlers might not want to perform context
|
||||
save/restore processing on each interrupt. If this is the case, any
|
||||
additional registers used must be saved and restored by the ISR and
|
||||
the interrupt return processing must restore the registers saved by the
|
||||
initial vector processing. This can be accomplished by adding the
|
||||
following code to the end of the custom ISR handling:
|
||||
|
||||
LDW *+SP(20),A0 ; Recover A0
|
||||
LDW *+SP(24),A1 ; Recover A1
|
||||
LDW *+SP(28),A2 ; Recover A2
|
||||
LDW *+SP(32),A3 ; Recover A3
|
||||
B IRP ; Return to point of interrupt
|
||||
|| LDW *+SP(36),A4 ; Recover A4
|
||||
LDW *+SP(96),B3 ; Recover B3
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 3 ; Delay slots
|
||||
|
||||
|
||||
9. Revision History
|
||||
|
||||
For generic code revision information, please refer to the readme_threadx_generic.txt
|
||||
file, which is included in your distribution. The following details the revision
|
||||
information associated with this specific port of ThreadX:
|
||||
|
||||
06/30/2020 Initial ThreadX 6.0.1 version for TMS320C667x using TI Code Composer tools.
|
||||
|
||||
|
||||
Copyright(c) 1996-2020 Microsoft Corporation
|
||||
|
||||
|
||||
https://azure.com/rtos
|
||||
|
||||
343
ports/c667x/ccs/src/tx_thread_context_restore.asm
Normal file
343
ports/c667x/ccs/src/tx_thread_context_restore.asm
Normal file
@@ -0,0 +1,343 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
.global _tx_thread_system_state
|
||||
.global _tx_thread_current_ptr
|
||||
.global _tx_thread_system_stack_ptr
|
||||
.global _tx_thread_execute_ptr
|
||||
.global _tx_timer_time_slice
|
||||
.global _tx_thread_schedule
|
||||
.global _tx_thread_preempt_disable
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_context_restore C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function restores the interrupt context if it is processing a */
|
||||
;/* nested interrupt. If not, it returns to the interrupt thread if no */
|
||||
;/* preemption is necessary. Otherwise, if preemption is necessary or */
|
||||
;/* if no thread was running, the function returns to the scheduler. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* _tx_thread_schedule Thread scheduling routine */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* ISRs Interrupt Service Routines */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_context_restore(VOID)
|
||||
;{
|
||||
.global _tx_thread_context_restore
|
||||
_tx_thread_context_restore:
|
||||
;
|
||||
; /* Lockout interrupts. */
|
||||
;
|
||||
MVC CSR,B0 ; Pickup CSR
|
||||
AND -2,B0,B0 ; Build interrupt lockout value
|
||||
MVC B0,CSR ; Lockout interrupts
|
||||
;
|
||||
; /* Determine if interrupts are nested. */
|
||||
; if (--_tx_thread_system_state)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_thread_system_state,A0 ; Build address of system state
|
||||
MVKH _tx_thread_system_state,A0 ;
|
||||
LDW *A0,A1 ; Pickup system state variable
|
||||
MVKL _tx_thread_current_ptr,A2 ; Build address of current thread ptr
|
||||
NOP 3 ; Delay slots
|
||||
SUB A1,1,A1 ; Decrement system state
|
||||
[!A1] B _tx_thread_not_nested_restore ; If 0, not a nested restore
|
||||
MVKH _tx_thread_current_ptr,A2 ;
|
||||
LDW *A2,A3 ; Pickup current thread pointer
|
||||
STW A1,*A0 ; Store system state
|
||||
NOP 2 ; Delay slots
|
||||
;
|
||||
; /* Interrupts are nested. */
|
||||
;
|
||||
; /* Just recover the saved registers and return to the point of
|
||||
; interrupt. */
|
||||
;
|
||||
LDW *+SP(8),B0 ; Recover saved CSR
|
||||
LDW *+SP(12),B1 ; Recover saved IRP
|
||||
LDW *+SP(16),B2 ; Recover saved AMR
|
||||
LDW *+SP(20),A0 ; Recover A0
|
||||
LDW *+SP(24),A1 ; Recover A1
|
||||
LDW *+SP(28),A2 ; Recover A2
|
||||
LDW *+SP(32),A3 ; Recover A3
|
||||
LDW *+SP(36),A4 ; Recover A4
|
||||
LDW *+SP(40),A5 ; Recover A5
|
||||
LDW *+SP(44),A6 ; Recover A6
|
||||
LDW *+SP(48),A7 ; Recover A7
|
||||
LDW *+SP(52),A8 ; Recover A8
|
||||
LDW *+SP(56),A9 ; Recover A9
|
||||
MVC B0,CSR ; Setup CSR
|
||||
MVC B1,IRP ; Setup IRP
|
||||
MVC B2,AMR ; Setup AMR
|
||||
LDW *+SP(268),B0 ; Recover saved ILC
|
||||
LDW *+SP(272),B1 ; Recover saved RILC
|
||||
LDW *+SP(276),B2 ; Recover saved ITSR
|
||||
NOP 4
|
||||
MVC B0,ILC ; Setup ILC
|
||||
MVC B1,RILC ; Setup RILC
|
||||
MVC B2,ITSR ; Setup ITSR
|
||||
LDW *+SP(84),B0 ; Recover B0
|
||||
LDW *+SP(88),B1 ; Recover B1
|
||||
LDW *+SP(92),B2 ; Recover B2
|
||||
LDW *+SP(100),B4 ; Recover B4
|
||||
LDW *+SP(104),B5 ; Recover B5
|
||||
LDW *+SP(108),B6 ; Recover B6
|
||||
LDW *+SP(112),B7 ; Recover B7
|
||||
LDW *+SP(116),B8 ; Recover B8
|
||||
LDW *+SP(140),A16 ; Recover A16
|
||||
LDW *+SP(144),A17 ; Recover A17
|
||||
LDW *+SP(148),A18 ; Recover A18
|
||||
LDW *+SP(152),A19 ; Recover A19
|
||||
LDW *+SP(156),A20 ; Recover A20
|
||||
LDW *+SP(160),A21 ; Recover A21
|
||||
LDW *+SP(164),A22 ; Recover A22
|
||||
LDW *+SP(168),A23 ; Recover A23
|
||||
LDW *+SP(172),A24 ; Recover A24
|
||||
LDW *+SP(176),A25 ; Recover A25
|
||||
LDW *+SP(180),A26 ; Recover A26
|
||||
LDW *+SP(184),A27 ; Recover A27
|
||||
LDW *+SP(188),A28 ; Recover A28
|
||||
LDW *+SP(192),A29 ; Recover A29
|
||||
LDW *+SP(196),A30 ; Recover A30
|
||||
LDW *+SP(200),A31 ; Recover A31
|
||||
LDW *+SP(204),B16 ; Recover B16
|
||||
LDW *+SP(208),B17 ; Recover B17
|
||||
LDW *+SP(212),B18 ; Recover B18
|
||||
LDW *+SP(216),B19 ; Recover B19
|
||||
LDW *+SP(220),B20 ; Recover B20
|
||||
LDW *+SP(224),B21 ; Recover B21
|
||||
LDW *+SP(228),B22 ; Recover B22
|
||||
LDW *+SP(232),B23 ; Recover B23
|
||||
LDW *+SP(236),B24 ; Recover B24
|
||||
LDW *+SP(240),B25 ; Recover B25
|
||||
LDW *+SP(244),B26 ; Recover B26
|
||||
LDW *+SP(248),B27 ; Recover B27
|
||||
LDW *+SP(252),B28 ; Recover B28
|
||||
LDW *+SP(256),B29 ; Recover B29
|
||||
LDW *+SP(260),B30 ; Recover B30
|
||||
LDW *+SP(264),B31 ; Recover B31
|
||||
B IRP ; Return to point of interrupt
|
||||
|| LDW *+SP(120),B9 ; Recover B9
|
||||
LDW *+SP(96),B3 ; Recover B3
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 3 ; Delay slots
|
||||
;
|
||||
; }
|
||||
_tx_thread_not_nested_restore:
|
||||
;
|
||||
; /* Determine if a thread was interrupted and no preemption is required. */
|
||||
; else if (((_tx_thread_current_ptr) && (_tx_thread_current_ptr == _tx_thread_execute_ptr)
|
||||
; || (_tx_thread_preempt_disable))
|
||||
; {
|
||||
;
|
||||
NOP ; Delay
|
||||
MV A3,A1 ; Move thread pointer into A1
|
||||
[!A1] B _tx_thread_schedule ; If null, idle system restore
|
||||
MVKL _tx_thread_preempt_disable,A0 ; Build preempt disable flag address
|
||||
MVKH _tx_thread_preempt_disable,A0 ;
|
||||
MVKL _tx_thread_execute_ptr,A4 ; Build execute thread pointer
|
||||
MVKH _tx_thread_execute_ptr,A4 ;
|
||||
LDW *A0,B1 ; Pickup preempt disable flag
|
||||
|
||||
LDW *A4,A6 ; Pickup next thread to execute
|
||||
NOP 4 ; Delay slot
|
||||
CMPEQ A6,A1,A7 ; Determine if threads are the same?
|
||||
ADD A7,B1,B1 ; Add results together
|
||||
[B1] B _tx_thread_no_preempt_restore ; If set, skip preeemption
|
||||
LDW *+A1(8),A6 ; Recover thread's stack pointer
|
||||
MVKL _tx_timer_time_slice,A5 ; Build time slice address
|
||||
MVKH _tx_timer_time_slice,A5 ;
|
||||
LDW *A5,B1 ; Pickup current time-slice
|
||||
NOP ; Delay slot
|
||||
;
|
||||
;
|
||||
_tx_thread_preempt_restore:
|
||||
;
|
||||
;
|
||||
MVKL 1,A0 ; Build the interrupt stack type
|
||||
STW A0,*+A6(4) ; Save stack type
|
||||
;
|
||||
; /* Store the remaining registers on the thread's stack. */
|
||||
;
|
||||
STW A10,*+A6(60) ; Save A10
|
||||
STW A11,*+A6(64) ; Save A11
|
||||
STW A12,*+A6(68) ; Save A12
|
||||
STW A13,*+A6(72) ; Save A13
|
||||
STW A14,*+A6(76) ; Save A14
|
||||
STW A15,*+A6(80) ; Save A15 (FP)
|
||||
STW B10,*+A6(124) ; Save B10
|
||||
ADDK 128,A6 ; Move stack pointer
|
||||
STW B11,*+A6(0) ; Save B11
|
||||
STW B12,*+A6(4) ; Save B12
|
||||
STW B13,*+A6(8) ; Save B13
|
||||
;
|
||||
; /* Save the remaining time-slice and disable it. */
|
||||
; if (_tx_timer_time_slice)
|
||||
; {
|
||||
;
|
||||
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
|
||||
; _tx_timer_time_slice = 0;
|
||||
;
|
||||
; }
|
||||
_tx_thread_dont_save_ts:
|
||||
;
|
||||
;
|
||||
; /* Clear the current task pointer. */
|
||||
; _tx_thread_current_ptr = TX_NULL;
|
||||
;
|
||||
; /* Return to the scheduler. */
|
||||
; _tx_thread_schedule();
|
||||
;
|
||||
B _tx_thread_schedule ; Return to scheduler
|
||||
STW B1,*+A1(24) ; Store current time-slice
|
||||
ZERO A3 ; Clear value
|
||||
STW A3,*A2 ; Set current thread pointer to NULL
|
||||
STW A3,*A5 ; Set time slice to 0
|
||||
NOP ; Delay
|
||||
;
|
||||
;
|
||||
_tx_thread_no_preempt_restore:
|
||||
;
|
||||
; /* Restore interrupted thread. */
|
||||
;
|
||||
; /* Pickup the saved stack pointer. */
|
||||
; SP = _tx_thread_current_ptr -> tx_thread_stack_ptr;
|
||||
;
|
||||
; /* Recover the saved context and return to the point of interrupt. */
|
||||
;
|
||||
MV A6,SP ; Setup real stack pointer
|
||||
LDW *+SP(8),B0 ; Recover saved CSR
|
||||
LDW *+SP(12),B1 ; Recover saved IRP
|
||||
LDW *+SP(16),B2 ; Recover saved AMR
|
||||
LDW *+SP(20),A0 ; Recover A0
|
||||
LDW *+SP(24),A1 ; Recover A1
|
||||
LDW *+SP(28),A2 ; Recover A2
|
||||
LDW *+SP(32),A3 ; Recover A3
|
||||
LDW *+SP(36),A4 ; Recover A4
|
||||
LDW *+SP(40),A5 ; Recover A5
|
||||
LDW *+SP(44),A6 ; Recover A6
|
||||
LDW *+SP(48),A7 ; Recover A7
|
||||
LDW *+SP(52),A8 ; Recover A8
|
||||
LDW *+SP(56),A9 ; Recover A9
|
||||
MVC B0,CSR ; Setup CSR
|
||||
MVC B1,IRP ; Setup IRP
|
||||
MVC B2,AMR ; Setup AMR
|
||||
LDW *+SP(268),B0 ; Recover saved ILC
|
||||
LDW *+SP(272),B1 ; Recover saved RILC
|
||||
LDW *+SP(276),B2 ; Recover saved ITSR
|
||||
NOP 4 ; Delay
|
||||
MVC B0,ILC ; Setup ILC
|
||||
MVC B1,RILC ; Setup RILC
|
||||
MVC B2,ITSR ; Setup ITSR
|
||||
LDW *+SP(84),B0 ; Recover B0
|
||||
LDW *+SP(88),B1 ; Recover B1
|
||||
LDW *+SP(92),B2 ; Recover B2
|
||||
LDW *+SP(100),B4 ; Recover B4
|
||||
LDW *+SP(104),B5 ; Recover B5
|
||||
LDW *+SP(108),B6 ; Recover B6
|
||||
LDW *+SP(112),B7 ; Recover B7
|
||||
LDW *+SP(116),B8 ; Recover B8
|
||||
LDW *+SP(140),A16 ; Recover A16
|
||||
LDW *+SP(144),A17 ; Recover A17
|
||||
LDW *+SP(148),A18 ; Recover A18
|
||||
LDW *+SP(152),A19 ; Recover A19
|
||||
LDW *+SP(156),A20 ; Recover A20
|
||||
LDW *+SP(160),A21 ; Recover A21
|
||||
LDW *+SP(164),A22 ; Recover A22
|
||||
LDW *+SP(168),A23 ; Recover A23
|
||||
LDW *+SP(172),A24 ; Recover A24
|
||||
LDW *+SP(176),A25 ; Recover A25
|
||||
LDW *+SP(180),A26 ; Recover A26
|
||||
LDW *+SP(184),A27 ; Recover A27
|
||||
LDW *+SP(188),A28 ; Recover A28
|
||||
LDW *+SP(192),A29 ; Recover A29
|
||||
LDW *+SP(196),A30 ; Recover A30
|
||||
LDW *+SP(200),A31 ; Recover A31
|
||||
LDW *+SP(204),B16 ; Recover B16
|
||||
LDW *+SP(208),B17 ; Recover B17
|
||||
LDW *+SP(212),B18 ; Recover B18
|
||||
LDW *+SP(216),B19 ; Recover B19
|
||||
LDW *+SP(220),B20 ; Recover B20
|
||||
LDW *+SP(224),B21 ; Recover B21
|
||||
LDW *+SP(228),B22 ; Recover B22
|
||||
LDW *+SP(232),B23 ; Recover B23
|
||||
LDW *+SP(236),B24 ; Recover B24
|
||||
LDW *+SP(240),B25 ; Recover B25
|
||||
LDW *+SP(244),B26 ; Recover B26
|
||||
LDW *+SP(248),B27 ; Recover B27
|
||||
LDW *+SP(252),B28 ; Recover B28
|
||||
LDW *+SP(256),B29 ; Recover B29
|
||||
LDW *+SP(260),B30 ; Recover B30
|
||||
LDW *+SP(264),B31 ; Recover B31
|
||||
B IRP ; Return to point of interrupt
|
||||
|| LDW *+SP(120),B9 ; Recover B9
|
||||
LDW *+SP(96),B3 ; Recover B3
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 3 ; Delay slots
|
||||
;
|
||||
; }
|
||||
;}
|
||||
|
||||
274
ports/c667x/ccs/src/tx_thread_context_save.asm
Normal file
274
ports/c667x/ccs/src/tx_thread_context_save.asm
Normal file
@@ -0,0 +1,274 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
.global _tx_thread_system_state
|
||||
.global _tx_thread_current_ptr
|
||||
.global _tx_thread_system_stack_ptr
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_context_save C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function saves the context of an executing thread in the */
|
||||
;/* beginning of interrupt processing. The function also ensures that */
|
||||
;/* the system stack is used upon return to the calling ISR. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* ISRs */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_context_save(VOID)
|
||||
;{
|
||||
.global _tx_thread_context_save
|
||||
_tx_thread_context_save:
|
||||
;
|
||||
; /* Upon entry to this routine, it is assumed that all interrupts are locked
|
||||
; out, an initial stack frame of 288 bytes has been allocated and registers
|
||||
; A0, A1, A2, A3, A4, and B3 have been saved in the frame. Additionally,
|
||||
; it is assumed that register B3 contains the ISR's return address. */
|
||||
;
|
||||
; /* Check for a nested interrupt condition. */
|
||||
; if (_tx_thread_system_state++)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_thread_system_state,A0 ; Build address of system state
|
||||
MVKH _tx_thread_system_state,A0 ;
|
||||
LDW *A0,A1 ; Pickup current system state
|
||||
STW A5,*+SP(40) ; Save A5
|
||||
STW A6,*+SP(44) ; Save A6
|
||||
STW A7,*+SP(48) ; Save A7
|
||||
STW A8,*+SP(52) ; Save A8
|
||||
[!A1] B _tx_thread_not_nested_save ; If 0, not a nested save condition
|
||||
MVKL _tx_thread_current_ptr,A3 ; Build address of current thread ptr
|
||||
MVKH _tx_thread_current_ptr,A3 ;
|
||||
LDW *A3,A2 ; Pickup current thread pointer
|
||||
ADD 1,A1,A1 ; Increment the system state (nested) counter
|
||||
STW A1,*A0 ; Store system state
|
||||
;
|
||||
; /* Nested interrupt condition. Save remaining scratch registers, and control registers
|
||||
; and return to calling ISR. */
|
||||
;
|
||||
STW A9,*+SP(56) ; Save A9
|
||||
STW B0,*+SP(84) ; Save B0
|
||||
STW B1,*+SP(88) ; Save B1
|
||||
STW B2,*+SP(92) ; Save B2
|
||||
; B3 is already saved!
|
||||
STW B4,*+SP(100) ; Save B4
|
||||
STW B5,*+SP(104) ; Save B5
|
||||
STW B6,*+SP(108) ; Save B6
|
||||
STW B7,*+SP(112) ; Save B7
|
||||
STW B8,*+SP(116) ; Save B8
|
||||
STW B9,*+SP(120) ; Save B9
|
||||
MVC CSR,B0 ; Pickup CSR
|
||||
B B3 ; Return to calling ISR
|
||||
MVC IRP,B1 ; Pickup IRP
|
||||
MVC AMR,B2 ; Pickup AMR
|
||||
STW B0,*+SP(8) ; Save CSR
|
||||
STW B1,*+SP(12) ; Save IRP
|
||||
STW B2,*+SP(16) ; Save AMR
|
||||
ZERO B0 ; Clear B0
|
||||
MVC B0,AMR ; Clear AMR for linear addressing in ISR
|
||||
STW A16,*+SP(140) ; Save A16
|
||||
STW A17,*+SP(144) ; Save A17
|
||||
STW A18,*+SP(148) ; Save A18
|
||||
STW A19,*+SP(152) ; Save A19
|
||||
STW A20,*+SP(156) ; Save A20
|
||||
STW A21,*+SP(160) ; Save A21
|
||||
STW A22,*+SP(164) ; Save A22
|
||||
STW A23,*+SP(168) ; Save A23
|
||||
STW A24,*+SP(172) ; Save A24
|
||||
STW A25,*+SP(176) ; Save A25
|
||||
STW A26,*+SP(180) ; Save A26
|
||||
STW A27,*+SP(184) ; Save A27
|
||||
STW A28,*+SP(188) ; Save A28
|
||||
STW A29,*+SP(192) ; Save A29
|
||||
STW A30,*+SP(196) ; Save A30
|
||||
STW A31,*+SP(200) ; Save A31
|
||||
STW B16,*+SP(204) ; Save B16
|
||||
STW B17,*+SP(208) ; Save B17
|
||||
STW B18,*+SP(212) ; Save B18
|
||||
STW B19,*+SP(216) ; Save B19
|
||||
STW B20,*+SP(220) ; Save B20
|
||||
STW B21,*+SP(224) ; Save B21
|
||||
STW B22,*+SP(228) ; Save B22
|
||||
STW B23,*+SP(232) ; Save B23
|
||||
STW B24,*+SP(236) ; Save B24
|
||||
STW B25,*+SP(240) ; Save B25
|
||||
STW B26,*+SP(244) ; Save B26
|
||||
STW B27,*+SP(248) ; Save B27
|
||||
STW B28,*+SP(252) ; Save B28
|
||||
STW B29,*+SP(256) ; Save B29
|
||||
STW B30,*+SP(260) ; Save B30
|
||||
STW B31,*+SP(264) ; Save B31
|
||||
MVC ILC,B0 ; Pickup ILC
|
||||
MVC RILC,B1 ; Pickup RILC
|
||||
MVC ITSR,B2 ; Pickup ITSR
|
||||
STW B0,*+SP(268) ; Save ILC
|
||||
STW B1,*+SP(272) ; Save RILC
|
||||
STW B2,*+SP(276) ; Save ITSR
|
||||
;
|
||||
_tx_thread_not_nested_save:
|
||||
; }
|
||||
;
|
||||
; /* Otherwise, not nested, check to see if a thread was running. */
|
||||
; else if (_tx_thread_current_ptr)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_thread_system_stack_ptr,A0 ; Build address of system
|
||||
MVKH _tx_thread_system_stack_ptr,A0 ; stack pointer
|
||||
MV A2,A1 ; Transfer to A1 for B compare
|
||||
[!A1] B _tx_thread_idle_system_save ; If Null, idle system save
|
||||
STW A9,*+SP(56) ; Save A9
|
||||
STW B0,*+SP(84) ; Save B0
|
||||
STW B1,*+SP(88) ; Save B1
|
||||
STW B2,*+SP(92) ; Save B2
|
||||
NOP ; Delay slot
|
||||
;
|
||||
; /* At this point, a thread was interrupted and the remainder of its scratch and
|
||||
; control registers must be saved. */
|
||||
;
|
||||
; B3 was already saved!
|
||||
STW B4,*+SP(100) ; Save B4
|
||||
STW B5,*+SP(104) ; Save B5
|
||||
STW B6,*+SP(108) ; Save B6
|
||||
STW B7,*+SP(112) ; Save B7
|
||||
STW B8,*+SP(116) ; Save B8
|
||||
STW B9,*+SP(120) ; Save B9
|
||||
MVC CSR,B0 ; Pickup CSR
|
||||
MVC IRP,B1 ; Pickup IRP
|
||||
MVC AMR,B2 ; Pickup AMR
|
||||
STW B0,*+SP(8) ; Save CSR
|
||||
STW B1,*+SP(12) ; Save IRP
|
||||
STW B2,*+SP(16) ; Save AMR
|
||||
ZERO B0 ; Clear B0
|
||||
MVC B0,AMR ; Clear AMR for linear addressing in ISR
|
||||
STW A16,*+SP(140) ; Save A16
|
||||
STW A17,*+SP(144) ; Save A17
|
||||
STW A18,*+SP(148) ; Save A18
|
||||
STW A19,*+SP(152) ; Save A19
|
||||
STW A20,*+SP(156) ; Save A20
|
||||
STW A21,*+SP(160) ; Save A21
|
||||
STW A22,*+SP(164) ; Save A22
|
||||
STW A23,*+SP(168) ; Save A23
|
||||
STW A24,*+SP(172) ; Save A24
|
||||
STW A25,*+SP(176) ; Save A25
|
||||
STW A26,*+SP(180) ; Save A26
|
||||
STW A27,*+SP(184) ; Save A27
|
||||
STW A28,*+SP(188) ; Save A28
|
||||
STW A29,*+SP(192) ; Save A29
|
||||
STW A30,*+SP(196) ; Save A30
|
||||
STW A31,*+SP(200) ; Save A31
|
||||
STW B16,*+SP(204) ; Save B16
|
||||
STW B17,*+SP(208) ; Save B17
|
||||
STW B18,*+SP(212) ; Save B18
|
||||
STW B19,*+SP(216) ; Save B19
|
||||
STW B20,*+SP(220) ; Save B20
|
||||
STW B21,*+SP(224) ; Save B21
|
||||
STW B22,*+SP(228) ; Save B22
|
||||
STW B23,*+SP(232) ; Save B23
|
||||
STW B24,*+SP(236) ; Save B24
|
||||
STW B25,*+SP(240) ; Save B25
|
||||
STW B26,*+SP(244) ; Save B26
|
||||
STW B27,*+SP(248) ; Save B27
|
||||
STW B28,*+SP(252) ; Save B28
|
||||
STW B29,*+SP(256) ; Save B29
|
||||
STW B30,*+SP(260) ; Save B30
|
||||
STW B31,*+SP(264) ; Save B31
|
||||
MVC ILC,B0 ; Pickup ILC
|
||||
MVC RILC,B1 ; Pickup RILC
|
||||
MVC ITSR,B2 ; Pickup ITSR
|
||||
STW B0,*+SP(268) ; Save ILC
|
||||
STW B1,*+SP(272) ; Save RILC
|
||||
STW B2,*+SP(276) ; Save ITSR
|
||||
;
|
||||
; /* Save the current stack pointer in the thread's control block. */
|
||||
; _tx_thread_current_ptr -> tx_thread_stack_ptr = SP;
|
||||
;
|
||||
; /* Switch to the system stack. */
|
||||
; SP = _tx_thread_system_stack_ptr;
|
||||
;
|
||||
STW SP,*+A1(8) ; Save stack pointer
|
||||
B B3 ; Return to calling ISR
|
||||
LDW *A0,SP ; Switch to system stack
|
||||
NOP 4 ; Stack pointer is valid upon return!
|
||||
;
|
||||
; }
|
||||
; else
|
||||
; {
|
||||
;
|
||||
_tx_thread_idle_system_save:
|
||||
;
|
||||
; /* Interrupt occurred in the scheduling loop. */
|
||||
;
|
||||
; /* Not much to do here, just adjust the stack pointer, and return to ISR
|
||||
; processing. */
|
||||
;
|
||||
B B3 ; Return to ISR
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 4 ; Delay slot
|
||||
;
|
||||
; }
|
||||
;}
|
||||
|
||||
95
ports/c667x/ccs/src/tx_thread_interrupt_control.asm
Normal file
95
ports/c667x/ccs/src/tx_thread_interrupt_control.asm
Normal file
@@ -0,0 +1,95 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_interrupt_control C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function is responsible for changing the interrupt lockout */
|
||||
;/* posture of the system. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* new_posture New interrupt lockout posture */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* old_posture Old interrupt lockout posture */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* Application Code */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;UINT _tx_thread_interrupt_control(UINT new_posture)
|
||||
;{
|
||||
.global _tx_thread_interrupt_control
|
||||
_tx_thread_interrupt_control:
|
||||
;
|
||||
; /* Pickup current interrupt lockout posture. */
|
||||
;
|
||||
MVC CSR,B0 ; Pickup current CSR
|
||||
;
|
||||
; /* Apply the new interrupt posture. */
|
||||
;
|
||||
B B3 ; Return to caller
|
||||
AND -2,B0,B0 ; Clear GIE bit
|
||||
OR A4,B0,B0 ; Build new interrupt posture
|
||||
MVC CSR,B1 ; Return previous posture
|
||||
MVC B0,CSR ; Apply new interrupt posture
|
||||
AND 1,B1,A4 ; Clear non-GIE bits
|
||||
;
|
||||
;}
|
||||
|
||||
254
ports/c667x/ccs/src/tx_thread_schedule.asm
Normal file
254
ports/c667x/ccs/src/tx_thread_schedule.asm
Normal file
@@ -0,0 +1,254 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
;
|
||||
.global _tx_thread_execute_ptr
|
||||
.global _tx_thread_current_ptr
|
||||
.global _tx_timer_time_slice
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_schedule C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function waits for a thread control block pointer to appear in */
|
||||
;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
|
||||
;/* in the variable, the corresponding thread is resumed. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* _tx_initialize_kernel_enter ThreadX entry function */
|
||||
;/* _tx_thread_system_return Return to system from thread */
|
||||
;/* _tx_thread_context_restore Restore thread's context */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_schedule(VOID)
|
||||
;{
|
||||
.global _tx_thread_schedule
|
||||
_tx_thread_schedule
|
||||
;
|
||||
; /* Enable interrupts. */
|
||||
;
|
||||
MVC CSR,B0 ; Pickup current CSR
|
||||
OR 1,B0,B0 ; Build interrupt enable value
|
||||
MVC B0,CSR ; Enable interrupts
|
||||
MVKL _tx_thread_execute_ptr,A0 ; Build address of execute pointer
|
||||
MVKH _tx_thread_execute_ptr,A0 ;
|
||||
;
|
||||
; /* Wait for a thread to execute. */
|
||||
; do
|
||||
; {
|
||||
;
|
||||
_tx_thread_schedule_loop:
|
||||
;
|
||||
LDW *A0,A1 ; Pickup next thread to execute
|
||||
NOP 4 ; Delay slots
|
||||
[!A1] B _tx_thread_schedule_loop ; If Null, just wait here for thread
|
||||
; to become ready
|
||||
MV A1,A4 ; Move thread pointer to A4
|
||||
MVKL _tx_thread_current_ptr,A1 ; Build address of current thread ptr
|
||||
MVKH _tx_thread_current_ptr,A1 ;
|
||||
MVKL _tx_timer_time_slice,A2 ; Build address of time-slice
|
||||
MVKH _tx_timer_time_slice,A2 ;
|
||||
;
|
||||
; }
|
||||
; while(_tx_thread_execute_ptr == TX_NULL);
|
||||
;
|
||||
; /* Yes! We have a thread to execute. Lockout interrupts and
|
||||
; transfer control to it. */
|
||||
;
|
||||
AND -2,B0,B0 ; Build interrupt lockout value
|
||||
MVC B0,CSR ; Lockout interrupts
|
||||
;
|
||||
; /* Setup the current thread pointer. */
|
||||
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
|
||||
;
|
||||
LDW *+A4(4),A3 ; Pickup run-count
|
||||
LDW *+A4(8),SP ; Switch to thread's stack
|
||||
LDW *+A4(24),B1 ; Pickup time-slice
|
||||
STW A4,*A1 ; Setup current pointer
|
||||
NOP ; Delay
|
||||
;
|
||||
; /* Increment the run count for this thread. */
|
||||
; _tx_thread_current_ptr -> tx_thread_run_count++;
|
||||
;
|
||||
ADD 1,A3,A3 ; Increment run-counter
|
||||
LDW *+SP(4),B0 ; Pickup stack-type
|
||||
STW A3,*+A4(4) ; Store run-counter
|
||||
;
|
||||
; /* Setup time-slice, if present. */
|
||||
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
|
||||
;
|
||||
STW B1,*A2 ; Setup time-slice
|
||||
;
|
||||
; /* Switch to the thread's stack. */
|
||||
; SP = _tx_thread_execute_ptr -> tx_thread_stack_ptr;
|
||||
;
|
||||
; /* Determine if an interrupt frame or a synchronous task suspension frame
|
||||
; is present. */
|
||||
;
|
||||
NOP 2 ; Delay slots
|
||||
[B0] B _tx_thread_interrupt_stack ; Look for interrupt stack frame
|
||||
LDW *+SP(8),B0 ; Pickup saved CSR
|
||||
LDW *+SP(12),B3 ; Pickup saved B3/IPR
|
||||
LDW *+SP(16),B1 ; Pickup saved AMR
|
||||
LDW *+SP(20),A10 ; Restore A10
|
||||
LDW *+SP(24),A11 ; Restore A11
|
||||
LDW *+SP(28),A12 ; Restore A12
|
||||
LDW *+SP(32),A13 ; Restore A13
|
||||
MVC B0,CSR ; Restore CSR
|
||||
MVC B1,AMR ; Restore AMR
|
||||
LDW *+SP(36),A14 ; Restore A14
|
||||
LDW *+SP(40),A15 ; Restore A15
|
||||
LDW *+SP(44),B10 ; Restore B10
|
||||
LDW *+SP(48),B11 ; Restore B11
|
||||
LDW *+SP(52),B12 ; Restore B12
|
||||
LDW *+SP(56),B13 ; Restore B13
|
||||
LDW *+SP(60),B0 ; Restore ILC
|
||||
LDW *+SP(64),B1 ; Restore RILC
|
||||
NOP 4 ; Delay slots
|
||||
MVC B0,ILC ; Restore ILC
|
||||
MVC B1,RILC ; Restore RILC
|
||||
B B3 ; Return to caller
|
||||
ADDK 64,SP ; Recover stack space
|
||||
NOP 4 ; Delay slots
|
||||
;
|
||||
_tx_thread_interrupt_stack:
|
||||
MVC B0,CSR ; Restore CSR
|
||||
MVC B3,IRP ; Restore IPR
|
||||
MVC B1,AMR ; Restore AMR
|
||||
LDW *+SP(268),B0 ; Recover saved ILC
|
||||
LDW *+SP(272),B1 ; Recover saved RILC
|
||||
LDW *+SP(276),B2 ; Recover saved ITSR
|
||||
NOP 4 ; Delay
|
||||
MVC B0,ILC ; Setup ILC
|
||||
MVC B1,RILC ; Setup RILC
|
||||
MVC B2,ITSR ; Setup ITSR
|
||||
LDW *+SP(20),A0 ; Recover A0
|
||||
LDW *+SP(24),A1 ; Recover A1
|
||||
LDW *+SP(28),A2 ; Recover A2
|
||||
LDW *+SP(32),A3 ; Recover A3
|
||||
LDW *+SP(36),A4 ; Recover A4
|
||||
LDW *+SP(40),A5 ; Recover A5
|
||||
LDW *+SP(44),A6 ; Recover A6
|
||||
LDW *+SP(48),A7 ; Recover A7
|
||||
LDW *+SP(52),A8 ; Recover A8
|
||||
LDW *+SP(56),A9 ; Recover A9
|
||||
LDW *+SP(60),A10 ; Recover A10
|
||||
LDW *+SP(64),A11 ; Recover A11
|
||||
LDW *+SP(68),A12 ; Recover A12
|
||||
LDW *+SP(72),A13 ; Recover A13
|
||||
LDW *+SP(76),A14 ; Recover A14
|
||||
LDW *+SP(80),A15 ; Recover A15 (FP)
|
||||
LDW *+SP(84),B0 ; Recover B0
|
||||
LDW *+SP(88),B1 ; Recover B1
|
||||
LDW *+SP(92),B2 ; Recover B2
|
||||
LDW *+SP(96),B3 ; Recover B3
|
||||
LDW *+SP(100),B4 ; Recover B4
|
||||
LDW *+SP(104),B5 ; Recover B5
|
||||
LDW *+SP(108),B6 ; Recover B6
|
||||
LDW *+SP(112),B7 ; Recover B7
|
||||
LDW *+SP(116),B8 ; Recover B8
|
||||
LDW *+SP(120),B9 ; Recover B9
|
||||
LDW *+SP(124),B10 ; Recover B10
|
||||
LDW *+SP(128),B11 ; Recover B11
|
||||
LDW *+SP(140),A16 ; Recover A16
|
||||
LDW *+SP(144),A17 ; Recover A17
|
||||
LDW *+SP(148),A18 ; Recover A18
|
||||
LDW *+SP(152),A19 ; Recover A19
|
||||
LDW *+SP(156),A20 ; Recover A20
|
||||
LDW *+SP(160),A21 ; Recover A21
|
||||
LDW *+SP(164),A22 ; Recover A22
|
||||
LDW *+SP(168),A23 ; Recover A23
|
||||
LDW *+SP(172),A24 ; Recover A24
|
||||
LDW *+SP(176),A25 ; Recover A25
|
||||
LDW *+SP(180),A26 ; Recover A26
|
||||
LDW *+SP(184),A27 ; Recover A27
|
||||
LDW *+SP(188),A28 ; Recover A28
|
||||
LDW *+SP(192),A29 ; Recover A29
|
||||
LDW *+SP(196),A30 ; Recover A30
|
||||
LDW *+SP(200),A31 ; Recover A31
|
||||
LDW *+SP(204),B16 ; Recover B16
|
||||
LDW *+SP(208),B17 ; Recover B17
|
||||
LDW *+SP(212),B18 ; Recover B18
|
||||
LDW *+SP(216),B19 ; Recover B19
|
||||
LDW *+SP(220),B20 ; Recover B20
|
||||
LDW *+SP(224),B21 ; Recover B21
|
||||
LDW *+SP(228),B22 ; Recover B22
|
||||
LDW *+SP(232),B23 ; Recover B23
|
||||
LDW *+SP(236),B24 ; Recover B24
|
||||
LDW *+SP(240),B25 ; Recover B25
|
||||
LDW *+SP(244),B26 ; Recover B26
|
||||
LDW *+SP(248),B27 ; Recover B27
|
||||
LDW *+SP(252),B28 ; Recover B28
|
||||
LDW *+SP(256),B29 ; Recover B29
|
||||
LDW *+SP(260),B30 ; Recover B30
|
||||
LDW *+SP(264),B31 ; Recover B31
|
||||
B IRP ; Return to point of interrupt
|
||||
|| LDW *+SP(132),B12 ; Recover B12
|
||||
LDW *+SP(136),B13 ; Recover B13
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 3 ; Delay slots
|
||||
;
|
||||
;}
|
||||
|
||||
257
ports/c667x/ccs/src/tx_thread_stack_build.asm
Normal file
257
ports/c667x/ccs/src/tx_thread_stack_build.asm
Normal file
@@ -0,0 +1,257 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
ADDRESS_MSK .set 0xFFFFFFF0
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_stack_build C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function builds a stack frame on the supplied thread's stack. */
|
||||
;/* The stack frame results in a fake interrupt return to the supplied */
|
||||
;/* function pointer. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* thread_ptr Pointer to thread control blk */
|
||||
;/* function_ptr Pointer to return function */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* _tx_thread_create Create thread service */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
|
||||
;{
|
||||
.global _tx_thread_stack_build
|
||||
_tx_thread_stack_build:
|
||||
;
|
||||
;
|
||||
; /* Build a fake interrupt frame. The form of the fake interrupt stack
|
||||
; on the C667x should look like the following after it is built:
|
||||
;
|
||||
; Stack Top: N/A Available for use
|
||||
; 1 Interrupt stack frame type 4
|
||||
; CSR Initial value for CSR 8
|
||||
; IRP Initial thread entry 12
|
||||
; AMR Initial thread addressing mode 16
|
||||
; A0 Initial A0 20
|
||||
; A1 Initial A1 24
|
||||
; A2 Initial A2 28
|
||||
; A3 Initial A3 32
|
||||
; A4 Initial A4 36
|
||||
; A5 Initial A5 40
|
||||
; A6 Initial A6 44
|
||||
; A7 Initial A7 48
|
||||
; A8 Initial A8 52
|
||||
; A9 Initial A9 56
|
||||
; A10 Initial A10 60
|
||||
; A11 Initial A11 64
|
||||
; A12 Initial A12 68
|
||||
; A13 Initial A13 72
|
||||
; A14 Initial A14 76
|
||||
; A15 (FP) Initial A15 (FP) 80
|
||||
; B0 Initial B0 84
|
||||
; B1 Initial B1 88
|
||||
; B2 Initial B2 92
|
||||
; B3 Initial B3 96
|
||||
; B4 Initial B4 100
|
||||
; B5 Initial B5 104
|
||||
; B6 Initial B6 108
|
||||
; B7 Initial B7 112
|
||||
; B8 Initial B8 116
|
||||
; B9 Initial B9 120
|
||||
; B10 Initial B10 124
|
||||
; B11 Initial B11 128
|
||||
; B12 Initial B12 132
|
||||
; B13 Initial B13 136
|
||||
; A16 Initial A16 140
|
||||
; A17 Initial A17 144
|
||||
; A18 Initial A18 148
|
||||
; A19 Initial A19 152
|
||||
; A20 Initial A20 156
|
||||
; A21 Initial A21 160
|
||||
; A22 Initial A22 164
|
||||
; A23 Initial A23 168
|
||||
; A24 Initial A24 172
|
||||
; A25 Initial A25 176
|
||||
; A26 Initial A26 180
|
||||
; A27 Initial A27 184
|
||||
; A28 Initial A28 188
|
||||
; A29 Initial A29 192
|
||||
; A30 Initial A30 196
|
||||
; A31 Initial A31 200
|
||||
; B16 Initial B16 204
|
||||
; B17 Initial B17 208
|
||||
; B18 Initial B18 212
|
||||
; B19 Initial B19 216
|
||||
; B20 Initial B20 220
|
||||
; B21 Initial B21 224
|
||||
; B22 Initial B22 228
|
||||
; B23 Initial B23 232
|
||||
; B24 Initial B24 236
|
||||
; B25 Initial B25 240
|
||||
; B26 Initial B26 244
|
||||
; B27 Initial B27 248
|
||||
; B28 Initial B28 252
|
||||
; B29 Initial B29 256
|
||||
; B30 Initial B30 260
|
||||
; B31 Initial B31 264
|
||||
; ILC Initial ILC 268
|
||||
; RILC Initial RILC 272
|
||||
; ITSR Initial ITSR 276
|
||||
|
||||
|
||||
;
|
||||
; Stack Bottom: (higher memory address) */
|
||||
;
|
||||
LDW *+A4(16),A0 ; Pickup end of stack area
|
||||
MVKL ADDRESS_MSK,A1 ; Build address mask
|
||||
MVKH ADDRESS_MSK,A1 ;
|
||||
MVC CSR,B0 ; Pickup current CSR
|
||||
AND -2,B0,B0 ; Clear GIE bit
|
||||
OR 2,B0,B0 ; Set PGIE bit for interrupt return
|
||||
AND A1,A0,A0 ; Ensure alignment
|
||||
MVKL 288,A2 ; Calculate stack size
|
||||
SUB A0,A2,A0 ; Allocate space on thread's stack
|
||||
;
|
||||
; /* Actually build the stack frame. */
|
||||
;
|
||||
MVKL 1,A2 ; Build stack type
|
||||
ZERO A3 ; Clear value
|
||||
STW A2,*+A0(4) ; Interrupt stack type
|
||||
STW B0,*+A0(8) ; Initial CSR
|
||||
STW B4,*+A0(12) ; Thread shell entry point
|
||||
STW A3,*+A0(16) ; Initial AMR
|
||||
STW A3,*+A0(20) ; Initial A0
|
||||
STW A3,*+A0(24) ; Initial A1
|
||||
STW A3,*+A0(28) ; Initial A2
|
||||
STW A3,*+A0(32) ; Initial A3
|
||||
STW A3,*+A0(36) ; Initial A4
|
||||
STW A3,*+A0(40) ; Initial A5
|
||||
STW A3,*+A0(44) ; Initial A6
|
||||
STW A3,*+A0(48) ; Initial A7
|
||||
STW A3,*+A0(52) ; Initial A8
|
||||
STW A3,*+A0(56) ; Initial A9
|
||||
STW A3,*+A0(60) ; Initial A10
|
||||
STW A3,*+A0(64) ; Initial A11
|
||||
STW A3,*+A0(68) ; Initial A12
|
||||
STW A3,*+A0(72) ; Initial A13
|
||||
STW A3,*+A0(76) ; Initial A14
|
||||
STW A3,*+A0(80) ; Initial A15
|
||||
STW A3,*+A0(84) ; Initial B0
|
||||
STW A3,*+A0(88) ; Initial B1
|
||||
STW A3,*+A0(92) ; Initial B2
|
||||
STW A3,*+A0(96) ; Initial B3
|
||||
STW A3,*+A0(100) ; Initial B4
|
||||
STW A3,*+A0(104) ; Initial B5
|
||||
STW A3,*+A0(108) ; Initial B6
|
||||
STW A3,*+A0(112) ; Initial B7
|
||||
STW A3,*+A0(116) ; Initial B8
|
||||
STW A3,*+A0(120) ; Initial B9
|
||||
STW A3,*+A0(124) ; Initial B10
|
||||
MVKL 128,A2 ; Stack adjustment value
|
||||
ADD A2,A0,A2 ; Adjust pointer into stack frame
|
||||
STW A3,*+A2(0) ; Initial B11
|
||||
STW A3,*+A2(4) ; Initial B12
|
||||
STW A3,*+A2(8) ; Initial B13
|
||||
STW A3,*+A2(12) ; Initial A16
|
||||
STW A3,*+A2(16) ; Initial A17
|
||||
STW A3,*+A2(20) ; Initial A18
|
||||
STW A3,*+A2(24) ; Initial A19
|
||||
STW A3,*+A2(28) ; Initial A20
|
||||
STW A3,*+A2(32) ; Initial A21
|
||||
STW A3,*+A2(36) ; Initial A22
|
||||
STW A3,*+A2(40) ; Initial A23
|
||||
STW A3,*+A2(44) ; Initial A24
|
||||
STW A3,*+A2(48) ; Initial A25
|
||||
STW A3,*+A2(52) ; Initial A26
|
||||
STW A3,*+A2(56) ; Initial A27
|
||||
STW A3,*+A2(60) ; Initial A28
|
||||
STW A3,*+A2(64) ; Initial A29
|
||||
STW A3,*+A2(68) ; Initial A30
|
||||
STW A3,*+A2(72) ; Initial A31
|
||||
STW A3,*+A2(76) ; Initial B16
|
||||
STW A3,*+A2(80) ; Initial B17
|
||||
STW A3,*+A2(84) ; Initial B18
|
||||
STW A3,*+A2(88) ; Initial B19
|
||||
STW A3,*+A2(92) ; Initial B20
|
||||
STW A3,*+A2(96) ; Initial B21
|
||||
STW A3,*+A2(100) ; Initial B22
|
||||
STW A3,*+A2(104) ; Initial B23
|
||||
STW A3,*+A2(108) ; Initial B24
|
||||
STW A3,*+A2(112) ; Initial B25
|
||||
STW A3,*+A2(116) ; Initial B26
|
||||
STW A3,*+A2(120) ; Initial B27
|
||||
STW A3,*+A2(124) ; Initial B28
|
||||
ADDK 128,A2 ; Adjust stack pointer again
|
||||
STW A3,*+A2(0) ; Initial B29
|
||||
STW A3,*+A2(4) ; Initial B30
|
||||
STW A3,*+A2(8) ; Initial B31
|
||||
B B3 ; Return to caller
|
||||
STW A3,*+A2(12) ; Initial ILC
|
||||
STW A3,*+A2(16) ; Initial RILC
|
||||
MVKL 0x3,B0 ; Build initial ITSR (set GIE and SGIE bits)
|
||||
STW B0,*+A2(20) ; Store ITSR
|
||||
;
|
||||
; /* Setup stack pointer. */
|
||||
; thread_ptr -> tx_thread_stack_ptr = A0;
|
||||
;
|
||||
STW A0,*+A4(8) ; Save stack pointer in thread's
|
||||
; control block
|
||||
;}
|
||||
|
||||
162
ports/c667x/ccs/src/tx_thread_system_return.asm
Normal file
162
ports/c667x/ccs/src/tx_thread_system_return.asm
Normal file
@@ -0,0 +1,162 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Thread */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_thread.h"
|
||||
;#include "tx_timer.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
;
|
||||
.global _tx_thread_current_ptr
|
||||
.global _tx_timer_time_slice
|
||||
.global _tx_thread_schedule
|
||||
.global _tx_thread_system_stack_ptr
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_system_return C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function is target processor specific. It is used to transfer */
|
||||
;/* control from a thread back to the ThreadX system. Only a */
|
||||
;/* minimal context is saved since the compiler assumes temp registers */
|
||||
;/* are going to get slicked by a function call anyway. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* _tx_thread_schedule Thread scheduling loop */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* ThreadX components */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_system_return(VOID)
|
||||
;{
|
||||
.global _tx_thread_system_return
|
||||
_tx_thread_system_return:
|
||||
;
|
||||
; /* Save minimal context on the stack. */
|
||||
;
|
||||
MVC CSR,B0 ; Pickup current CSR
|
||||
MVC AMR,B1 ; Pickup current AMR
|
||||
ADDK -64,SP ; Allocate stack space
|
||||
ZERO B2 ; Build solicited stack type
|
||||
STW B2,*+SP(4) ; Save stack type
|
||||
STW B0,*+SP(8) ; Save CSR
|
||||
STW B3,*+SP(12) ; Save B3 (return address)
|
||||
STW B1,*+SP(16) ; Save AMR
|
||||
STW A10,*+SP(20) ; Save A10
|
||||
STW A11,*+SP(24) ; Save A11
|
||||
STW A12,*+SP(28) ; Save A12
|
||||
STW A13,*+SP(32) ; Save A13
|
||||
STW A14,*+SP(36) ; Save A14
|
||||
STW A15,*+SP(40) ; Save A15
|
||||
STW B10,*+SP(44) ; Save B10
|
||||
STW B11,*+SP(48) ; Save B11
|
||||
STW B12,*+SP(52) ; Save B12
|
||||
STW B13,*+SP(56) ; Save B13
|
||||
MVC ILC,B0 ; Pickup ILC
|
||||
MVC RILC,B1 ; Pickup RILC
|
||||
STW B0,*+SP(60) ; Save ILC
|
||||
STW B1,*+SP(64) ; Save RILC
|
||||
;
|
||||
; /* Lockout interrupts. */
|
||||
;
|
||||
AND -2,B0,B0 ; Build interrupt disable value
|
||||
MVC B0,CSR ; Lockout interrupts
|
||||
;
|
||||
; /* Save current stack and switch to system stack. */
|
||||
; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
|
||||
; SP = _tx_thread_system_stack_ptr;
|
||||
;
|
||||
MVKL _tx_timer_time_slice,A2 ; Pickup address of time slice
|
||||
MVKH _tx_timer_time_slice,A2 ;
|
||||
LDW *A2,B0 ; Pickup time slice
|
||||
MVKL _tx_thread_current_ptr,A1 ; Pickup address of current thread
|
||||
MVKH _tx_thread_current_ptr,A1 ;
|
||||
LDW *A1,A4 ; Pickup current thread pointer
|
||||
MVKL _tx_thread_system_stack_ptr,A3 ; Pickup address of system stack
|
||||
MVKH _tx_thread_system_stack_ptr,A3 ;
|
||||
;
|
||||
; /* Determine if the time-slice is active. */
|
||||
; if (_tx_timer_time_slice)
|
||||
; {
|
||||
;
|
||||
[!B0] B _tx_thread_dont_save_ts ; If no-time slice, skip save
|
||||
NOP ; Delay slot
|
||||
STW SP,*+A4(8) ; Save thread's stack pointer
|
||||
LDW *A3,SP ; Switch to system stack pointer
|
||||
NOP ; Delay slot
|
||||
;
|
||||
; /* Save time-slice for the thread and clear the current time-slice. */
|
||||
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
|
||||
; _tx_timer_time_slice = 0;
|
||||
NOP ;
|
||||
STW B2,*A2 ; Clear time-slice
|
||||
NOP 2 ; Delay slots
|
||||
STW B0,*+A4(24) ; Save time-slice
|
||||
;
|
||||
;
|
||||
; }
|
||||
_tx_thread_dont_save_ts
|
||||
;
|
||||
; /* Clear the current thread pointer. */
|
||||
; _tx_thread_current_ptr = TX_NULL;
|
||||
;
|
||||
B _tx_thread_schedule ; Return to scheduling loop
|
||||
STW B2,*A1 ; Set current thread to NULL
|
||||
NOP 4 ; Delay slots
|
||||
;
|
||||
;}
|
||||
|
||||
300
ports/c667x/ccs/src/tx_timer_interrupt.asm
Normal file
300
ports/c667x/ccs/src/tx_timer_interrupt.asm
Normal file
@@ -0,0 +1,300 @@
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
;/* */
|
||||
;/* This software is licensed under the Microsoft Software License */
|
||||
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
;/* and in the root directory of this software. */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;/** */
|
||||
;/** ThreadX Component */
|
||||
;/** */
|
||||
;/** Timer */
|
||||
;/** */
|
||||
;/**************************************************************************/
|
||||
;/**************************************************************************/
|
||||
;
|
||||
;#define TX_SOURCE_CODE
|
||||
;
|
||||
;
|
||||
;/* Include necessary system files. */
|
||||
;
|
||||
;#include "tx_api.h"
|
||||
;#include "tx_timer.h"
|
||||
;#include "tx_thread.h"
|
||||
;
|
||||
FP .set A15
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
;
|
||||
;Define Assembly language external references...
|
||||
;
|
||||
.global _tx_timer_time_slice
|
||||
.global _tx_timer_system_clock
|
||||
.global _tx_timer_current_ptr
|
||||
.global _tx_timer_list_start
|
||||
.global _tx_timer_list_end
|
||||
.global _tx_timer_expired_time_slice
|
||||
.global _tx_timer_expired
|
||||
.global _tx_timer_expiration_process
|
||||
.global _tx_thread_time_slice
|
||||
.global _tx_thread_context_save
|
||||
.global _tx_thread_context_restore
|
||||
;
|
||||
;
|
||||
.sect ".text"
|
||||
;/**************************************************************************/
|
||||
;/* */
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_timer_interrupt C667x/TI */
|
||||
;/* 6.0 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
;/* */
|
||||
;/* DESCRIPTION */
|
||||
;/* */
|
||||
;/* This function processes the hardware timer interrupt. This */
|
||||
;/* processing includes incrementing the system clock and checking for */
|
||||
;/* time slice and/or timer expiration. If either is found, the */
|
||||
;/* interrupt context save/restore functions are called along with the */
|
||||
;/* expiration functions. */
|
||||
;/* */
|
||||
;/* INPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* OUTPUT */
|
||||
;/* */
|
||||
;/* None */
|
||||
;/* */
|
||||
;/* CALLS */
|
||||
;/* */
|
||||
;/* _tx_thread_context_save Context save */
|
||||
;/* _tx_thread_context_restore Context restore */
|
||||
;/* _tx_thread_time_slice Time slice interrupted thread */
|
||||
;/* _tx_timer_expiration_process Timer expiration processing */
|
||||
;/* */
|
||||
;/* CALLED BY */
|
||||
;/* */
|
||||
;/* interrupt vector */
|
||||
;/* */
|
||||
;/* RELEASE HISTORY */
|
||||
;/* */
|
||||
;/* DATE NAME DESCRIPTION */
|
||||
;/* */
|
||||
;/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_timer_interrupt(VOID)
|
||||
;{
|
||||
.global _tx_timer_interrupt
|
||||
_tx_timer_interrupt:
|
||||
;
|
||||
; /* Upon entry to this routine, it is assumed that registers B3, A0-A4 have
|
||||
; already been saved and the space for saving additional registers has
|
||||
; already been reserved. In addition, interrupts are locked out and must
|
||||
; remain so until context save returns. */
|
||||
;
|
||||
; /* Increment the system clock. */
|
||||
; _tx_timer_system_clock++;
|
||||
;
|
||||
MVKL _tx_timer_system_clock,A0 ; Build address of system clock
|
||||
MVKH _tx_timer_system_clock,A0 ;
|
||||
LDW *A0,A2 ; Pickup system clock
|
||||
MVKL _tx_timer_time_slice,A3 ; Build address of time slice
|
||||
MVKH _tx_timer_time_slice,A3 ;
|
||||
LDW *A3,A1 ; Pickup time slice
|
||||
NOP 2 ; Delay
|
||||
ADD 1,A2,A2 ; Increment the system clock
|
||||
STW A2,*A0 ; Store it back in memory
|
||||
;
|
||||
; /* Test for time-slice expiration. */
|
||||
; if (_tx_timer_time_slice)
|
||||
; {
|
||||
;
|
||||
[!A1] B _tx_timer_no_time_slice ; If 0, skip time slice processing
|
||||
SUB A1,1,A1 ; Decrement time-slice value
|
||||
NOP 4 ; Delay slots
|
||||
;
|
||||
; /* Decrement the time_slice. */
|
||||
; _tx_timer_time_slice--;
|
||||
;
|
||||
; /* Check for expiration. */
|
||||
; if (_tx_timer_time_slice == 0)
|
||||
;
|
||||
[A1] B _tx_timer_no_time_slice ; If non-zero, not expired yet
|
||||
STW A1,*A3 ; Store new time-slice
|
||||
MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag
|
||||
MVKH _tx_timer_expired_time_slice,A0 ;
|
||||
MVKL 1,A4 ; Expired flag
|
||||
NOP ; Delay
|
||||
;
|
||||
; /* Set the time-slice expired flag. */
|
||||
; _tx_timer_expired_time_slice = TX_TRUE;
|
||||
;
|
||||
STW A4,*A0 ; Set expired flag
|
||||
; }
|
||||
;
|
||||
_tx_timer_no_time_slice:
|
||||
;
|
||||
; /* Test for timer expiration. */
|
||||
; if (*_tx_timer_current_ptr)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_timer_current_ptr,A2 ; Build address of current timer pointer
|
||||
MVKH _tx_timer_current_ptr,A2 ;
|
||||
LDW *A2,A0 ; Pickup timer list address
|
||||
MVKL _tx_timer_expired,A3 ; Build address of expired flag
|
||||
MVKH _tx_timer_expired,A3 ;
|
||||
NOP 2 ; Delay slots
|
||||
LDW *A0,A1 ; Pickup current timer entry
|
||||
ADD 4,A0,A0 ; Increment the current pointer
|
||||
NOP 3 ; Delay slots
|
||||
[A1] B _tx_timer_done ; If non-NULL, something has expired
|
||||
;
|
||||
;
|
||||
; /* Set expiration flag. */
|
||||
; _tx_timer_expired = TX_TRUE;
|
||||
;
|
||||
MVKL 1,A4 ; Build expired flag
|
||||
[A1] STW A4,*A3 ; Set expired flag
|
||||
NOP 3 ; Delay slots
|
||||
;
|
||||
; }
|
||||
; else
|
||||
; {
|
||||
_tx_timer_no_timer:
|
||||
;
|
||||
; /* No timer expired, increment the timer pointer. */
|
||||
; _tx_timer_current_ptr++;
|
||||
;
|
||||
; /* Check for wrap-around. */
|
||||
; if (_tx_timer_current_ptr == _tx_timer_list_end)
|
||||
;
|
||||
MVKL _tx_timer_list_end,A3 ; Build timer list end address
|
||||
MVKH _tx_timer_list_end,A3 ;
|
||||
LDW *A3,A4 ; Pickup list end address
|
||||
MVKL _tx_timer_list_start,A3 ; Build timer list start address
|
||||
MVKH _tx_timer_list_start,A3 ;
|
||||
NOP 2 ; Delay slots
|
||||
CMPEQ A4,A0,A1 ; Compare current pointer with end
|
||||
[A1] LDW *A3,A0 ; If at the end, pickup timer list start
|
||||
NOP 4 ; Delay slots
|
||||
;
|
||||
; /* Wrap to beginning of list. */
|
||||
; _tx_timer_current_ptr = _tx_timer_list_start;
|
||||
;
|
||||
_tx_timer_skip_wrap:
|
||||
;
|
||||
;
|
||||
STW A0,*A2 ; Store current timer pointer
|
||||
; }
|
||||
;
|
||||
_tx_timer_done:
|
||||
;
|
||||
;
|
||||
; /* See if anything has expired. */
|
||||
; if ((_tx_timer_expired_time_slice) || (_tx_timer_expired))
|
||||
; {
|
||||
;
|
||||
MVKL _tx_timer_expired_time_slice,A3 ; Build time-slice expired flag
|
||||
MVKH _tx_timer_expired_time_slice,A3 ;
|
||||
LDW *A3,A4 ; Pickup time-slice expired flag
|
||||
MVKL _tx_timer_expired,A0 ; Build timer expired flag
|
||||
MVKH _tx_timer_expired,A0 ;
|
||||
LDW *A0,A2 ; Pickup timer expired flag
|
||||
NOP 4 ; Delay slots
|
||||
OR A2,A4,A1 ; Combine expired flags
|
||||
[!A1] B _tx_timer_nothing_expired
|
||||
NOP 5 ; Delay slots
|
||||
;
|
||||
_tx_something_expired:
|
||||
;
|
||||
;
|
||||
; /* Something expired, call context save. */
|
||||
; _tx_thread_context_save();
|
||||
;
|
||||
B _tx_thread_context_save ; Call context save routine
|
||||
MVKL _tx_timer_ISR_return,B3 ; Build return address
|
||||
MVKH _tx_timer_ISR_return,B3 ;
|
||||
NOP 3 ; Delay slots
|
||||
_tx_timer_ISR_return:
|
||||
;
|
||||
; /* Did a timer expire? */
|
||||
; if (_tx_timer_expired)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_timer_expired,A0 ; Build timer expired address
|
||||
MVKH _tx_timer_expired,A0 ;
|
||||
LDW *A0,A1 ; Pickup expired flag
|
||||
NOP 4 ; Delay slots
|
||||
[!A1] B _tx_timer_dont_activate ; If not set, skip timer activation
|
||||
NOP 5 ; Delay slots
|
||||
;
|
||||
; /* Process timer expiration. */
|
||||
; _tx_timer_expiration_process();
|
||||
;
|
||||
B _tx_timer_expiration_process ; Process timer expiration
|
||||
MVKL _tx_timer_ISR_return_1,B3 ; Build return address
|
||||
MVKH _tx_timer_ISR_return_1,B3 ;
|
||||
NOP 3 ; Delay slots
|
||||
_tx_timer_ISR_return_1:
|
||||
;
|
||||
; }
|
||||
_tx_timer_dont_activate:
|
||||
;
|
||||
; /* Did time slice expire? */
|
||||
; if (_tx_timer_expired_time_slice)
|
||||
; {
|
||||
;
|
||||
MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag
|
||||
MVKH _tx_timer_expired_time_slice,A0 ;
|
||||
LDW *A0,A1 ; Pickup expired flag
|
||||
NOP 4 ; Delay slots
|
||||
[!A1] B _tx_timer_not_ts_expiration ; If not set, skip time-slice processing
|
||||
NOP 5 ; Delay slots
|
||||
;
|
||||
; /* Time slice interrupted thread. */
|
||||
; _tx_thread_time_slice();
|
||||
;
|
||||
B _tx_thread_time_slice ; Call time-slice processing
|
||||
MVKL _tx_timer_ISR_return_2,B3 ; Build return address
|
||||
MVKH _tx_timer_ISR_return_2,B3 ;
|
||||
NOP 3 ; Delay slots
|
||||
_tx_timer_ISR_return_2:
|
||||
;
|
||||
; }
|
||||
;
|
||||
_tx_timer_not_ts_expiration:
|
||||
;
|
||||
;
|
||||
; /* Call context restore. */
|
||||
; _tx_thread_context_restore();
|
||||
;
|
||||
B _tx_thread_context_restore ; Jump to context restore - no return!
|
||||
NOP 5 ; Delay slots
|
||||
;
|
||||
; }
|
||||
;
|
||||
_tx_timer_nothing_expired:
|
||||
;
|
||||
LDW *+SP(20),A0 ; Recover A0
|
||||
LDW *+SP(24),A1 ; Recover A1
|
||||
LDW *+SP(28),A2 ; Recover A2
|
||||
LDW *+SP(32),A3 ; Recover A3
|
||||
B IRP ; Return to point of interrupt
|
||||
|| LDW *+SP(36),A4 ; Recover A4
|
||||
LDW *+SP(96),B3 ; Recover B3
|
||||
ADDK.S2 288,SP ; Recover stack space
|
||||
NOP 3 ; Delay slots
|
||||
;
|
||||
;}
|
||||
|
||||
Reference in New Issue
Block a user