rev.(UML-1899): рабочий пример EtherCAT Slave на CM
Работает. Есть CiA402, OD из SSC Tool. Автономный со своим main(). Проверялся тестами на SOEM.
This commit is contained in:
parent
d81165a658
commit
9661838676
215
F2838x CM EtherCAT Slave.c
Normal file
215
F2838x CM EtherCAT Slave.c
Normal file
@ -0,0 +1,215 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
*/
|
||||
|
||||
/**
|
||||
\addtogroup F2838xCMEtherCATSlave F2838x CM EtherCAT Slave
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file F2838x CM EtherCAT Slave.c
|
||||
\brief Implementation
|
||||
Created with SSC Tool application parser 1.6.4.0
|
||||
\version 0.0.0.1
|
||||
*/
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "ecat_def.h"
|
||||
|
||||
#include "applInterface.h"
|
||||
|
||||
#define _F2838X_CM_ETHER_CAT_SLAVE_ 1
|
||||
#include "F2838x CM EtherCAT Slave.h"
|
||||
#undef _F2838X_CM_ETHER_CAT_SLAVE_
|
||||
/*--------------------------------------------------------------------------------------
|
||||
------
|
||||
------ local types and defines
|
||||
------
|
||||
--------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ local variables and constants
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ application specific functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ generic functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief The function is called when an error state was acknowledged by the master
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void APPL_AckErrorInd(UINT16 stateTrans)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return AL Status Code (see ecatslv.h ALSTATUSCODE_....)
|
||||
|
||||
\brief The function is called in the state transition from INIT to PREOP when
|
||||
all general settings were checked to start the mailbox handler. This function
|
||||
informs the application about the state transition, the application can refuse
|
||||
the state transition when returning an AL Status error code.
|
||||
The return code NOERROR_INWORK can be used, if the application cannot confirm
|
||||
the state transition immediately, in that case this function will be called cyclically
|
||||
until a value unequal NOERROR_INWORK is returned
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 APPL_StartMailboxHandler(void)
|
||||
{
|
||||
return ALSTATUSCODE_NOERROR;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return 0, NOERROR_INWORK
|
||||
|
||||
\brief The function is called in the state transition from PREEOP to INIT
|
||||
to stop the mailbox handler. This functions informs the application
|
||||
about the state transition, the application cannot refuse
|
||||
the state transition.
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 APPL_StopMailboxHandler(void)
|
||||
{
|
||||
return ALSTATUSCODE_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if EXPLICIT_DEVICE_ID
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return The Explicit Device ID of the EtherCAT slave
|
||||
|
||||
\brief Read the Explicit Device ID (from an external ID switch)
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
UINT16 APPL_GetDeviceID()
|
||||
{
|
||||
#if _WIN32
|
||||
#pragma message ("Warning: Implement explicit Device ID latching")
|
||||
#else
|
||||
#warning "Implement explicit Device ID latching"
|
||||
#endif
|
||||
/* Explicit Device 5 is expected by Explicit Device ID conformance tests*/
|
||||
return 0x5;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param index index of the requested object.
|
||||
\param subindex subindex of the requested object.
|
||||
\param objSize size of the requested object data, calculated with OBJ_GetObjectLength
|
||||
\param pData Pointer to the buffer where the data can be copied to
|
||||
\param bCompleteAccess Indicates if a complete read of all subindices of the
|
||||
object shall be done or not
|
||||
|
||||
\return result of the read operation (0 (success) or an abort code (ABORTIDX_.... defined in
|
||||
sdosrv.h))
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
UINT8 mySdoRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess) {
|
||||
#if _WIN32
|
||||
#pragma message ("Warning: Implement CoE read callback")
|
||||
#else
|
||||
#warning "Implement CoE read callback"
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param index index of the requested object.
|
||||
\param subindex subindex of the requested object.
|
||||
\param objSize size of the requested object data, calculated with OBJ_GetObjectLength
|
||||
\param pData Pointer to the buffer where the data can be copied to
|
||||
\param bCompleteAccess Indicates if a complete read of all subindices of the
|
||||
object shall be done or not
|
||||
|
||||
\return result of the read operation (0 (success) or an abort code (ABORTIDX_.... defined in
|
||||
sdosrv.h))
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
UINT8 mySdoWrite(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess) {
|
||||
#if _WIN32
|
||||
#pragma message ("Warning: Implement CoE write callback")
|
||||
#else
|
||||
#warning "Implement CoE write callback"
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#if USE_DEFAULT_MAIN
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
|
||||
\brief This is the main function
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if _PIC24 && EL9800_HW
|
||||
int main(void)
|
||||
#elif _WIN32
|
||||
int main(int argc, char* argv[])
|
||||
#else
|
||||
void main(void)
|
||||
#endif
|
||||
{
|
||||
/* initialize the Hardware and the EtherCAT Slave Controller */
|
||||
#if FC1100_HW
|
||||
#if _WIN32
|
||||
u16FcInstance = 0;
|
||||
if (argc > 1)
|
||||
{
|
||||
u16FcInstance = atoi(argv[1]);
|
||||
}
|
||||
#endif
|
||||
if(HW_Init())
|
||||
{
|
||||
HW_Release();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
HW_Init();
|
||||
#endif
|
||||
MainInit();
|
||||
|
||||
bRunApplication = TRUE;
|
||||
do
|
||||
{
|
||||
MainLoop();
|
||||
|
||||
} while (bRunApplication == TRUE);
|
||||
|
||||
HW_Release();
|
||||
#if _PIC24
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif //#if USE_DEFAULT_MAIN
|
||||
/** @} */
|
||||
|
||||
70
F2838x CM EtherCAT Slave.h
Normal file
70
F2838x CM EtherCAT Slave.h
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup F2838xCMEtherCATSlave F2838x CM EtherCAT Slave
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file F2838x CM EtherCAT Slave.h
|
||||
\brief F2838x CM EtherCAT Slave function prototypes and defines
|
||||
|
||||
\version 1.0.0.11
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_H_
|
||||
#define _F2838X_CM_ETHER_CAT_SLAVE_H_
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "ecat_def.h"
|
||||
|
||||
#include "ecatappl.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Defines and Types
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#endif //_F2838X_CM_ETHER_CAT_SLAVE_H_
|
||||
|
||||
//include custom application object dictionary
|
||||
#include "F2838x CM EtherCAT SlaveObjects.h"
|
||||
|
||||
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
#define PROTO
|
||||
#else
|
||||
#define PROTO extern
|
||||
#endif
|
||||
|
||||
|
||||
PROTO void APPL_Application(void);
|
||||
#if EXPLICIT_DEVICE_ID
|
||||
PROTO UINT16 APPL_GetDeviceID(void);
|
||||
#endif
|
||||
|
||||
PROTO void APPL_AckErrorInd(UINT16 stateTrans);
|
||||
PROTO UINT16 APPL_StartMailboxHandler(void);
|
||||
PROTO UINT16 APPL_StopMailboxHandler(void);
|
||||
PROTO UINT16 APPL_StartInputHandler(UINT16 *pIntMask);
|
||||
PROTO UINT16 APPL_StopInputHandler(void);
|
||||
PROTO UINT16 APPL_StartOutputHandler(void);
|
||||
PROTO UINT16 APPL_StopOutputHandler(void);
|
||||
|
||||
PROTO UINT16 APPL_GenerateMapping(UINT16 *pInputSize,UINT16 *pOutputSize);
|
||||
PROTO void APPL_InputMapping(UINT16* pData);
|
||||
PROTO void APPL_OutputMapping(UINT16* pData);
|
||||
|
||||
#undef PROTO
|
||||
/** @}*/
|
||||
|
||||
BIN
F2838x CM EtherCAT Slave.xlsx
Normal file
BIN
F2838x CM EtherCAT Slave.xlsx
Normal file
Binary file not shown.
BIN
F2838x CM EtherCAT Slave402.esp
Normal file
BIN
F2838x CM EtherCAT Slave402.esp
Normal file
Binary file not shown.
495
F2838x CM EtherCAT SlaveObjects.h
Normal file
495
F2838x CM EtherCAT SlaveObjects.h
Normal file
@ -0,0 +1,495 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup F2838xCMEtherCATSlave F2838x CM EtherCAT Slave
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file F2838x CM EtherCAT SlaveObjects
|
||||
\author ET9300Utilities.ApplicationHandler (Version 1.6.4.0) | EthercatSSC@beckhoff.com
|
||||
|
||||
\brief F2838x CM EtherCAT Slave specific objects<br>
|
||||
\brief NOTE : This file will be overwritten if a new object dictionary is generated!<br>
|
||||
*/
|
||||
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
#define PROTO
|
||||
#else
|
||||
#define PROTO extern
|
||||
#endif
|
||||
/******************************************************************************
|
||||
* Object 0x1600 : OutputMapping
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x1600 0x1600 | OutputMapping
|
||||
* @{
|
||||
* \brief Object 0x1600 (OutputMapping) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Object entry descriptions<br>
|
||||
* <br>
|
||||
* SubIndex 0<br>
|
||||
* SubIndex 1 - map 0x7000 SIO 32bit<br>
|
||||
* SubIndex 2 - map 0x7001 SIO 8bit<br>
|
||||
* SubIndex 3 - 8bit padding<br>
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1600[] = {
|
||||
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex1 - map 0x7000 SIO 32bit */
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex2 - map 0x7001 SIO 8bit */
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }}; /* Subindex3 - 8bit padding */
|
||||
|
||||
/**
|
||||
* \brief Object/Entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1600[] = "OutputMapping\000"
|
||||
"SubIndex 001\000"
|
||||
"SubIndex 002\000"
|
||||
"SubIndex 003\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
/**
|
||||
* \brief Object structure
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0;
|
||||
UINT32 SI1; /* Subindex1 - map 0x7000 SIO 32bit */
|
||||
UINT32 SI2; /* Subindex2 - map 0x7001 SIO 8bit */
|
||||
UINT32 SI3; /* Subindex3 - 8bit padding */
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1600;
|
||||
#endif //#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO TOBJ1600 OutputMapping0x1600
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
={3,0x70000020,0x70010008,0x00000008}
|
||||
#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x1A00 : InputMapping
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x1A00 0x1A00 | InputMapping
|
||||
* @{
|
||||
* \brief Object 0x1A00 (InputMapping) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Object entry descriptions<br>
|
||||
* <br>
|
||||
* SubIndex 0<br>
|
||||
* SubIndex 1 - map SI 0bit<br>
|
||||
* SubIndex 2 - 8bit padding<br>
|
||||
* SubIndex 3 - map 0x6001 SIO 16bit<br>
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1A00[] = {
|
||||
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex1 - map SI 0bit */
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }, /* Subindex2 - 8bit padding */
|
||||
{ DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READ }}; /* Subindex3 - map 0x6001 SIO 16bit */
|
||||
|
||||
/**
|
||||
* \brief Object/Entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1A00[] = "InputMapping\000"
|
||||
"SubIndex 001\000"
|
||||
"SubIndex 002\000"
|
||||
"SubIndex 003\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
/**
|
||||
* \brief Object structure
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0;
|
||||
UINT32 SI1; /* Subindex1 - map SI 0bit */
|
||||
UINT32 SI2; /* Subindex2 - 8bit padding */
|
||||
UINT32 SI3; /* Subindex3 - map 0x6001 SIO 16bit */
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1A00;
|
||||
#endif //#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO TOBJ1A00 InputMapping0x1A00
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
={3,0x60000008,0x00000008,0x60010010}
|
||||
#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x1C12 : Obj0x1C12
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x1C12 0x1C12 | Obj0x1C12
|
||||
* @{
|
||||
* \brief Object 0x1C12 (Obj0x1C12) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry descriptions<br>
|
||||
*
|
||||
* Subindex 0<br>
|
||||
* Subindex 1 - n (the same entry description is used)<br>
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1C12[] = {
|
||||
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
|
||||
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }};
|
||||
|
||||
/**
|
||||
* \brief Object name definition<br>
|
||||
* For Subindex 1 to n the syntax 'Subindex XXX' is used
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1C12[] = "Obj0x1C12\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
/**
|
||||
* \brief Object structure
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief Subindex 0 */
|
||||
UINT16 aEntries[1]; /**< \brief Subindex 1 - 1 */
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1C12;
|
||||
#endif //#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
//PROTO TOBJ1C12 sRxPDOassign
|
||||
//#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
//={1,{0x1A00}}
|
||||
//#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x1C13 : Obj0x1C13
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x1C13 0x1C13 | Obj0x1C13
|
||||
* @{
|
||||
* \brief Object 0x1C13 (Obj0x1C13) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry descriptions<br>
|
||||
*
|
||||
* Subindex 0<br>
|
||||
* Subindex 1 - n (the same entry description is used)<br>
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1C13[] = {
|
||||
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READ },
|
||||
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ }};
|
||||
|
||||
/**
|
||||
* \brief Object name definition<br>
|
||||
* For Subindex 1 to n the syntax 'Subindex XXX' is used
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1C13[] = "Obj0x1C13\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
/**
|
||||
* \brief Object structure
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief Subindex 0 */
|
||||
UINT16 aEntries[1]; /**< \brief Subindex 1 - 1 */
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1C13;
|
||||
#endif //#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
//PROTO TOBJ1C13 sTxPDOassign
|
||||
//#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
//={1,{0x1600}}
|
||||
//#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x6000 : DummyInput1
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x6000 0x6000 | DummyInput1
|
||||
* @{
|
||||
* \brief Object 0x6000 (DummyInput1) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6000 = { DEFTYPE_UNSIGNED8 , 0x08 , ACCESS_READ };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6000[] = "DummyInput1\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT8 DummyInput10x6000;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x6001 : DummyInput2
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x6001 0x6001 | DummyInput2
|
||||
* @{
|
||||
* \brief Object 0x6001 (DummyInput2) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6001 = { DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6001[] = "DummyInput2\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT16 DummyInput20x6001;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x7000 : DummyOutput1
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x7000 0x7000 | DummyOutput1
|
||||
* @{
|
||||
* \brief Object 0x7000 (DummyOutput1) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x7000 = { DEFTYPE_UNSIGNED32 , 0x20 , ACCESS_READWRITE };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x7000[] = "DummyOutput1\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT32 DummyOutput10x7000;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x7001 : DummyPutput2
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x7001 0x7001 | DummyPutput2
|
||||
* @{
|
||||
* \brief Object 0x7001 (DummyPutput2) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x7001 = { DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READWRITE };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x7001[] = "DummyPutput2\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT16 DummyPutput20x7001;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x9000 : Var1
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x9000 0x9000 | Var1
|
||||
* @{
|
||||
* \brief Object 0x9000 (Var1) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x9000 = { DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x9000[] = "Var1\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT16 Var10x9000
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
= 0xAABB
|
||||
#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0x9001 : Var2
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0x9001 0x9001 | Var2
|
||||
* @{
|
||||
* \brief Object 0x9001 (Var2) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x9001 = { DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READ };
|
||||
/**
|
||||
* \brief Object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x9001[] = "Var2\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO UINT16 Var20x9001
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
= 0xBBAA
|
||||
#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Object 0xF000 : Obj0xF000
|
||||
******************************************************************************/
|
||||
/**
|
||||
* \addtogroup 0xF000 0xF000 | Obj0xF000
|
||||
* @{
|
||||
* \brief Object 0xF000 (Obj0xF000) definition
|
||||
*/
|
||||
#ifdef _OBJD_
|
||||
/**
|
||||
* \brief Object entry descriptions<br>
|
||||
* <br>
|
||||
* SubIndex 0<br>
|
||||
* SubIndex 1 - Value_1<br>
|
||||
* SubIndex 2 - Value_2<br>
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0xF000[] = {
|
||||
{ DEFTYPE_UNSIGNED8 , 0x8 , ACCESS_READWRITE },
|
||||
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READWRITE }, /* Subindex1 - Value_1 */
|
||||
{ DEFTYPE_UNSIGNED16 , 0x10 , ACCESS_READWRITE }}; /* Subindex2 - Value_2 */
|
||||
|
||||
/**
|
||||
* \brief Object/Entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0xF000[] = "Obj0xF000\000"
|
||||
"Value_1\000"
|
||||
"Value_2\000\377";
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
/**
|
||||
* \brief Object structure
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0;
|
||||
UINT16 Value_1; /* Subindex1 - Value_1 */
|
||||
UINT16 Value_2; /* Subindex2 - Value_2 */
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJF000;
|
||||
#endif //#ifndef _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
|
||||
/**
|
||||
* \brief Object variable
|
||||
*/
|
||||
PROTO TOBJF000 Obj0xF000
|
||||
#if defined(_F2838X_CM_ETHER_CAT_SLAVE_) && (_F2838X_CM_ETHER_CAT_SLAVE_ == 1)
|
||||
={2,0,0}
|
||||
#endif
|
||||
;
|
||||
/** @}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PROTO UINT8 mySdoRead(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);
|
||||
PROTO UINT8 mySdoWrite(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM * pData, UINT8 bCompleteAccess);
|
||||
|
||||
|
||||
#ifdef _OBJD_
|
||||
TOBJECT OBJMEM ApplicationObjDic[] = {
|
||||
/* Object 0x1600 */
|
||||
{NULL , NULL , 0x1600 , {DEFTYPE_PDOMAPPING , 3 | (OBJCODE_REC << 8)} , asEntryDesc0x1600 , aName0x1600 , &OutputMapping0x1600 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x1A00 */
|
||||
{NULL , NULL , 0x1A00 , {DEFTYPE_PDOMAPPING , 3 | (OBJCODE_REC << 8)} , asEntryDesc0x1A00 , aName0x1A00 , &InputMapping0x1A00 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x1C12 */
|
||||
{NULL , NULL , 0x1C12 , {DEFTYPE_UNSIGNED16 , 1 | (OBJCODE_ARR << 8)} , asEntryDesc0x1C12 , aName0x1C12 , &sRxPDOassign , NULL , NULL , 0x0000 },
|
||||
/* Object 0x1C13 */
|
||||
{NULL , NULL , 0x1C13 , {DEFTYPE_UNSIGNED16 , 1 | (OBJCODE_ARR << 8)} , asEntryDesc0x1C13 , aName0x1C13 , &sTxPDOassign , NULL , NULL , 0x0000 },
|
||||
/* Object 0x6000 */
|
||||
{NULL , NULL , 0x6000 , {DEFTYPE_UNSIGNED8 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x6000 , aName0x6000 , &DummyInput10x6000 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x6001 */
|
||||
{NULL , NULL , 0x6001 , {DEFTYPE_UNSIGNED16 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x6001 , aName0x6001 , &DummyInput20x6001 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x7000 */
|
||||
{NULL , NULL , 0x7000 , {DEFTYPE_UNSIGNED32 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x7000 , aName0x7000 , &DummyOutput10x7000 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x7001 */
|
||||
{NULL , NULL , 0x7001 , {DEFTYPE_UNSIGNED16 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x7001 , aName0x7001 , &DummyPutput20x7001 , NULL , NULL , 0x0000 },
|
||||
/* Object 0x9000 */
|
||||
{NULL , NULL , 0x9000 , {DEFTYPE_UNSIGNED16 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x9000 , aName0x9000 , &Var10x9000 , mySdoRead , NULL , 0x0000 },
|
||||
/* Object 0x9001 */
|
||||
{NULL , NULL , 0x9001 , {DEFTYPE_UNSIGNED16 , 0 | (OBJCODE_VAR << 8)} , &sEntryDesc0x9001 , aName0x9001 , &Var20x9001 , NULL , mySdoWrite , 0x0000 },
|
||||
/* Object 0xF000 */
|
||||
{NULL , NULL , 0xF000 , {DEFTYPE_RECORD , 2 | (OBJCODE_REC << 8)} , asEntryDesc0xF000 , aName0xF000 , &Obj0xF000 , NULL , NULL , 0x0000 },
|
||||
{NULL,NULL, 0xFFFF, {0, 0}, NULL, NULL, NULL, NULL}};
|
||||
#endif //#ifdef _OBJD_
|
||||
|
||||
#undef PROTO
|
||||
|
||||
/** @}*/
|
||||
#define _F2838X_CM_ETHER_CAT_SLAVE_OBJECTS_H_
|
||||
@ -1,15 +1,19 @@
|
||||
"./F2838x CM EtherCAT Slave.obj"
|
||||
"./cia402appl.obj"
|
||||
"./coeappl.obj"
|
||||
"./ecatappl.obj"
|
||||
"./ecatcoe.obj"
|
||||
"./ecatfoe.obj"
|
||||
"./ecatslv.obj"
|
||||
"./ethercat_slave_cm_hal.obj"
|
||||
"./f2838x_cm_hw.obj"
|
||||
"./f2838x_cm_system.obj"
|
||||
"./foeappl.obj"
|
||||
"./mailbox.obj"
|
||||
"./objdef.obj"
|
||||
"./sdoserv.obj"
|
||||
"./startup_cm.obj"
|
||||
"./tiescfoe.obj"
|
||||
"./device/cm.obj"
|
||||
"../2838x_RAM_lnk_ecat_cm.cmd"
|
||||
"C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib"
|
||||
|
||||
117
RAM/cia402appl.d
117
RAM/cia402appl.d
@ -1,117 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
cia402appl.obj: ../cia402appl.c
|
||||
cia402appl.obj: ../ecat_def.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
cia402appl.obj: ../f2838x_cm_system.h
|
||||
cia402appl.obj: ../applInterface.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
cia402appl.obj: ../esc.h
|
||||
cia402appl.obj: ../ecatslv.h
|
||||
cia402appl.obj: ../esc.h
|
||||
cia402appl.obj: ../f2838x_cm_hw.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
cia402appl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
cia402appl.obj: ../esc.h
|
||||
cia402appl.obj: ../objdef.h
|
||||
cia402appl.obj: ../sdoserv.h
|
||||
cia402appl.obj: ../ecatcoe.h
|
||||
cia402appl.obj: ../mailbox.h
|
||||
cia402appl.obj: ../ecatappl.h
|
||||
cia402appl.obj: ../coeappl.h
|
||||
cia402appl.obj: ../objdef.h
|
||||
cia402appl.obj: ../sdoserv.h
|
||||
cia402appl.obj: ../ecatcoe.h
|
||||
cia402appl.obj: ../mailbox.h
|
||||
cia402appl.obj: ../cia402appl.h
|
||||
cia402appl.obj: ../objdef.h
|
||||
cia402appl.obj: ../sdoserv.h
|
||||
cia402appl.obj: ../ecatcoe.h
|
||||
cia402appl.obj: ../mailbox.h
|
||||
|
||||
../cia402appl.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../applInterface.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../ecatappl.h:
|
||||
|
||||
../coeappl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../cia402appl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
coeappl.obj: ../coeappl.c
|
||||
coeappl.obj: ../ecat_def.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
coeappl.obj: ../f2838x_cm_system.h
|
||||
coeappl.obj: ../ecatslv.h
|
||||
coeappl.obj: ../esc.h
|
||||
coeappl.obj: ../f2838x_cm_hw.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
coeappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
coeappl.obj: ../esc.h
|
||||
coeappl.obj: ../coeappl.h
|
||||
coeappl.obj: ../objdef.h
|
||||
coeappl.obj: ../sdoserv.h
|
||||
coeappl.obj: ../ecatcoe.h
|
||||
coeappl.obj: ../mailbox.h
|
||||
coeappl.obj: ../cia402appl.h
|
||||
coeappl.obj: ../objdef.h
|
||||
coeappl.obj: ../sdoserv.h
|
||||
coeappl.obj: ../ecatcoe.h
|
||||
coeappl.obj: ../mailbox.h
|
||||
|
||||
../coeappl.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../coeappl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../cia402appl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
201
RAM/device/cm.d
201
RAM/device/cm.d
@ -1,201 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
device/cm.obj: ../device/cm.c
|
||||
device/cm.obj: ../device/cm.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f2838x/common/include/driverlib_cm.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memmap.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/aes.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdbool.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
device/cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/debug.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/interrupt.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cpu.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ints.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nvic.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes_ss.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/can.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_can.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/sysctl.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nmi.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_sysctl.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_wwd.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cmmpu.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cmmpu.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cputimer.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cputimer.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/dcsm.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_dcsm.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/escss.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_esc_ss.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ethernet.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac_ss.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/platform_port.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/flash.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_flash.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ipc.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ipc.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gcrc.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gcrc.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gpio.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gpio.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/i2c.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_i2c.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mcan.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_mcanss.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types_mcan.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/memcfg.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memcfg.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mpu.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ssi.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ssi.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/systick.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/uart.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_uart.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/udma.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_udma.h
|
||||
device/cm.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/usb.h
|
||||
|
||||
../device/cm.c:
|
||||
|
||||
../device/cm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f2838x/common/include/driverlib_cm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memmap.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/aes.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdbool.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/debug.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/interrupt.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ints.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nvic.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/can.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_can.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/sysctl.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nmi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_sysctl.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_wwd.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cmmpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cmmpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cputimer.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cputimer.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/dcsm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_dcsm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/escss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_esc_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ethernet.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/platform_port.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/flash.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_flash.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ipc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ipc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gcrc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gcrc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gpio.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gpio.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/i2c.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_i2c.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mcan.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_mcanss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types_mcan.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/memcfg.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memcfg.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ssi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ssi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/systick.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/uart.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_uart.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/udma.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_udma.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/usb.h:
|
||||
|
||||
126
RAM/ecatappl.d
126
RAM/ecatappl.d
@ -1,126 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
ecatappl.obj: ../ecatappl.c
|
||||
ecatappl.obj: ../ecatslv.h
|
||||
ecatappl.obj: ../ecat_def.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
ecatappl.obj: ../f2838x_cm_system.h
|
||||
ecatappl.obj: ../esc.h
|
||||
ecatappl.obj: ../f2838x_cm_hw.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
ecatappl.obj: ../esc.h
|
||||
ecatappl.obj: ../ecatappl.h
|
||||
ecatappl.obj: ../coeappl.h
|
||||
ecatappl.obj: ../objdef.h
|
||||
ecatappl.obj: ../sdoserv.h
|
||||
ecatappl.obj: ../ecatcoe.h
|
||||
ecatappl.obj: ../mailbox.h
|
||||
ecatappl.obj: ../applInterface.h
|
||||
ecatappl.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
ecatappl.obj: ../esc.h
|
||||
ecatappl.obj: ../ecatslv.h
|
||||
ecatappl.obj: ../esc.h
|
||||
ecatappl.obj: ../objdef.h
|
||||
ecatappl.obj: ../sdoserv.h
|
||||
ecatappl.obj: ../ecatcoe.h
|
||||
ecatappl.obj: ../mailbox.h
|
||||
ecatappl.obj: ../ecatappl.h
|
||||
ecatappl.obj: ../cia402appl.h
|
||||
ecatappl.obj: ../objdef.h
|
||||
ecatappl.obj: ../sdoserv.h
|
||||
ecatappl.obj: ../ecatcoe.h
|
||||
ecatappl.obj: ../mailbox.h
|
||||
|
||||
../ecatappl.c:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../ecatappl.h:
|
||||
|
||||
../coeappl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../applInterface.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../ecatappl.h:
|
||||
|
||||
../cia402appl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
ecatcoe.obj: ../ecatcoe.c
|
||||
ecatcoe.obj: ../ecat_def.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
ecatcoe.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
ecatcoe.obj: ../f2838x_cm_system.h
|
||||
ecatcoe.obj: ../sdoserv.h
|
||||
ecatcoe.obj: ../ecatcoe.h
|
||||
ecatcoe.obj: ../mailbox.h
|
||||
ecatcoe.obj: ../ecatcoe.h
|
||||
ecatcoe.obj: ../mailbox.h
|
||||
|
||||
../ecatcoe.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
102
RAM/ecatslv.d
102
RAM/ecatslv.d
@ -1,102 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
ecatslv.obj: ../ecatslv.c
|
||||
ecatslv.obj: ../ecatslv.h
|
||||
ecatslv.obj: ../ecat_def.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
ecatslv.obj: ../f2838x_cm_system.h
|
||||
ecatslv.obj: ../esc.h
|
||||
ecatslv.obj: ../f2838x_cm_hw.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
ecatslv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
ecatslv.obj: ../esc.h
|
||||
ecatslv.obj: ../ecatappl.h
|
||||
ecatslv.obj: ../mailbox.h
|
||||
ecatslv.obj: ../ecatcoe.h
|
||||
ecatslv.obj: ../mailbox.h
|
||||
ecatslv.obj: ../objdef.h
|
||||
ecatslv.obj: ../sdoserv.h
|
||||
ecatslv.obj: ../ecatcoe.h
|
||||
ecatslv.obj: ../mailbox.h
|
||||
ecatslv.obj: ../cia402appl.h
|
||||
ecatslv.obj: ../objdef.h
|
||||
ecatslv.obj: ../sdoserv.h
|
||||
ecatslv.obj: ../ecatcoe.h
|
||||
ecatslv.obj: ../mailbox.h
|
||||
|
||||
../ecatslv.c:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../ecatappl.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../cia402appl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -1,219 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
ethercat_slave_cm_hal.obj: ../ethercat_slave_cm_hal.c
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/libraries/communications/Ethercat/f2838x/include/ethercat_slave_cm_hal.h
|
||||
ethercat_slave_cm_hal.obj: C:/workspace_v12/f2838x_cm_cia402_solution/device/cm.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f2838x/common/include/driverlib_cm.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memmap.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/aes.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdbool.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/debug.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/interrupt.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cpu.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ints.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nvic.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes_ss.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/can.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_can.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/sysctl.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nmi.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_sysctl.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_wwd.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cmmpu.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cmmpu.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cputimer.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cputimer.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/dcsm.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_dcsm.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/escss.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_esc_ss.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ethernet.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac_ss.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/platform_port.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/flash.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_flash.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ipc.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ipc.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gcrc.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gcrc.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gpio.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gpio.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/i2c.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_i2c.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mcan.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_mcanss.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types_mcan.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/memcfg.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memcfg.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mpu.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ssi.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ssi.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/systick.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/uart.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_uart.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/udma.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_udma.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/usb.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
ethercat_slave_cm_hal.obj: C:/workspace_v12/f2838x_cm_cia402_solution/ecat_def.h
|
||||
ethercat_slave_cm_hal.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
ethercat_slave_cm_hal.obj: C:/workspace_v12/f2838x_cm_cia402_solution/f2838x_cm_system.h
|
||||
|
||||
../ethercat_slave_cm_hal.c:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/libraries/communications/Ethercat/f2838x/include/ethercat_slave_cm_hal.h:
|
||||
|
||||
C:/workspace_v12/f2838x_cm_cia402_solution/device/cm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f2838x/common/include/driverlib_cm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memmap.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/aes.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdbool.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/debug.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/interrupt.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ints.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nvic.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_aes_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/can.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_can.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/sysctl.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_nmi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_sysctl.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_wwd.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cmmpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cmmpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/cputimer.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_cputimer.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/dcsm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_dcsm.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/escss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_esc_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ethernet.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_emac_ss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/platform_port.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/flash.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_flash.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ipc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ipc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gcrc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gcrc.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/gpio.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_gpio.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/i2c.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_i2c.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mcan.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_mcanss.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_types_mcan.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/memcfg.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_memcfg.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/mpu.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ssi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_ssi.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/systick.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/uart.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_uart.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/udma.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/inc/hw_udma.h:
|
||||
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/usb.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
C:/workspace_v12/f2838x_cm_cia402_solution/ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/workspace_v12/f2838x_cm_cia402_solution/f2838x_cm_system.h:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
f2838x_cm_hw.obj: ../f2838x_cm_hw.c
|
||||
f2838x_cm_hw.obj: ../f2838x_cm_hw.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
f2838x_cm_hw.obj: ../esc.h
|
||||
f2838x_cm_hw.obj: ../ecat_def.h
|
||||
f2838x_cm_hw.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
f2838x_cm_hw.obj: ../f2838x_cm_system.h
|
||||
|
||||
../f2838x_cm_hw.c:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
f2838x_cm_system.obj: ../f2838x_cm_system.c
|
||||
f2838x_cm_system.obj: ../f2838x_cm_system.h
|
||||
f2838x_cm_system.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
f2838x_cm_system.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
f2838x_cm_system.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
f2838x_cm_system.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
f2838x_cm_system.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
|
||||
../f2838x_cm_system.c:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
@ -1,81 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
mailbox.obj: ../mailbox.c
|
||||
mailbox.obj: ../ecat_def.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
mailbox.obj: ../f2838x_cm_system.h
|
||||
mailbox.obj: ../ecatslv.h
|
||||
mailbox.obj: ../esc.h
|
||||
mailbox.obj: ../f2838x_cm_hw.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
mailbox.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
mailbox.obj: ../esc.h
|
||||
mailbox.obj: ../mailbox.h
|
||||
mailbox.obj: ../ecatcoe.h
|
||||
mailbox.obj: ../mailbox.h
|
||||
mailbox.obj: ../sdoserv.h
|
||||
mailbox.obj: ../ecatcoe.h
|
||||
mailbox.obj: ../mailbox.h
|
||||
|
||||
../mailbox.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -10,18 +10,22 @@ GEN_OPTS__FLAG :=
|
||||
GEN_CMDS__FLAG :=
|
||||
|
||||
ORDERED_OBJS += \
|
||||
"./F2838x CM EtherCAT Slave.obj" \
|
||||
"./cia402appl.obj" \
|
||||
"./coeappl.obj" \
|
||||
"./ecatappl.obj" \
|
||||
"./ecatcoe.obj" \
|
||||
"./ecatfoe.obj" \
|
||||
"./ecatslv.obj" \
|
||||
"./ethercat_slave_cm_hal.obj" \
|
||||
"./f2838x_cm_hw.obj" \
|
||||
"./f2838x_cm_system.obj" \
|
||||
"./foeappl.obj" \
|
||||
"./mailbox.obj" \
|
||||
"./objdef.obj" \
|
||||
"./sdoserv.obj" \
|
||||
"./startup_cm.obj" \
|
||||
"./tiescfoe.obj" \
|
||||
"./device/cm.obj" \
|
||||
"../2838x_RAM_lnk_ecat_cm.cmd" \
|
||||
"C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib" \
|
||||
@ -156,8 +160,8 @@ f2838x_cm_cia402_solution.out: $(OBJS) $(CMD_SRCS) $(LIB_SRCS) $(GEN_CMDS)
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(EXE_OUTPUTS__QUOTED)
|
||||
-$(RM) "cia402appl.obj" "coeappl.obj" "ecatappl.obj" "ecatcoe.obj" "ecatslv.obj" "ethercat_slave_cm_hal.obj" "f2838x_cm_hw.obj" "f2838x_cm_system.obj" "mailbox.obj" "objdef.obj" "sdoserv.obj" "startup_cm.obj" "device\cm.obj"
|
||||
-$(RM) "cia402appl.d" "coeappl.d" "ecatappl.d" "ecatcoe.d" "ecatslv.d" "ethercat_slave_cm_hal.d" "f2838x_cm_hw.d" "f2838x_cm_system.d" "mailbox.d" "objdef.d" "sdoserv.d" "startup_cm.d" "device\cm.d"
|
||||
-$(RM) "F2838x CM EtherCAT Slave.obj" "cia402appl.obj" "coeappl.obj" "ecatappl.obj" "ecatcoe.obj" "ecatfoe.obj" "ecatslv.obj" "ethercat_slave_cm_hal.obj" "f2838x_cm_hw.obj" "f2838x_cm_system.obj" "foeappl.obj" "mailbox.obj" "objdef.obj" "sdoserv.obj" "startup_cm.obj" "tiescfoe.obj" "device\cm.obj"
|
||||
-$(RM) "F2838x CM EtherCAT Slave.d" "cia402appl.d" "coeappl.d" "ecatappl.d" "ecatcoe.d" "ecatfoe.d" "ecatslv.d" "ethercat_slave_cm_hal.d" "f2838x_cm_hw.d" "f2838x_cm_system.d" "foeappl.d" "mailbox.d" "objdef.d" "sdoserv.d" "startup_cm.d" "tiescfoe.d" "device\cm.d"
|
||||
-@echo 'Finished clean'
|
||||
-@echo ' '
|
||||
|
||||
|
||||
90
RAM/objdef.d
90
RAM/objdef.d
@ -1,90 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
objdef.obj: ../objdef.c
|
||||
objdef.obj: ../ecat_def.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
objdef.obj: ../f2838x_cm_system.h
|
||||
objdef.obj: ../ecatslv.h
|
||||
objdef.obj: ../esc.h
|
||||
objdef.obj: ../f2838x_cm_hw.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
objdef.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
objdef.obj: ../esc.h
|
||||
objdef.obj: ../coeappl.h
|
||||
objdef.obj: ../objdef.h
|
||||
objdef.obj: ../sdoserv.h
|
||||
objdef.obj: ../ecatcoe.h
|
||||
objdef.obj: ../mailbox.h
|
||||
objdef.obj: ../objdef.h
|
||||
objdef.obj: ../sdoserv.h
|
||||
objdef.obj: ../ecatcoe.h
|
||||
objdef.obj: ../mailbox.h
|
||||
|
||||
../objdef.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../coeappl.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -1,75 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
sdoserv.obj: ../sdoserv.c
|
||||
sdoserv.obj: ../ecat_def.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h
|
||||
sdoserv.obj: ../f2838x_cm_system.h
|
||||
sdoserv.obj: ../ecatslv.h
|
||||
sdoserv.obj: ../esc.h
|
||||
sdoserv.obj: ../f2838x_cm_hw.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
sdoserv.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
sdoserv.obj: ../esc.h
|
||||
sdoserv.obj: ../objdef.h
|
||||
sdoserv.obj: ../sdoserv.h
|
||||
sdoserv.obj: ../ecatcoe.h
|
||||
sdoserv.obj: ../mailbox.h
|
||||
|
||||
../sdoserv.c:
|
||||
|
||||
../ecat_def.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdlib.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/string.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/xlocale/_string.h:
|
||||
|
||||
../f2838x_cm_system.h:
|
||||
|
||||
../ecatslv.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../f2838x_cm_hw.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
../esc.h:
|
||||
|
||||
../objdef.h:
|
||||
|
||||
../sdoserv.h:
|
||||
|
||||
../ecatcoe.h:
|
||||
|
||||
../mailbox.h:
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
# FIXED
|
||||
|
||||
startup_cm.obj: ../startup_cm.c
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h
|
||||
startup_cm.obj: C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h
|
||||
|
||||
../startup_cm.c:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/_stdint40.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/machine/_stdint.h:
|
||||
|
||||
C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include/sys/_stdint.h:
|
||||
|
||||
@ -5,6 +5,13 @@
|
||||
SHELL = cmd.exe
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
F2838x\ CM\ EtherCAT\ Slave.obj: ../F2838x\ CM\ EtherCAT\ Slave.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
|
||||
@echo 'Building file: "$<"'
|
||||
@echo 'Invoking: Arm Compiler'
|
||||
"C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O2 --include_path="C:/workspace_v12/f2838x_cm_cia402_solution" --include_path="C:/ti/c2000/C2000Ware_5_01_00_00/libraries/communications/Ethercat/f2838x/examples/f2838x_cm_cia402_solution" --include_path="C:/workspace_v12/f2838x_cm_cia402_solution/device" --include_path="C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f2838x/common/include" --include_path="C:/ti/c2000/C2000Ware_5_01_00_00/libraries/communications/Ethercat/f2838x/include" --include_path="C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --define=ETHERCAT_STACK --define=RAM --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --preproc_with_compile --preproc_dependency="F2838x CM EtherCAT Slave.d_raw" $(GEN_OPTS__FLAG) "$<"
|
||||
@echo 'Finished building: "$<"'
|
||||
@echo ' '
|
||||
|
||||
%.obj: ../%.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
|
||||
@echo 'Building file: "$<"'
|
||||
@echo 'Invoking: Arm Compiler'
|
||||
|
||||
@ -12,87 +12,111 @@ LIB_SRCS += \
|
||||
C:/ti/c2000/C2000Ware_5_01_00_00/driverlib/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib
|
||||
|
||||
C_SRCS += \
|
||||
../F2838x\ CM\ EtherCAT\ Slave.c \
|
||||
../cia402appl.c \
|
||||
../coeappl.c \
|
||||
../ecatappl.c \
|
||||
../ecatcoe.c \
|
||||
../ecatfoe.c \
|
||||
../ecatslv.c \
|
||||
../ethercat_slave_cm_hal.c \
|
||||
../f2838x_cm_hw.c \
|
||||
../f2838x_cm_system.c \
|
||||
../foeappl.c \
|
||||
../mailbox.c \
|
||||
../objdef.c \
|
||||
../sdoserv.c \
|
||||
../startup_cm.c
|
||||
../startup_cm.c \
|
||||
../tiescfoe.c
|
||||
|
||||
C_DEPS += \
|
||||
./F2838x\ CM\ EtherCAT\ Slave.d \
|
||||
./cia402appl.d \
|
||||
./coeappl.d \
|
||||
./ecatappl.d \
|
||||
./ecatcoe.d \
|
||||
./ecatfoe.d \
|
||||
./ecatslv.d \
|
||||
./ethercat_slave_cm_hal.d \
|
||||
./f2838x_cm_hw.d \
|
||||
./f2838x_cm_system.d \
|
||||
./foeappl.d \
|
||||
./mailbox.d \
|
||||
./objdef.d \
|
||||
./sdoserv.d \
|
||||
./startup_cm.d
|
||||
./startup_cm.d \
|
||||
./tiescfoe.d
|
||||
|
||||
OBJS += \
|
||||
./F2838x\ CM\ EtherCAT\ Slave.obj \
|
||||
./cia402appl.obj \
|
||||
./coeappl.obj \
|
||||
./ecatappl.obj \
|
||||
./ecatcoe.obj \
|
||||
./ecatfoe.obj \
|
||||
./ecatslv.obj \
|
||||
./ethercat_slave_cm_hal.obj \
|
||||
./f2838x_cm_hw.obj \
|
||||
./f2838x_cm_system.obj \
|
||||
./foeappl.obj \
|
||||
./mailbox.obj \
|
||||
./objdef.obj \
|
||||
./sdoserv.obj \
|
||||
./startup_cm.obj
|
||||
./startup_cm.obj \
|
||||
./tiescfoe.obj
|
||||
|
||||
OBJS__QUOTED += \
|
||||
"F2838x CM EtherCAT Slave.obj" \
|
||||
"cia402appl.obj" \
|
||||
"coeappl.obj" \
|
||||
"ecatappl.obj" \
|
||||
"ecatcoe.obj" \
|
||||
"ecatfoe.obj" \
|
||||
"ecatslv.obj" \
|
||||
"ethercat_slave_cm_hal.obj" \
|
||||
"f2838x_cm_hw.obj" \
|
||||
"f2838x_cm_system.obj" \
|
||||
"foeappl.obj" \
|
||||
"mailbox.obj" \
|
||||
"objdef.obj" \
|
||||
"sdoserv.obj" \
|
||||
"startup_cm.obj"
|
||||
"startup_cm.obj" \
|
||||
"tiescfoe.obj"
|
||||
|
||||
C_DEPS__QUOTED += \
|
||||
"F2838x CM EtherCAT Slave.d" \
|
||||
"cia402appl.d" \
|
||||
"coeappl.d" \
|
||||
"ecatappl.d" \
|
||||
"ecatcoe.d" \
|
||||
"ecatfoe.d" \
|
||||
"ecatslv.d" \
|
||||
"ethercat_slave_cm_hal.d" \
|
||||
"f2838x_cm_hw.d" \
|
||||
"f2838x_cm_system.d" \
|
||||
"foeappl.d" \
|
||||
"mailbox.d" \
|
||||
"objdef.d" \
|
||||
"sdoserv.d" \
|
||||
"startup_cm.d"
|
||||
"startup_cm.d" \
|
||||
"tiescfoe.d"
|
||||
|
||||
C_SRCS__QUOTED += \
|
||||
"../F2838x CM EtherCAT Slave.c" \
|
||||
"../cia402appl.c" \
|
||||
"../coeappl.c" \
|
||||
"../ecatappl.c" \
|
||||
"../ecatcoe.c" \
|
||||
"../ecatfoe.c" \
|
||||
"../ecatslv.c" \
|
||||
"../ethercat_slave_cm_hal.c" \
|
||||
"../f2838x_cm_hw.c" \
|
||||
"../f2838x_cm_system.c" \
|
||||
"../foeappl.c" \
|
||||
"../mailbox.c" \
|
||||
"../objdef.c" \
|
||||
"../sdoserv.c" \
|
||||
"../startup_cm.c"
|
||||
"../startup_cm.c" \
|
||||
"../tiescfoe.c"
|
||||
|
||||
|
||||
|
||||
@ -1,81 +1,107 @@
|
||||
<?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 XDS2xx USB Debug Probe_0">
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS2xx USB Debug Probe_0" href="connections/TIXDS2XXUSB_Connection.xml" id="Texas Instruments XDS2xx USB Debug Probe_0" xml="TIXDS2XXUSB_Connection.xml" xmlpath="connections"/>
|
||||
|
||||
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS2xx USB Debug Probe_0">
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560icepick_c.xml" id="drivers" xml="tixds560icepick_c.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560c28x.xml" id="drivers" xml="tixds560c28x.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cla2.xml" id="drivers" xml="tixds560cla2.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_child.xml" id="drivers" xml="tixds560cs_child.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cortexM.xml" id="drivers" xml="tixds560cortexM.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560ajsm.xml" id="drivers" xml="tixds560ajsm.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/>
|
||||
|
||||
|
||||
<device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D" simulation="no">
|
||||
|
||||
|
||||
<router HW_revision="1.0" XML_version="1.2" description="ICEPick_C router" id="IcePick_C_0" isa="ICEPICK_C">
|
||||
|
||||
|
||||
<subpath id="Subpath_1">
|
||||
|
||||
|
||||
<property Type="numericfield" Value="0x11" desc="Port Number_0" id="Port Number"/>
|
||||
|
||||
|
||||
</subpath>
|
||||
|
||||
|
||||
<subpath id="CM">
|
||||
|
||||
|
||||
<property Type="numericfield" Value="0x12" desc="Port Number_1" id="Port Number"/>
|
||||
|
||||
|
||||
</subpath>
|
||||
|
||||
|
||||
</router>
|
||||
|
||||
|
||||
</device>
|
||||
|
||||
|
||||
</platform>
|
||||
|
||||
|
||||
</connection>
|
||||
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS2xx USB Debug Probe_0" href="connections/TIXDS2XXUSB_Connection.xml" id="Texas Instruments XDS2xx USB Debug Probe_0" xml="TIXDS2XXUSB_Connection.xml" xmlpath="connections"/>
|
||||
|
||||
|
||||
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS2xx USB Debug Probe_0">
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560icepick_c.xml" id="drivers" xml="tixds560icepick_c.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560c28x.xml" id="drivers" xml="tixds560c28x.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cla2.xml" id="drivers" xml="tixds560cla2.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_child.xml" id="drivers" xml="tixds560cs_child.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560cortexM.xml" id="drivers" xml="tixds560cortexM.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds560ajsm.xml" id="drivers" xml="tixds560ajsm.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/>
|
||||
|
||||
|
||||
|
||||
<device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D" simulation="no">
|
||||
|
||||
|
||||
|
||||
<router HW_revision="1.0" XML_version="1.2" description="ICEPick_C router" id="IcePick_C_0" isa="ICEPICK_C">
|
||||
|
||||
|
||||
|
||||
<subpath id="Subpath_1">
|
||||
|
||||
|
||||
|
||||
<property Type="numericfield" Value="0x11" desc="Port Number_0" id="Port Number"/>
|
||||
|
||||
|
||||
|
||||
</subpath>
|
||||
|
||||
|
||||
|
||||
<subpath id="CM">
|
||||
|
||||
|
||||
|
||||
<property Type="numericfield" Value="0x12" desc="Port Number_1" id="Port Number"/>
|
||||
|
||||
|
||||
|
||||
</subpath>
|
||||
|
||||
|
||||
|
||||
</router>
|
||||
|
||||
|
||||
|
||||
</device>
|
||||
|
||||
|
||||
|
||||
</platform>
|
||||
|
||||
|
||||
|
||||
</connection>
|
||||
|
||||
|
||||
|
||||
</configuration>
|
||||
|
||||
|
||||
|
||||
|
||||
</configurations>
|
||||
|
||||
154
applInterface.h
154
applInterface.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -13,8 +14,10 @@
|
||||
\author EthercatSSC@beckhoff.com
|
||||
\brief Definition of the application interface functions
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 COE4: update default entry name handling in case of 16Bit characters, add CoE Read/write indication functions<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 APPL1: add optional application function called from the main loop (after mbx and esm are executed)<br>
|
||||
V5.12 EEPROM3: implement a store EEPROM timeout handler<br>
|
||||
@ -42,9 +45,12 @@ V5.10.1 : Start file change log
|
||||
#include "objdef.h"
|
||||
#include "ecatappl.h"
|
||||
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 49 to 51 deleted*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 54 to 56 deleted*/
|
||||
|
||||
#include "foeappl.h"
|
||||
|
||||
#endif /*#ifndef _APPL_INTERFACE_H_*/
|
||||
|
||||
@ -60,18 +66,159 @@ V5.10.1 : Start file change log
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 76 to 122 deleted*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 125 to 152 deleted*/
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pName Pointer to the name of the file (the pointer is null if the function is called due to a previous busy state)
|
||||
\param nameSize Length of the file name (the value is 0 if the function is called due to a previous busy state)
|
||||
\param password Password for the file read (the value is 0 if the function is called due to a previous busy state)
|
||||
\param maxBlockSize Maximum size of a data block (copied to pData)
|
||||
\param pData Destination pointer for the first FoE fragment
|
||||
|
||||
|
||||
|
||||
/*ECATCHANGE_START(V5.12) APPL1*/
|
||||
\return block size:
|
||||
< FOE_MAXBUSY-101 (0x7F95)
|
||||
busy:
|
||||
FOE_MAXBUSY-100 (0%) (0x7FFA - 0x64)
|
||||
...
|
||||
FOE_MAXBUSY (100%) (0x7FFA)
|
||||
error:
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (0x8000)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (0x8001)
|
||||
ECAT_FOE_ERRCODE_ACCESS (0x8002)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (0x8003)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (0x8004)
|
||||
ECAT_FOE_ERRCODE_EXISTS (0x8006)
|
||||
ECAT_FOE_ERRCODE_NOUSER (0x8007)
|
||||
|
||||
\brief The function is called when a file read request was received. The Foe fragments shall always have the length of "maxBlockSize" till the last file fragment.
|
||||
\brief In case that the file size is a multiple of "maxBlockSize" 0 shall be returned after the last fragment.
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO UINT16 (*pAPPL_FoeRead)(UINT16 MBXMEM * pName, UINT16 nameSize, UINT32 password, UINT16 maxBlockSize, UINT16 *pData);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param offset File offset which shall be transmitted next
|
||||
\param maxBlockSize Maximum size of a data block (copied to pData)
|
||||
\param pData Destination pointer for the next foe fragment
|
||||
|
||||
|
||||
|
||||
\return block size:
|
||||
< FOE_MAXBUSY-101 (0x7F95)
|
||||
busy:
|
||||
FOE_MAXBUSY-100 (0%) (0x7FFA - 0x64)
|
||||
...
|
||||
FOE_MAXBUSY (100%) (0x7FFA)
|
||||
error:
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (0x8000)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (0x8001)
|
||||
ECAT_FOE_ERRCODE_ACCESS (0x8002)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (0x8003)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (0x8004)
|
||||
ECAT_FOE_ERRCODE_EXISTS (0x8006)
|
||||
ECAT_FOE_ERRCODE_NOUSER (0x8007)
|
||||
|
||||
\brief The function is called to transmit FoE read data 2 .. n (the slave received an acknowledge on a previous accepted file read request). The Foe fragments shall always have the length of "maxBlockSize" till the last file fragment.
|
||||
\brief In case that the file size is a multiple of "maxBlockSize" 0 shall be returned after the last fragment.
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO UINT16(*pAPPL_FoeReadData)(UINT32 offset, UINT16 maxBlockSize, UINT16 *pData);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param errorCode Error code send by the EtherCAT master
|
||||
|
||||
|
||||
\brief The function is called when the master has send an FoE Abort.
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO void(*pAPPL_FoeError)(UINT32 errorCode);
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pName Pointer to the name of the file
|
||||
\param nameSize Length of the file name
|
||||
\param password Password for the file read
|
||||
|
||||
\return okay, or an error code
|
||||
0 (okay)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (0x8000)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (0x8001)
|
||||
ECAT_FOE_ERRCODE_ACCESS (0x8002)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (0x8003)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (0x8004)
|
||||
ECAT_FOE_ERRCODE_EXISTS (0x8006)
|
||||
ECAT_FOE_ERRCODE_NOUSER (0x8007)
|
||||
|
||||
\brief This function is called on a received FoE write request.
|
||||
\brief (no busy response shall be returned by this function. If the slave requires some time to handle the incoming data the function pAPPL_FoeData() shall return a busy)
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO UINT16 (*pAPPL_FoeWrite)(UINT16 MBXMEM * pName, UINT16 nameSize, UINT32 password);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pData Received file data
|
||||
\param Size Length of received file data
|
||||
\param bDataFollowing TRUE if more FoE Data requests are following
|
||||
|
||||
\return okay, busy or an error code
|
||||
0 (okay)
|
||||
FOE_MAXBUSY-100 (0%) (0x7FFa - 100)
|
||||
FOE_MAXBUSY (100%) (0x7FFA)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (0x8000)
|
||||
ECAT_FOE_ERRCODE_ACCESS (0x8002)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (0x8003)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (0x8004)
|
||||
ECAT_FOE_ERRCODE_NOUSER (0x8007)
|
||||
|
||||
\brief This function is called on a FoE Data request
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO UINT16(*pAPPL_FoeWriteData)(UINT16 MBXMEM * pData, UINT16 Size, BOOL bDataFollowing);
|
||||
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param Index Index of the object to be read
|
||||
\param Subindex Subindex of the object entry to be read
|
||||
\param CompleteAccess Indicates if the object is read with complete access
|
||||
|
||||
\brief The function is called before an object/entry is read
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO void(*pAPPL_CoeReadInd)(UINT16 Index, UINT8 Subindex, BOOL CompleteAccess);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param Index Index of the object which was written
|
||||
\param Subindex Subindex of the object entry which was written
|
||||
\param CompleteAccess Indicates if the object was written with complete access
|
||||
|
||||
\brief The function is called after an object/entry was successfully written
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO void(*pAPPL_CoeWriteInd)(UINT16 Index, UINT8 Subindex, BOOL CompleteAccess);
|
||||
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief This function is called by the SSC from the main loop
|
||||
\brief The function pointer is reset in MainInit() so it shall be set afterwards
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
PROTO void(*pAPPL_MainLoop)();
|
||||
/*ECATCHANGE_END(V5.12) APPL1*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
@ -114,5 +261,6 @@ PROTO void MainLoop(void);
|
||||
PROTO void ECAT_StateChange(UINT8 alStatus, UINT16 alStatusCode);
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 348 to 361 deleted*/
|
||||
|
||||
#undef PROTO
|
||||
|
||||
108
cia402appl.c
108
cia402appl.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -14,8 +15,11 @@
|
||||
\brief Implementation
|
||||
This file contains all ciA402 specific functions
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 CIA402 2: write profile info to 0xF010.x bit15-0 (was bit16-31 before)<br>
|
||||
V5.13 CIA402 3: change define "CIA402_DEVICE" to "CiA402_SAMPLE_APPLICATION"<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 COE3: update entry access right handling<br>
|
||||
<br>Changes to version V5.10:<br>
|
||||
@ -45,6 +49,8 @@ V4.30 : create file (state machine; handling state transition options; input fee
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "ecat_def.h"
|
||||
|
||||
/*ECATCHANGE_START(V5.13) CIA402 3*/
|
||||
/*ECATCHANGE_END(V5.13) CIA402 3*/
|
||||
|
||||
#include "applInterface.h"
|
||||
|
||||
@ -55,6 +61,7 @@ V4.30 : create file (state machine; handling state transition options; input fee
|
||||
#include "cia402appl.h"
|
||||
#undef _CiA402_
|
||||
|
||||
//#include <DebugP.h>
|
||||
|
||||
/*--------------------------------------------------------------------------------------
|
||||
------
|
||||
@ -809,23 +816,9 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
UINT16 i = subindex;
|
||||
UINT16 maxSubindex = sConfiguredModuleIdentList.u16SubIndex0;
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM *pEntry;
|
||||
/* lastSubindex is used for complete access to make loop over the requested entries
|
||||
to be read, we initialize this variable with the requested subindex that only
|
||||
one loop will be done for a single access */
|
||||
UINT8 lastSubindex = subindex;
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 818 to 823 deleted*/
|
||||
|
||||
if ( bCompleteAccess )
|
||||
{
|
||||
if ( subindex == 0 )
|
||||
{
|
||||
/* we change the subindex 0 */
|
||||
maxSubindex = (UINT8) pData[0];
|
||||
}
|
||||
|
||||
/* we write until the maximum subindex */
|
||||
lastSubindex = (UINT8)maxSubindex;
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 825 to 838 deleted*/
|
||||
if (subindex > maxSubindex)
|
||||
{
|
||||
/* the maximum subindex is reached */
|
||||
@ -841,9 +834,7 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
|
||||
/* check if we have write access (bits 3-5 (PREOP, SAFEOP, OP) of ObjAccess)
|
||||
by comparing with the actual state (bits 1-3 (PREOP, SAFEOP, OP) of AL Status) */
|
||||
/*ECATCHANGE_START(V5.12) COE3*/
|
||||
if (0 == (((UINT8) ((pEntry->ObjAccess & ACCESS_WRITE) >> 2)) & (nAlStatus & STATE_MASK) ))
|
||||
/*ECATCHANGE_END(V5.12) COE3*/
|
||||
{
|
||||
/* we don't have write access */
|
||||
if ( (pEntry->ObjAccess & ACCESS_WRITE) == 0 )
|
||||
@ -860,7 +851,7 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
}
|
||||
|
||||
/* we use the standard write function */
|
||||
for (i = subindex; i <= lastSubindex; i++)
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 871 to 873 deleted*/
|
||||
{
|
||||
/* we have to copy the entry */
|
||||
if (i == 0)
|
||||
@ -882,6 +873,7 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
UINT32 CurValue = sConfiguredModuleIdentList.aEntries[(i-1)];
|
||||
UINT16 MBXMEM *pVarPtr = (UINT16 MBXMEM *) &sConfiguredModuleIdentList.aEntries[(i-1)];
|
||||
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT) lines 895 to 898 deleted*/
|
||||
pVarPtr[0] = pData[0];
|
||||
pVarPtr[1] = pData[1];
|
||||
pData += 2;
|
||||
@ -926,7 +918,9 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
for (cnt = 0 ; cnt < sConfiguredModuleIdentList.u16SubIndex0; cnt++)
|
||||
{
|
||||
/*all Modules have the same profile number*/
|
||||
sModuleProfileInfo.aEntries[cnt] = DEVICE_PROFILE_TYPE;
|
||||
/*ECATCHANGE_START(V5.13) CIA402 2*/
|
||||
sModuleProfileInfo.aEntries[cnt] = (DEVICE_PROFILE_TYPE >> 16);
|
||||
/*ECATCHANGE_END(V5.13) CIA402 2*/
|
||||
|
||||
switch(sConfiguredModuleIdentList.aEntries[cnt])
|
||||
{
|
||||
@ -955,56 +949,6 @@ UINT8 Write0xF030( UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ generic functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief The function is called when an error state was acknowledged by the master
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void APPL_AckErrorInd(UINT16 stateTrans)
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return AL Status Code (see ecatslv.h ALSTATUSCODE_....)
|
||||
|
||||
\brief The function is called in the state transition from INIT to PREOP when
|
||||
all general settings were checked to start the mailbox handler. This function
|
||||
informs the application about the state transition, the application can refuse
|
||||
the state transition when returning an AL Status error code.
|
||||
The return code NOERROR_INWORK can be used, if the application cannot confirm
|
||||
the state transition immediately, in that case the application need to be complete
|
||||
the transition by calling ECAT_StateChange.
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 APPL_StartMailboxHandler(void)
|
||||
{
|
||||
return ALSTATUSCODE_NOERROR;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return 0, NOERROR_INWORK
|
||||
|
||||
\brief The function is called in the state transition from PREEOP to INIT
|
||||
to stop the mailbox handler. This functions informs the application
|
||||
about the state transition, the application cannot refuse
|
||||
the state transition.
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 APPL_StopMailboxHandler(void)
|
||||
{
|
||||
return ALSTATUSCODE_NOERROR;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pIntMask pointer to the AL Event Mask which will be written to the AL event Mask
|
||||
@ -1041,7 +985,9 @@ UINT16 APPL_StartInputHandler(UINT16 *pIntMask)
|
||||
for (cnt = 0 ; cnt < sRxPDOassign.u16SubIndex0; cnt++)
|
||||
{
|
||||
/*all Modules have the same profile number*/
|
||||
sModuleProfileInfo.aEntries[cnt] = DEVICE_PROFILE_TYPE;
|
||||
/*ECATCHANGE_START(V5.13) CIA402 2*/
|
||||
sModuleProfileInfo.aEntries[cnt] = (DEVICE_PROFILE_TYPE >> 16);
|
||||
/*ECATCHANGE_END(V5.13) CIA402 2*/
|
||||
|
||||
switch((sRxPDOassign.aEntries[cnt] & 0x000F)) //get only identification of the PDO mapping object
|
||||
{
|
||||
@ -1077,6 +1023,7 @@ UINT16 APPL_StartInputHandler(UINT16 *pIntMask)
|
||||
}
|
||||
}
|
||||
}
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 1099 to 1105 deleted*/
|
||||
|
||||
return ALSTATUSCODE_NOERROR;
|
||||
}
|
||||
@ -1156,7 +1103,7 @@ UINT16 APPL_GenerateMapping(UINT16* pInputSize,UINT16* pOutputSize)
|
||||
return ALSTATUSCODE_NOVALIDOUTPUTS;
|
||||
}
|
||||
|
||||
/** Update object dictionary according to activated axis
|
||||
/*Update object dictionary according to activated axis
|
||||
which axes are activated is calculated by object 0x1C12*/
|
||||
for(PDOAssignEntryCnt = 0; PDOAssignEntryCnt < sRxPDOassign.u16SubIndex0; PDOAssignEntryCnt++)
|
||||
{
|
||||
@ -1432,16 +1379,9 @@ void APPL_Application(void)
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\return The Explicit Device ID of the EtherCAT slave
|
||||
/*ET9300 Project Handler :(#if EXPLICIT_DEVICE_ID) lines 1461 to 1472 deleted*/
|
||||
|
||||
\brief Calculate the Explicit Device ID
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
UINT16 APPL_GetDeviceID(void)
|
||||
{
|
||||
return 0x0005;
|
||||
}
|
||||
/*ET9300 Project Handler :(#if USE_DEFAULT_MAIN) lines 1474 to 1505 deleted*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
@ -1454,6 +1394,8 @@ int main(void)
|
||||
/* initialize the Hardware and the EtherCAT Slave Controller */
|
||||
HW_Init();
|
||||
|
||||
DebugP_log((char*)"--\n");
|
||||
|
||||
MainInit();
|
||||
|
||||
/*Initialize Axes structures*/
|
||||
@ -1464,7 +1406,7 @@ int main(void)
|
||||
bRunApplication = TRUE;
|
||||
do
|
||||
{
|
||||
MainLoop();
|
||||
// MainLoop();
|
||||
|
||||
} while (bRunApplication == TRUE);
|
||||
|
||||
|
||||
85
cia402appl.h
85
cia402appl.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -13,8 +14,10 @@
|
||||
\author EthercatSSC@beckhoff.com
|
||||
\brief CiA402 specific defines; objects; Axes structure
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 CIA402 1: update names and pdo mapping flags according ETG.6010<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 CIA402 1: change define value STATUSWORD_STATE_SWITCHEDONDISABLED<br>
|
||||
V5.12 CIA402 2: update control word mask for transition 3 (Ready to switch on to Switched on)<br>
|
||||
@ -45,9 +48,7 @@ V5.01 : Start file change log
|
||||
- ControlWord Commands Mask (IEC61800_184e)
|
||||
-----------------------------------------------*/
|
||||
#define CONTROLWORD_COMMAND_SHUTDOWN_MASK 0x0087 /**< \brief Shutdown command mask*/
|
||||
/*ECATCHANGE_START(V5.12) CIA402 2*/
|
||||
#define CONTROLWORD_COMMAND_SWITCHON_MASK 0x008F /**< \brief Switch on command mask*/
|
||||
/*ECATCHANGE_END(V5.12) CIA402 2*/
|
||||
#define CONTROLWORD_COMMAND_SWITCHON_ENABLEOPERATION_MASK 0x008F /**< \brief Switch on & Enable command mask*/
|
||||
#define CONTROLWORD_COMMAND_DISABLEVOLTAGE_MASK 0x0082 /**< \brief Disable voltage command mask*/
|
||||
#define CONTROLWORD_COMMAND_QUICKSTOP_MASK 0x0086 /**< \brief Quickstop command mask*/
|
||||
@ -87,9 +88,7 @@ V5.01 : Start file change log
|
||||
- StatusWord
|
||||
-----------------------------------------------*/
|
||||
#define STATUSWORD_STATE_NOTREADYTOSWITCHON 0x0000 /**< \brief Not ready to switch on*/
|
||||
/* ECATCHANGE_START(V5.12) CIA402 1*/
|
||||
#define STATUSWORD_STATE_SWITCHEDONDISABLED 0x0040 /**< \brief Switched on but disabled*/
|
||||
/* ECATCHANGE_END(V5.12) CIA402 1*/
|
||||
#define STATUSWORD_STATE_READYTOSWITCHON 0x0021 /**< \brief Ready to switch on*/
|
||||
#define STATUSWORD_STATE_SWITCHEDON 0x0023 /**< \brief Switched on*/
|
||||
#define STATUSWORD_STATE_OPERATIONENABLED 0x0027 /**< \brief Operation enabled*/
|
||||
@ -327,6 +326,7 @@ V5.01 : Start file change log
|
||||
|
||||
#define MAX_AXES 2 /**< \brief Number of supported axes*/
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 329 to 331 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
@ -358,9 +358,7 @@ TOBJ1600;
|
||||
/** \brief 0x1601 (csp RxPDO) data structure*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief SubIndex 0*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT32 aEntries[3]; /**< \brief Entry buffer*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1601;
|
||||
|
||||
@ -368,9 +366,7 @@ TOBJ1601;
|
||||
/** \brief 0x1602 (csv RxPDO) data structure*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief SubIndex 0*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT32 aEntries[3]; /**< \brief Entry buffer*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1602;
|
||||
|
||||
@ -386,9 +382,7 @@ TOBJ1A00;
|
||||
/** \brief 0x1A01 (csp TxPDO) data structure*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief SubIndex 0*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT32 aEntries[3]; /**< \brief Entry buffer*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1A01;
|
||||
|
||||
@ -396,9 +390,7 @@ TOBJ1A01;
|
||||
/** \brief 0x1A02 (csv TxPDO) data structure*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief SubIndex 0*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT32 aEntries[3]; /**< \brief Entry buffer*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1A02;
|
||||
/** @}*/
|
||||
@ -527,9 +519,7 @@ typedef struct STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 ObjStatusWord; /**< \brief Status word (0x6041)*/
|
||||
INT32 ObjPositionActualValue; /**< \brief Actual position (0x6064)*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT16 Padding16Bit; /**< \brief 16bit padding*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
}STRUCT_PACKED_END
|
||||
TCiA402PDO1A01;
|
||||
|
||||
@ -539,9 +529,7 @@ typedef struct STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 ObjStatusWord; /**< \brief Status word (0x6041)*/
|
||||
INT32 ObjPositionActualValue; /**< \brief Actual position (0x6064)*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT16 Padding16Bit; /**< \brief 16bit padding*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
}STRUCT_PACKED_END
|
||||
TCiA402PDO1A02;
|
||||
|
||||
@ -562,9 +550,7 @@ typedef struct STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 ObjControlWord; /**< \brief Control word (0x6040)*/
|
||||
INT32 ObjTargetPosition; /**< \brief Target position (0x607A)*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT16 Padding16Bit; /**< \brief 16bit padding*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
}STRUCT_PACKED_END
|
||||
TCiA402PDO1601;
|
||||
|
||||
@ -574,14 +560,13 @@ typedef struct STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 ObjControlWord; /**< \brief Control word (0x6040)*/
|
||||
INT32 ObjTargetVelocity; /**< \brief Target velocity (0x60FF)*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
UINT16 Padding16Bit; /**< \brief 16bit padding*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
}STRUCT_PACKED_END
|
||||
TCiA402PDO1602;
|
||||
/** @}*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 573 to 575 deleted*/
|
||||
|
||||
/**
|
||||
* \addtogroup CiA402Objects CiA402 Axis Objects
|
||||
@ -720,9 +705,7 @@ OBJCONST UCHAR OBJMEM aName0x1600[] = "csp/csv RxPDO\000\377";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1601[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ }, /* Subindex 000 */
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}, /* SubIndex 001*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{ DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ }, /* SubIndex 002*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}}; /* SubIndex 003*/
|
||||
|
||||
|
||||
@ -740,9 +723,7 @@ OBJCONST UCHAR OBJMEM aName0x1601[] = "csp RxPDO\000\377";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1602[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ }, /* Subindex 000 */
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}, /* SubIndex 001*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{ DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ }, /* SubIndex 002*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}}; /* SubIndex 003*/
|
||||
|
||||
|
||||
@ -781,9 +762,7 @@ OBJCONST UCHAR OBJMEM aName0x1A00[] = "csp/csv TxPDO\000\377";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1A01[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ }, /* Subindex 000 */
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}, /* SubIndex 001*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{ DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ }, /* SubIndex 002*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}}; /* SubIndex 003 */
|
||||
|
||||
|
||||
@ -802,9 +781,7 @@ OBJCONST UCHAR OBJMEM aName0x1A01[] = "csp TxPDO\000\377";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1A02[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ }, /* Subindex 000 */
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}, /* SubIndex 001*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{ DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ }, /* SubIndex 002*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}}; /* SubIndex 003*/
|
||||
|
||||
|
||||
@ -822,9 +799,10 @@ OBJCONST UCHAR OBJMEM aName0x1A02[] = "csv TxPDO\000\377";
|
||||
* \addtogroup CiA402Objects CiA402 Axis Objects
|
||||
* @{
|
||||
*/
|
||||
/*ECATCHANGE_START(V5.13) CIA402 1*/
|
||||
|
||||
/** \brief Object 0x603F (Error Code) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x603F = {DEFTYPE_UNSIGNED16, 0x10, ACCESS_READ};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x603F = {DEFTYPE_UNSIGNED16, 0x10, (ACCESS_READ | OBJACCESS_TXPDOMAPPING) };
|
||||
|
||||
/** \brief Object 0x603F (Error Code) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x603F[] = "Error Code";
|
||||
@ -845,7 +823,7 @@ OBJCONST UCHAR OBJMEM aName0x6041[] = "Status Word";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x605A = {DEFTYPE_INTEGER16, 0x10, ACCESS_READWRITE};
|
||||
|
||||
/** \brief Object 0x605A (Quickstop Option Code) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x605A[] = "Quickstop Option Code";
|
||||
OBJCONST UCHAR OBJMEM aName0x605A[] = "Quick stop option code";
|
||||
|
||||
/** \brief Object 0x605B (Shutdown Option Code) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x605B = {DEFTYPE_INTEGER16, 0x10, ACCESS_READWRITE};
|
||||
@ -864,7 +842,7 @@ OBJCONST UCHAR OBJMEM aName0x605C[] = "Disable Operation Option Code";
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x605E = {DEFTYPE_INTEGER16, 0x10, ACCESS_READWRITE};
|
||||
|
||||
/** \brief Object 0x605E (Fault Reaction Code) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x605E[] = "Fault Reaction Code";
|
||||
OBJCONST UCHAR OBJMEM aName0x605E[] = "Fault reaction option code";
|
||||
|
||||
/** \brief Object 0x6060 (Modes of Operation) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6060 = {DEFTYPE_INTEGER8, 0x08, (ACCESS_READWRITE|OBJACCESS_RXPDOMAPPING)};
|
||||
@ -873,31 +851,31 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6060 = {DEFTYPE_INTEGER8, 0x08,
|
||||
OBJCONST UCHAR OBJMEM aName0x6060[] = "Modes of Operation";
|
||||
|
||||
/** \brief Object 0x6061 (Modes of Operation Display) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6061 = {DEFTYPE_INTEGER8, 0x08, (ACCESS_READ|OBJACCESS_TXPDOMAPPING)};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6061 = {DEFTYPE_INTEGER8, 0x08, (ACCESS_READ | OBJACCESS_TXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x6061 (Modes of Operation Display) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6061[] = "Modes of Operation Display";
|
||||
|
||||
/** \brief Object 0x6064 (Position Actual Value) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6064 = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READ|OBJACCESS_TXPDOMAPPING)};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6064 = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READ | OBJACCESS_TXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x6064 (Position Actual Value) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6064[] = "Position Actual Value";
|
||||
|
||||
/** \brief Object 0x606C (Velocity Actual Value) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x606C = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READ|OBJACCESS_TXPDOMAPPING)};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x606C = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READ | OBJACCESS_TXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x606C (Velocity Actual Value) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x606C[] = "Velocity Actual Value";
|
||||
|
||||
/** \brief Object 0x6077 (Torque Actual Value) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6077 = {DEFTYPE_INTEGER16, 0x10, ACCESS_READ};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6077 = {DEFTYPE_INTEGER16, 0x10, (ACCESS_READ | OBJACCESS_TXPDOMAPPING) };
|
||||
|
||||
/** \brief Object 0x6077 (Torque Actual Value) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6077[] = "Torque Actual Value";
|
||||
|
||||
/** \brief Object 0x607A (Target Position) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x607A = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE|OBJACCESS_RXPDOMAPPING)};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x607A = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x607A (Target Position) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x607A[] = "Target Position";
|
||||
@ -911,8 +889,8 @@ OBJCONST UCHAR OBJMEM aName0x607A[] = "Target Position";
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x607D[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x08, ACCESS_READ},
|
||||
{DEFTYPE_INTEGER32, 0x20, ACCESS_READWRITE},
|
||||
{DEFTYPE_INTEGER32, 0x20, ACCESS_READWRITE}};
|
||||
{DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)},
|
||||
{DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)}};
|
||||
|
||||
|
||||
/** \brief Object 0x607D (Software Position Limit) object and entry names*/
|
||||
@ -920,10 +898,10 @@ OBJCONST UCHAR OBJMEM aName0x607D[] = "Software Position Limit\000Min position l
|
||||
|
||||
|
||||
/** \brief Object 0x6085 (Quickstop Declaration) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6085 = {DEFTYPE_INTEGER32, 0x20, ACCESS_READWRITE};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6085 = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x6085 (Quickstop Declaration) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6085[] = "Quickstop Declaration";
|
||||
OBJCONST UCHAR OBJMEM aName0x6085[] = "Quick stop deceleration";
|
||||
|
||||
|
||||
/**
|
||||
@ -935,23 +913,24 @@ OBJCONST UCHAR OBJMEM aName0x6085[] = "Quickstop Declaration";
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x60C2[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x08, ACCESS_READ},
|
||||
{DEFTYPE_UNSIGNED8, 0x08, ACCESS_READWRITE},
|
||||
{DEFTYPE_INTEGER8, 0x08, ACCESS_READWRITE}};
|
||||
{DEFTYPE_UNSIGNED8, 0x08, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)},
|
||||
{DEFTYPE_INTEGER8, 0x08, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)}};
|
||||
|
||||
/** \brief Object 0x60C2 (Interpolation Time Period) object and entry names*/
|
||||
OBJCONST UCHAR OBJMEM aName0x60C2[] = "Interpolation Time Period\000Interpolation period \000Interpolation Index\000\377";
|
||||
OBJCONST UCHAR OBJMEM aName0x60C2[] = "Interpolation Time Period\000Interpolation time period value\000Interpolation time index\000\377";
|
||||
|
||||
|
||||
/** \brief Object 0x60FF (Target Velocity) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x60FF = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE|OBJACCESS_RXPDOMAPPING)};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x60FF = {DEFTYPE_INTEGER32, 0x20, (ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING)};
|
||||
|
||||
/** \brief Object 0x60FF (Target Velocity) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x60FF[] = "Target Velocity";
|
||||
|
||||
|
||||
/** \brief Object 0x6502 (Supported Drive Modes) entry description*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6502 = {DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ};
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x6502 = {DEFTYPE_UNSIGNED32, 0x20, (ACCESS_READ | OBJACCESS_TXPDOMAPPING )};
|
||||
|
||||
/*ECATCHANGE_END(V5.13) CIA402 1*/
|
||||
/** \brief Object 0x6502 (Supported Drive Modes) object name*/
|
||||
OBJCONST UCHAR OBJMEM aName0x6502[] = "Supported Drive Modes";
|
||||
/** @}*/
|
||||
@ -1004,7 +983,7 @@ OBJCONST UCHAR OBJMEM aName0xF010[] = "Module Profile List";
|
||||
* SubIndex x
|
||||
* (x > 0)
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0xF030[3] = {
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0xF030[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x08, (ACCESS_READ|ACCESS_WRITE_PREOP)},
|
||||
{DEFTYPE_UNSIGNED32, 0x20, (ACCESS_READ|ACCESS_WRITE_PREOP)},
|
||||
{DEFTYPE_UNSIGNED32, 0x20, (ACCESS_READ|ACCESS_WRITE_PREOP)}};
|
||||
@ -1014,7 +993,7 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0xF030[3] = {
|
||||
*
|
||||
* no entry names defined because the object is an array (for every entry > 0 "SubIndex xxx" is returned)
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0xF030[] = "Configured module Ident list";
|
||||
OBJCONST UCHAR OBJMEM aName0xF030[] = "Configured Module Ident List";
|
||||
|
||||
|
||||
/**
|
||||
@ -1148,15 +1127,11 @@ PROTO CiA402Objects DefCiA402ObjectValues
|
||||
#ifdef _CiA402_
|
||||
= {
|
||||
{5, {0x60400010,0x607A0020,0x60FF0020,0x60600008,0x00000008}}, /* TOBJ1600*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{3, {0x60400010,0x607A0020,0x00000010 }}, /*TOBJ1601*/
|
||||
{3, {0x60400010,0x60FF0020,0x00000010 }}, /*TOBJ1602*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
{5, {0x60410010,0x60640020,0x606C0020,0x60610008,0x00000008}}, /*TOBJ1A00*/
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{3, {0x60410010,0x60640020,0x00000010 }}, /*TOBJ1A01*/
|
||||
{3, {0x60410010,0x60640020,0x00000010 }},/*TOBJ1A02*/
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
0x0,/*(UINT16) ErrorCode 0x1001*/
|
||||
0x0,/*(UINT16) ControlWord 0x6040*/
|
||||
0x0,/*(UINT16) StatusWord 0x6041*/
|
||||
@ -1213,19 +1188,15 @@ PROTO TOBJECT OBJMEM DefCiA402AxisObjDic[]
|
||||
/* Object 0x1600 */
|
||||
{NULL,NULL, 0x1600, {DEFTYPE_PDOMAPPING, 5 | (OBJCODE_REC << 8)}, asEntryDesc0x1600, aName0x1600, NULL, NULL, NULL, 0x0000 },
|
||||
/* Object 0x1601 */
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{NULL,NULL, 0x1601, {DEFTYPE_PDOMAPPING, 3 | (OBJCODE_REC << 8)}, asEntryDesc0x1601, aName0x1601,NULL, NULL, NULL, 0x0000 },
|
||||
/* Object 0x1602 */
|
||||
{NULL,NULL, 0x1602, {DEFTYPE_PDOMAPPING, 3 | (OBJCODE_REC << 8)}, asEntryDesc0x1602, aName0x1602, NULL, NULL, NULL, 0x0000 },
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
/* Object 0x1A00 */
|
||||
{NULL,NULL, 0x1A00, {DEFTYPE_PDOMAPPING, 5 | (OBJCODE_REC << 8)}, asEntryDesc0x1A00, aName0x1A00, NULL, NULL, NULL, 0x0000 },
|
||||
/* Object 0x1A01 */
|
||||
/*ECATCHANGE_START(V5.12) CiA402 3*/
|
||||
{NULL,NULL, 0x1A01, {DEFTYPE_PDOMAPPING, 3 | (OBJCODE_REC << 8)}, asEntryDesc0x1A01, aName0x1A01, NULL, NULL, NULL, 0x0000 },
|
||||
/* Object 0x1A02 */
|
||||
{NULL,NULL, 0x1A02, {DEFTYPE_PDOMAPPING, 3 | (OBJCODE_REC << 8)}, asEntryDesc0x1A02, aName0x1A02, NULL, NULL, NULL, 0x0000 },
|
||||
/*ECATCHANGE_END(V5.12) CiA402 3*/
|
||||
/* Object 0x603F */
|
||||
{NULL,NULL, 0x603F, {DEFTYPE_UNSIGNED16 , 0 | (OBJCODE_VAR << 8)}, &sEntryDesc0x603F, aName0x603F, NULL, NULL, NULL, 0x0000 },
|
||||
/* Object 0x6040 */
|
||||
@ -1267,7 +1238,7 @@ PROTO TOBJECT OBJMEM DefCiA402AxisObjDic[]
|
||||
;
|
||||
|
||||
PROTO void APPL_Application(void);
|
||||
PROTO UINT16 APPL_GetDeviceID(void);
|
||||
/*ET9300 Project Handler :(#if EXPLICIT_DEVICE_ID) lines 1248 to 1250 deleted*/
|
||||
|
||||
PROTO void APPL_AckErrorInd(UINT16 stateTrans);
|
||||
PROTO UINT16 APPL_StartMailboxHandler(void);
|
||||
|
||||
165
coeappl.c
165
coeappl.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -14,12 +15,19 @@
|
||||
\brief Implementation
|
||||
This file contains an example for CoE services and the CoE object dictionary
|
||||
|
||||
\version 5.12.1
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 CIA402 3: change define "CIA402_DEVICE" to "CiA402_SAMPLE_APPLICATION"<br>
|
||||
V5.13 COE1: handling objects with 255 entries<br>
|
||||
V5.13 COE10: change 0x10F1.1 access from "rw" to "ro"<br>
|
||||
V5.13 COE2: handle Backup entries with the code VAR<br>
|
||||
V5.13 COE6: add 0x10F0.2 (Backup parameter changed)<br>
|
||||
V5.13 COE7: define 0x1C3x.13 Shift Time too short, just define variable because expected in DC mode but shift mode is not supported by the SSC<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 COE1: load backup value after the complete OD was initialized<br>
|
||||
V5.12 COE4: add timestamp object (0x10F8) and update diagnosis handling<br>
|
||||
V5.12 COE8: fix invalid sizecalculation to init backup entries<br>
|
||||
V5.12 COE4: add time stamp object (0x10F8) and update diagnosis handling<br>
|
||||
V5.12 COE8: fix invalid size calculation to init backup entries<br>
|
||||
V5.12 ECAT1: update SM Parameter measurement (based on the system time), enhancement for input only devices and no mailbox support, use only 16Bit pointer in process data length caluclation<br>
|
||||
V5.12 ECAT5: update Sync error counter/flag handling,check enum memory alignment depending on the processor,in case of a polled timer disable ESC interrupts during DC_CheckWatchdog<br>
|
||||
<br>Changes to version V5.10:<br>
|
||||
@ -31,7 +39,7 @@ V5.11 ECAT4: enhance SM/Sync monitoring for input/output only slaves<br>
|
||||
V5.10 COE1: Define one entry description for all 0x1C3x objects and change data type of SI11,12,13 to UINT16 (according ETG.1020)<br>
|
||||
V5.10 COE2: Change return value of Get ObjectSize to UINT32<br>
|
||||
Change object size to UINT32<br>
|
||||
V5.10 ECAT13: Update Synchronisation handling (FreeRun,SM Sync, Sync0, Sync1)<br>
|
||||
V5.10 ECAT13: Update Synchronization handling (FreeRun,SM Sync, Sync0, Sync1)<br>
|
||||
Compare DC UINT configuration (by ESC Config data) vs. DC activation register settings<br>
|
||||
Update 0x1C3x entries<br>
|
||||
<br>Changes to version V5.0:<br>
|
||||
@ -119,10 +127,14 @@ V4.00 ECAT 1: The handling of the Sync Manager Parameter was included according
|
||||
/*remove definition of _COEAPPL_ (#ifdef is used in coeappl.h)*/
|
||||
|
||||
#define _OBJD_
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED && !TEST_APPLICATION) lines 130 to 133 deleted*/
|
||||
|
||||
|
||||
/*Add Application specific Objects*/
|
||||
/*ECATCHANGE_START(V5.13) CIA402 3*/
|
||||
/*ECATCHANGE_END(V5.13) CIA402 3*/
|
||||
#include "cia402appl.h"
|
||||
/*ET9300 Project Handler :(#elif EL9800_APPLICATION) lines 141 to 152 deleted*/
|
||||
|
||||
|
||||
#undef _OBJD_
|
||||
@ -131,6 +143,7 @@ V4.00 ECAT 1: The handling of the Sync Manager Parameter was included according
|
||||
------ Backup Parameter
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 161 to 168 deleted*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
@ -211,7 +224,7 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x1009 = {DEFTYPE_VISIBLESTRING,B
|
||||
/**
|
||||
* \brief 0x1009 (Hardware version) object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1009[] = "Hardware version";
|
||||
OBJCONST UCHAR OBJMEM aName0x1009[] = "Manufacturer Hardware version";
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
@ -223,16 +236,17 @@ OBJCONST UCHAR OBJMEM aName0x1009[] = "Hardware version";
|
||||
CHAR acSoftwareversion[] = DEVICE_SW_VERSION;
|
||||
|
||||
/**
|
||||
* \brief 0x1009 (Hardware version) entry description
|
||||
* \brief 0x100A (Software version) entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x100A = {DEFTYPE_VISIBLESTRING,BYTE2BIT(DEVICE_SW_VERSION_LEN), ACCESS_READ};
|
||||
|
||||
/**
|
||||
* \brief 0x1009 (Hardware version) object name
|
||||
* \brief 0x100A (Software version) object name
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x100A[] = "Software version";
|
||||
OBJCONST UCHAR OBJMEM aName0x100A[] = "Manufacturer Software version";
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 271 to 397 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
@ -263,9 +277,10 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1018[] = {
|
||||
/**
|
||||
* \brief 0x1018 (Identity) object and entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1018[] = "Identity\000Vendor ID\000Product code\000Revision\000Serial number\000\377";
|
||||
OBJCONST UCHAR OBJMEM aName0x1018[] = "Identity Object\000Vendor ID\000Product Code\000Revision Number\000Serial Number\000\377";
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 431 to 456 deleted*/
|
||||
|
||||
/*---------------------------------------------
|
||||
- 0x10F1
|
||||
@ -278,7 +293,9 @@ OBJCONST UCHAR OBJMEM aName0x1018[] = "Identity\000Vendor ID\000Product code\000
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x10F1[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ },
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READWRITE},
|
||||
/*ECATCHANGE_START(V5.13) COE10*/
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ},
|
||||
/*ECATCHANGE_END(V5.13) COE10*/
|
||||
{DEFTYPE_UNSIGNED16, 0x10, ACCESS_READWRITE}};
|
||||
|
||||
/**
|
||||
@ -290,7 +307,6 @@ OBJCONST UCHAR OBJMEM aName0x10F1[] = "Error Settings\000Local Error Reaction\00
|
||||
//object declaration and initialization in objdef.h
|
||||
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
/*---------------------------------------------
|
||||
- 0x10F8 (Timestamp object)
|
||||
-----------------------------------------------*/
|
||||
@ -298,7 +314,6 @@ OBJCONST UCHAR OBJMEM aName0x10F1[] = "Error Settings\000Local Error Reaction\00
|
||||
* \brief 0x10F8 (Timestamp object) entry description
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM sEntryDesc0x10F8 = { DEFTYPE_UNSIGNED64, 0x40, ACCESS_READWRITE | OBJACCESS_TXPDOMAPPING } ;
|
||||
|
||||
/**
|
||||
* \brief 0x10F8 (Timestamp object) object name
|
||||
*/
|
||||
@ -352,9 +367,10 @@ UINT8 Read0x10F8(UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM *
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief This function updates the local timestamp object (0x10F8) and has to be called at least every 4.2sec to detect an 32Bit DC unit overrun.
|
||||
\brief This function updates the local time stamp object (0x10F8) and has to be called at least every 4.2sec to detect an 32Bit DC unit overrun.
|
||||
Called from the Timer handler
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
void COE_SyncTimeStamp(void)
|
||||
@ -388,7 +404,6 @@ void COE_SyncTimeStamp(void)
|
||||
u32CheckForDcOverrunCnt = 0;
|
||||
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
|
||||
|
||||
@ -406,9 +421,9 @@ void COE_SyncTimeStamp(void)
|
||||
* SI4 (SM3): Process data In (0x4)
|
||||
*
|
||||
*/
|
||||
/*ECATCHANGE_START(V5.12)*/
|
||||
/*ECATCHANGE_START(V5.13)*/
|
||||
TOBJ1C00 sSyncmanagertype = {0x04, {0x0201, 0x0403}};
|
||||
/*ECATCHANGE_END(V5.12)*/
|
||||
/*ECATCHANGE_END(V5.13)*/
|
||||
|
||||
|
||||
/**
|
||||
@ -436,6 +451,7 @@ OBJCONST UCHAR OBJMEM aName0x1C00[] = "Sync manager type";
|
||||
*/
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1C3x[] = {
|
||||
{DEFTYPE_UNSIGNED8, 0x8, ACCESS_READ }, /* Subindex 000 */
|
||||
/*ET9300 Project Handler :(#if !AL_EVENT_ENABLED && !DC_SUPPORTED) lines 635 to 637 deleted*/
|
||||
{DEFTYPE_UNSIGNED16, 0x10, (ACCESS_READ | ACCESS_WRITE_PREOP)}, /* SubIndex 001: Synchronization Type */
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READ}, /* SubIndex 002: Cycle Time */
|
||||
{0x0000, 0x20, 0}, /* SubIndex 003: Shift Time (not supported)*/
|
||||
@ -448,7 +464,9 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1C3x[] = {
|
||||
{DEFTYPE_UNSIGNED32, 0x20, ACCESS_READWRITE}, /* SubIndex 010: Sync0 Cycle Time */
|
||||
{DEFTYPE_UNSIGNED16, 0x10, ACCESS_READ}, /* SubIndex 011: SM-Event Missed */
|
||||
{DEFTYPE_UNSIGNED16, 0x10, ACCESS_READ}, /* SubIndex 012: Cycle Time Too Small */
|
||||
{0x0000, 0x10, 0}, /* SubIndex 013: Shift Too Short Counter (not supported)*/
|
||||
/*ECATCHANGE_START(V5.13) COE7*/
|
||||
{DEFTYPE_UNSIGNED16, 0x10, ACCESS_READ}, /* SubIndex 013: Shift Too Short Counter*/
|
||||
/*ECATCHANGE_END(V5.13) COE7*/
|
||||
{0x0000, 0x10, 0}, /* Subindex 014: RxPDO Toggle Failed (not supported)*/
|
||||
{0x0000, 0x20, 0}, /* Subindex 015: Minimum Cycle Distance (not supported)*/
|
||||
{0x0000, 0x20, 0}, /* Subindex 016: Maximum Cycle Distance (not supported)*/
|
||||
@ -472,12 +490,12 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM asEntryDesc0x1C3x[] = {
|
||||
/**
|
||||
* \brief 0x1C32 (SyncManager 2 parameter) object and entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1C32[] = "SM output parameter\000Synchronization Type\000Cycle Time\000\000Synchronization Types supported\000Minimum Cycle Time\000Calc and Copy Time\000\000Get Cycle Time\000Delay Time\000Sync0 Cycle Time\000SM-Event Missed\000Cycle Time Too Small\000Shift Time Too Short\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000Sync Error\000\377";
|
||||
OBJCONST UCHAR OBJMEM aName0x1C32[] = "SM output parameter\000Synchronization Type\000Cycle Time\000\000Synchronization Types supported\000Minimum Cycle Time\000Calc and Copy Time\000\000Get Cycle Time\000Delay Time\000Sync0 Cycle Time\000SM-Event Missed\000Cycle Time Too Small\000Shift Time Too Short Counter\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000Sync Error\000\377";
|
||||
|
||||
/**
|
||||
* \brief 0x1C33 (SyncManager 3 parameter) object and entry names
|
||||
*/
|
||||
OBJCONST UCHAR OBJMEM aName0x1C33[] = "SM input parameter\000Synchronization Type\000Cycle Time\000\000Synchronization Types supported\000Minimum Cycle Time\000Calc and Copy Time\000\000Get Cycle Time\000Delay Time\000Sync0 Cycle Time\000SM-Event Missed\000Cycle Time Too Small\000Shift Time Too Short\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000Sync Error\000\377";
|
||||
OBJCONST UCHAR OBJMEM aName0x1C33[] = "SM input parameter\000Synchronization Type\000Cycle Time\000\000Synchronization Types supported\000Minimum Cycle Time\000Calc and Copy Time\000\000Get Cycle Time\000Delay Time\000Sync0 Cycle Time\000SM-Event Missed\000Cycle Time Too Small\000Shift Time Too Short Counter\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000Sync Error\000\377";
|
||||
|
||||
/******************************************************************************
|
||||
** Object Dictionary
|
||||
@ -485,7 +503,7 @@ OBJCONST UCHAR OBJMEM aName0x1C33[] = "SM input parameter\000Synchronization Typ
|
||||
/**
|
||||
* \brief Object dictionary pointer
|
||||
*/
|
||||
TOBJECT OBJMEM * ObjDicList = NULL;
|
||||
TOBJECT OBJMEM * ObjDicList = NULL;
|
||||
|
||||
/**
|
||||
* \brief List of generic application independent objects
|
||||
@ -501,14 +519,15 @@ TOBJECT OBJMEM GenObjDic[] = {
|
||||
{NULL,NULL, 0x1009, {DEFTYPE_VISIBLESTRING, 0 | (OBJCODE_VAR << 8)}, &sEntryDesc0x1009, aName0x1009, acHardwareversion, NULL, NULL, 0x0000 },
|
||||
/* Object 0x100A */
|
||||
{NULL,NULL, 0x100A, {DEFTYPE_VISIBLESTRING, 0 | (OBJCODE_VAR << 8)}, &sEntryDesc0x100A, aName0x100A, acSoftwareversion, NULL, NULL, 0x0000 },
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 711 to 716 deleted*/
|
||||
/* Object 0x1018 */
|
||||
{NULL,NULL, 0x1018, {DEFTYPE_IDENTITY, 4 | (OBJCODE_REC << 8)}, asEntryDesc0x1018, aName0x1018, &sIdentity, NULL, NULL, 0x0000 },
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 719 to 724 deleted*/
|
||||
/* Object 0x10F1 */
|
||||
{NULL,NULL, 0x10F1, {DEFTYPE_RECORD, 2 | (OBJCODE_REC << 8)}, asEntryDesc0x10F1, aName0x10F1, &sErrorSettings, NULL, NULL, 0x0000 },
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
/* Object 0x10F8 */
|
||||
{ NULL,NULL, 0x10F8,{ DEFTYPE_UNSIGNED64, 0 | (OBJCODE_VAR << 8) }, &sEntryDesc0x10F8, aName0x10F8, &u64Timestamp, Read0x10F8, NULL , 0x0000 },
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 730 to 733 deleted*/
|
||||
/* Object 0x1C00 */
|
||||
{NULL,NULL, 0x1C00, {DEFTYPE_UNSIGNED8, 4 | (OBJCODE_ARR << 8)}, asEntryDesc0x1C00, aName0x1C00, &sSyncmanagertype, NULL, NULL, 0x0000 },
|
||||
/* Object 0x1C32 */
|
||||
@ -519,6 +538,7 @@ TOBJECT OBJMEM GenObjDic[] = {
|
||||
/*end of entries*/
|
||||
{NULL,NULL, 0xFFFF, {0, 0}, NULL, NULL, NULL, NULL, NULL, 0x000}};
|
||||
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 749 to 820 deleted*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
@ -536,8 +556,8 @@ OBJCONST TOBJECT OBJMEM * COE_GetObjectDictionary(void)
|
||||
return (OBJCONST TOBJECT OBJMEM *) ObjDicList;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 838 to 1048 deleted*/
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief Update the Sync Error Indication
|
||||
@ -545,6 +565,7 @@ OBJCONST TOBJECT OBJMEM * COE_GetObjectDictionary(void)
|
||||
void COE_UpdateSyncErrorStatus(void)
|
||||
{
|
||||
if (sSyncManOutPar.u16CycleExceededCounter > 0 || sSyncManOutPar.u16SmEventMissedCounter > sErrorSettings.u16SyncErrorCounterLimit)
|
||||
/*ET9300 Project Handler :(#if !_PIC18 #else) lines 1059 to 1061 deleted*/
|
||||
{
|
||||
sSyncManOutPar.u8SyncError = 1;
|
||||
}
|
||||
@ -555,6 +576,7 @@ void COE_UpdateSyncErrorStatus(void)
|
||||
|
||||
|
||||
if (sSyncManInPar.u16CycleExceededCounter > 0 || sSyncManInPar.u16SmEventMissedCounter > sErrorSettings.u16SyncErrorCounterLimit)
|
||||
/*ET9300 Project Handler :(#if !_PIC18 #else) lines 1075 to 1077 deleted*/
|
||||
{
|
||||
sSyncManInPar.u8SyncError = 1;
|
||||
}
|
||||
@ -564,7 +586,6 @@ void COE_UpdateSyncErrorStatus(void)
|
||||
}
|
||||
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
@ -573,6 +594,7 @@ void COE_UpdateSyncErrorStatus(void)
|
||||
|
||||
void COE_ObjInit(void)
|
||||
{
|
||||
|
||||
/* initialize the Sync Manager Output parameter object 0x1C32 */
|
||||
|
||||
sSyncManOutPar.subindex0 = 32;
|
||||
@ -597,9 +619,7 @@ void COE_ObjInit(void)
|
||||
sSyncManOutPar.u16SyncTypesSupported = SYNCTYPE_FREERUNSUPP /* ECAT FreeRun Mode is supported */
|
||||
|
||||
#if (PD_OUTPUT_CALC_AND_COPY_TIME == 0) || (PD_INPUT_CALC_AND_COPY_TIME == 0) || (MIN_PD_CYCLE_TIME == 0)
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
| SYNCTYPE_TIMESVARIABLE /* the execution times depend on the connected modules */
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
#endif
|
||||
| SYNCTYPE_SYNCHRONSUPP /* ECAT Synchron Mode is supported */
|
||||
| SYNCTYPE_DCSYNC0SUPP /* DC Sync0 Mode is supported */
|
||||
@ -624,13 +644,11 @@ void COE_ObjInit(void)
|
||||
/*subindex 9: time from start driving outputs until outputs are valid*/
|
||||
sSyncManOutPar.u32DelayTime = (PD_OUTPUT_DELAY_TIME);
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
/*subindex 11: reset the sm missed error counter*/
|
||||
sSyncManOutPar.u16SmEventMissedCounter = 0;
|
||||
|
||||
/*subindex 12: reset the cycle exceed error counter*/
|
||||
sSyncManOutPar.u16CycleExceededCounter = 0;
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
/*subindex 32: indicates if a synchronisation error has occurred*/
|
||||
sSyncManOutPar.u8SyncError = 0;
|
||||
@ -643,29 +661,26 @@ void COE_ObjInit(void)
|
||||
|
||||
/* subindex 2: same as 0x1C32:02 */
|
||||
sSyncManInPar.u32CycleTime = sSyncManOutPar.u32CycleTime;
|
||||
/*ET9300 Project Handler :(#if MAX_PD_OUTPUT_SIZE > 0 #else) lines 1173 to 1175 deleted*/
|
||||
|
||||
/* subindex 4: same as 0x1C32:04 */
|
||||
sSyncManInPar.u16SyncTypesSupported = sSyncManOutPar.u16SyncTypesSupported;
|
||||
/*ET9300 Project Handler :(#elif MAX_PD_INPUT_SIZE > 0) lines 1180 to 1198 deleted*/
|
||||
|
||||
/* subindex 5: same as 0x1C32:05 */
|
||||
sSyncManInPar.u32MinCycleTime = MIN_PD_CYCLE_TIME;
|
||||
|
||||
/* subindex 6: delay read inputs, calculation and copy to SM buffer*/
|
||||
sSyncManInPar.u32CalcAndCopyTime = (PD_INPUT_CALC_AND_COPY_TIME);
|
||||
|
||||
/*subindex 8: trigger cycle time measurement*/
|
||||
sSyncManInPar.u16GetCycleTime = 0;
|
||||
|
||||
/*subindex 9: delay to prepare input latch*/
|
||||
sSyncManInPar.u32DelayTime = (PD_INPUT_DELAY_TIME);
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
/*subindex 11: reset the sm missed error counter*/
|
||||
sSyncManInPar.u16SmEventMissedCounter = 0;
|
||||
|
||||
/*subindex 12: reset the cycle exceed error counter*/
|
||||
sSyncManInPar.u16CycleExceededCounter = 0;
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
/*subindex 32: incremented if a synchronisation error has occurred*/
|
||||
sSyncManInPar.u8SyncError = 0;
|
||||
@ -682,36 +697,30 @@ void COE_ObjInit(void)
|
||||
}
|
||||
}
|
||||
|
||||
u8PendingSdo = 0;
|
||||
bStoreCompleteAccess = FALSE;
|
||||
u16StoreIndex = 0;
|
||||
u8StoreSubindex = 0;
|
||||
u32StoreDataSize = 0;
|
||||
pStoreData = NULL;
|
||||
pSdoPendFunc = NULL;
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE) lines 1233 to 1241 deleted*/
|
||||
|
||||
pSdoSegData = NULL;
|
||||
/*ET9300 Project Handler :(#if SEGMENTED_SDO_SUPPORTED) lines 1243 to 1245 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 1247 to 1259 deleted*/
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
UINT32 EscFeature = 0;
|
||||
HW_EscReadDWord(EscFeature, ESC_FEATURES_OFFSET);
|
||||
EscFeature = SWAPDWORD(EscFeature);
|
||||
|
||||
if ((EscFeature & ESC_DC_32BIT_MASK) > 0)
|
||||
{
|
||||
b32BitDc = FALSE;
|
||||
UINT32 EscFeature = 0;
|
||||
HW_EscReadDWord(EscFeature, ESC_FEATURES_OFFSET);
|
||||
EscFeature = SWAPDWORD(EscFeature);
|
||||
|
||||
if ((EscFeature & ESC_DC_32BIT_MASK) > 0)
|
||||
{
|
||||
b32BitDc = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
b32BitDc = TRUE;
|
||||
|
||||
HW_EscReadDWord(u32LastDc32Value, ESC_SYSTEMTIME_OFFSET);
|
||||
}
|
||||
|
||||
u32CheckForDcOverrunCnt = CHECK_DC_OVERRUN_IN_MS;
|
||||
}
|
||||
else
|
||||
{
|
||||
b32BitDc = TRUE;
|
||||
|
||||
HW_EscReadDWord(u32LastDc32Value, ESC_SYSTEMTIME_OFFSET);
|
||||
}
|
||||
|
||||
u32CheckForDcOverrunCnt = CHECK_DC_OVERRUN_IN_MS;
|
||||
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -903,45 +912,7 @@ UINT16 COE_ObjDictionaryInit(void)
|
||||
|
||||
void COE_Main(void)
|
||||
{
|
||||
UINT8 abort = 0;
|
||||
|
||||
if(pSdoPendFunc != NULL)
|
||||
{
|
||||
abort = pSdoPendFunc(u16StoreIndex,u8StoreSubindex,u32StoreDataSize,pStoreData,bStoreCompleteAccess);
|
||||
|
||||
if(abort != ABORTIDX_WORKING)
|
||||
{
|
||||
switch(u8PendingSdo)
|
||||
{
|
||||
case SDO_PENDING_SEG_WRITE:
|
||||
if(pSdoSegData)
|
||||
{
|
||||
/* the allocated buffer can be released */
|
||||
FREEMEM( (UINT16 VARMEM *) pSdoSegData );
|
||||
pSdoSegData = NULL;
|
||||
}
|
||||
case SDO_PENDING_WRITE:
|
||||
/*send SDO Download Response*/
|
||||
SDOS_SdoRes(abort, 0, NULL);
|
||||
break;
|
||||
|
||||
case SDO_PENDING_SEG_READ:
|
||||
case SDO_PENDING_READ:
|
||||
/* send SDO upload response */
|
||||
SDOS_SdoRes(abort, u32StoreDataSize, pStoreData);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
u8PendingSdo = 0;
|
||||
u16StoreIndex = 0;
|
||||
u8StoreSubindex = 0;
|
||||
u32StoreDataSize = 0;
|
||||
pStoreData = NULL;
|
||||
bStoreCompleteAccess = 0;
|
||||
pSdoPendFunc = NULL;
|
||||
}
|
||||
}
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE) lines 1474 to 1516 deleted*/
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
17
coeappl.h
17
coeappl.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -12,8 +13,10 @@
|
||||
\file coeappl.h
|
||||
\author EthercatSSC@beckhoff.com
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 COE6: add 0x10F0.2 (Backup parameter changed)<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 COE4: add timestamp object (0x10F8) and update diagnosis handling<br>
|
||||
V5.12 ECAT5: update Sync error counter/flag handling,check enum memory alignment depending on the processor,in case of a polled timer disable ESC interrupts during DC_CheckWatchdog<br>
|
||||
@ -29,7 +32,7 @@ V5.01 : Start file change log
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "objdef.h"
|
||||
|
||||
#include "ecatappl.h"
|
||||
|
||||
#ifndef _COEAPPL_H_
|
||||
#define _COEAPPL_H_
|
||||
@ -39,6 +42,7 @@ V5.01 : Start file change log
|
||||
------ Defines and Types
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 44 to 69 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
@ -58,6 +62,7 @@ TOBJ1018;
|
||||
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if BACKUP_PARAMETER_SUPPORTED) lines 89 to 105 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
@ -68,9 +73,7 @@ TOBJ1018;
|
||||
*/
|
||||
typedef struct OBJ_STRUCT_PACKED_START {
|
||||
UINT16 u16SubIndex0; /**< \brief SubIndex 0*/
|
||||
/*ECATCHANGE_START(V5.12)*/
|
||||
UINT16 aEntries[2]; /**< \brief Entry buffer (one for two SyncManagers)*/
|
||||
/*ECATCHANGE_END(V5.12)*/
|
||||
} OBJ_STRUCT_PACKED_END
|
||||
TOBJ1C00;
|
||||
|
||||
@ -90,13 +93,11 @@ TOBJ1C00;
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
PROTO UINT64 u64Timestamp
|
||||
#ifdef _COEAPPL_
|
||||
= { 0 }
|
||||
#endif
|
||||
;
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
PROTO UINT32 u32LastDc32Value;
|
||||
PROTO UINT32 u32CheckForDcOverrunCnt;
|
||||
@ -105,9 +106,7 @@ PROTO UINT32 u32CheckForDcOverrunCnt;
|
||||
------ Global functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
PROTO void COE_UpdateSyncErrorStatus(void);
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
PROTO void COE_ObjInit(void);
|
||||
PROTO void COE_Main(void);
|
||||
@ -116,9 +115,7 @@ PROTO UINT16 COE_AddObjectToDic(TOBJECT OBJMEM * pNewObjEntry);
|
||||
PROTO void COE_RemoveDicEntry(UINT16 index);
|
||||
PROTO void COE_ClearObjDictionary(void);
|
||||
PROTO OBJCONST TOBJECT OBJMEM * COE_GetObjectDictionary(void);
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
PROTO void COE_SyncTimeStamp(void);
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
#undef PROTO
|
||||
/** @}*/
|
||||
|
||||
148
ecat_def.h
148
ecat_def.h
@ -1,13 +1,14 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ ecat_def.h
|
||||
------ SSC version : 5.12
|
||||
------ SSC version : 5.13
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _ECATDEF_H_
|
||||
@ -28,7 +29,7 @@
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#define SSC_VERSION_MAJOR 5
|
||||
#define SSC_VERSION_MINOR 12
|
||||
#define SSC_VERSION_MINOR 13
|
||||
|
||||
|
||||
/**
|
||||
@ -37,7 +38,7 @@ EL9800_HW: Shall be set if the Slave code is executed on the PIC mounted on the
|
||||
This settings should also be enabled if the ESC is connected via a serial interface and no specific hardware access files are avilable yet.<br>
|
||||
NOTE: The PDI type needs also to be configured in the "ESC_CONFIG_DATA". */
|
||||
#ifndef EL9800_HW
|
||||
#define EL9800_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EL9800_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -45,72 +46,78 @@ MCI_HW: Shall be set if the MCI of the ESC is connected.<br>
|
||||
This settings should also be enabled if the ESC is connected via a parallel interface and no specific hardware access files are avilable yet.<br>
|
||||
NOTE: The PDI type needs also to be configured in the "ESC_CONFIG_DATA". */
|
||||
#ifndef MCI_HW
|
||||
#define MCI_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MCI_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
FC1100_HW: Shall be set if the EtherCAT slave controller is located on an FC1100 PCI card.<br>
|
||||
NOTE: The PDI type needs also to be configured in the "ESC_CONFIG_DATA". */
|
||||
#ifndef FC1100_HW
|
||||
#define FC1100_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define FC1100_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
TIESC_HW: Temporary define to support TI ICE/IDK development board (Shall be set if the Slave code shall executed on an AM335X ICE/IDK Evaluation Board<br>
|
||||
from Texas Instruments) */
|
||||
#ifndef TIESC_HW
|
||||
#define TIESC_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define TIESC_HW 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
CONTROLLER_16BIT: Shall be set if the host controller is a 16Bit architecture */
|
||||
#ifndef CONTROLLER_16BIT
|
||||
#define CONTROLLER_16BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define CONTROLLER_16BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
CONTROLLER_32BIT: Shall be set if the host controller is a 32Bit architecture */
|
||||
#ifndef CONTROLLER_32BIT
|
||||
#define CONTROLLER_32BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define CONTROLLER_32BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
MEMORY_UNIT_16BIT: Shall be set if the smallest controller memory unit is 16bit */
|
||||
#ifndef MEMORY_UNIT_16BIT
|
||||
#define MEMORY_UNIT_16BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
_PIC18: Microchip PIC18F452 Specific Code <br>
|
||||
This processor is mounted on the Beckhoff Slave Evaluation Board (Hardware version up to EL9800_2). */
|
||||
#ifndef _PIC18
|
||||
#define _PIC18 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define _PIC18 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
_PIC24: Microchip PIC24HJ128GP306 Specific Code <br>
|
||||
This processor is mounted on the Beckhoff Slave Evaluation Board (Hardware version up to EL9800_4A). */
|
||||
#ifndef _PIC24
|
||||
#define _PIC24 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define _PIC24 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_16BIT_ACCESS: If the microcontroller only supports 16Bit access to the ESC. */
|
||||
#ifndef ESC_16BIT_ACCESS
|
||||
#define ESC_16BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_16BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_32BIT_ACCESS: If the microcontroller only supports 32Bit access to the ESC. */
|
||||
#ifndef ESC_32BIT_ACCESS
|
||||
#define ESC_32BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_32BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
MBX_16BIT_ACCESS: If the microcontroller only supports 16Bit access to local mailbox memory(access to ESC DPRAM is controlled by "ESC_16BIT_ACCESS"). If reset 8Bit access is used. */
|
||||
#ifndef MBX_16BIT_ACCESS
|
||||
#define MBX_16BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MBX_16BIT_ACCESS 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
BIG_ENDIAN_16BIT: If the microcontroller always make 16 bit access to external memory, operates in BigEndian format<br>
|
||||
and the switching of the high and low byte is done in hardware. */
|
||||
#ifndef BIG_ENDIAN_16BIT
|
||||
#define BIG_ENDIAN_16BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define BIG_ENDIAN_16BIT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -118,32 +125,32 @@ BIG_ENDIAN_FORMAT: If the microcontroller works with BigEndian format, then this
|
||||
and DWORD-accesses will make a BYTE- or WORD-swapping, the macros SWAPWORD and SWAPDWORD in ecatslv.h might be adapted. <br>
|
||||
If this switch is set, then BIG_ENDIAN_16BIT shall be reset. */
|
||||
#ifndef BIG_ENDIAN_FORMAT
|
||||
#define BIG_ENDIAN_FORMAT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define BIG_ENDIAN_FORMAT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
EXT_DEBUGER_INTERFACE: If this switch is set, the external debugger interface on the EL9800_4A (_PIC24) will be activated.<br>
|
||||
This define will be ignored if _PIC24 is not set. */
|
||||
#ifndef EXT_DEBUGER_INTERFACE
|
||||
#define EXT_DEBUGER_INTERFACE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EXT_DEBUGER_INTERFACE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
UC_SET_ECAT_LED: If set the EtherCAT Run and Error LEDs are set by the uController. If set ESC_SUPPORT_ECAT_LED shall be reset. */
|
||||
#ifndef UC_SET_ECAT_LED
|
||||
#define UC_SET_ECAT_LED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define UC_SET_ECAT_LED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_SUPPORT_ECAT_LED: This switch can be enabled if the connected ESC support Error and Run LED indication. See the ESC datasheet if the LED indication is supported. If set UC_SET_ECAT_LED shall be reset. */
|
||||
#ifndef ESC_SUPPORT_ECAT_LED
|
||||
#define ESC_SUPPORT_ECAT_LED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_SUPPORT_ECAT_LED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_EEPROM_EMULATION: If this switch is set EEPROM emulation is supported. Not all ESC types support EEPROM emulation. See ESC datasheet for more information. */
|
||||
#ifndef ESC_EEPROM_EMULATION
|
||||
#define ESC_EEPROM_EMULATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_EEPROM_EMULATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -163,106 +170,111 @@ AL_EVENT_ENABLED: If an interrupt routine shall be called when one of the Events
|
||||
this switch has to be defined to 1 (synchronous modes are supported). <br>
|
||||
If the AL Event register shall only be polled, this switch has to be defined to 0 (only free run mode is supported). */
|
||||
#ifndef AL_EVENT_ENABLED
|
||||
#define AL_EVENT_ENABLED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define AL_EVENT_ENABLED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
DC_SUPPORTED: If distributed clocks should be supported by the slave, then this switch shall be set.<br>
|
||||
If this switch is set, then also AL_EVENT_ENABLED shall be set.<br>
|
||||
DC_SUPPORTED: If distributed clocks should be supported by the slave, this switch shall be set.<br>
|
||||
NOTE: The DC support needs also be set in the "ESC_CONFIG_DATA" settings. */
|
||||
#ifndef DC_SUPPORTED
|
||||
#define DC_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define DC_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ECAT_TIMER_INT: If this switch is set, then the watchdog time for the EtherCAT watchdog will be checked in a timer interrupt routine. */
|
||||
#ifndef ECAT_TIMER_INT
|
||||
#define ECAT_TIMER_INT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ECAT_TIMER_INT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
INTERRUPTS_SUPPORTED: If this switch is set the slave stack provides interrupt handling.<br>
|
||||
NOTE: value will be evaluated automatically!! */
|
||||
#ifndef INTERRUPTS_SUPPORTED
|
||||
#define INTERRUPTS_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define INTERRUPTS_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
TEST_APPLICATION: NOTE: THIS SETTING SHALL NOT BE USED TO CREATE A USER SPECIFIC APPLICATION!<br>
|
||||
Select this setting to test the slave stack or a master implementation. For further information about this application see the SSC Application Node. */
|
||||
#ifndef TEST_APPLICATION
|
||||
#define TEST_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define TEST_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
TEST_APPLICATION_REDUCED_MEMORY: This define reduces the memory footprint of the test application (should only be used if the default test application generates no memory errors when accessing the OD or FoE files) */
|
||||
#ifndef TEST_APPLICATION_REDUCED_MEMORY
|
||||
#define TEST_APPLICATION_REDUCED_MEMORY //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
EL9800_APPLICATION: Should be set if the Slave Sample Code runs on an EL9800_x Evaluation Board. */
|
||||
#ifndef EL9800_APPLICATION
|
||||
#define EL9800_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EL9800_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
CiA402_DEVICE: If this switch is set, then the sample implementation of CiA402 device profile will be activated. */
|
||||
#ifndef CiA402_DEVICE
|
||||
#define CiA402_DEVICE 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
CiA402_SAMPLE_APPLICATION: If this switch is set, then the sample implementation of CiA402 device profile will be activated. */
|
||||
#ifndef CiA402_SAMPLE_APPLICATION
|
||||
#define CiA402_SAMPLE_APPLICATION 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
SAMPLE_APPLICATION: Select this define if the hardware independent sample application shall be activated. */
|
||||
#ifndef SAMPLE_APPLICATION
|
||||
#define SAMPLE_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define SAMPLE_APPLICATION 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
SAMPLE_APPLICATION_INTERFACE: Select this define to activate the Sample Application Interface. This provides an simple interface to create a static library and used in an external application.<br>
|
||||
NOTE: The file "EtherCATSampleLibrary.h" includes the library interface (maybe need to be adapted). */
|
||||
#ifndef SAMPLE_APPLICATION_INTERFACE
|
||||
#define SAMPLE_APPLICATION_INTERFACE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define SAMPLE_APPLICATION_INTERFACE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
BOOTLOADER_SAMPLE: Select this define to enable a small footprint application which only supports the BOOT state and FoE mailbox protocol. */
|
||||
#ifndef BOOTLOADER_SAMPLE
|
||||
#define BOOTLOADER_SAMPLE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define BOOTLOADER_SAMPLE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
USE_DEFAULT_MAIN: Set to 1 if the main function of a default application shall be used.<br>
|
||||
Otherwise the Init functions and the mainloop handler shall be called for a user specific function (see ET9300 Application Note for further details www.beckhoff.com/english.asp?download/ethercat_development_products.htm?id=71003127100387). */
|
||||
Otherwise the Init functions and the mainloop handler shall be called for a user specific function (see ET9300 Application Note for further details https://www.beckhoff.com/de-de/support/downloadfinder/technische-dokumentationen/?q=ET1100). */
|
||||
#ifndef USE_DEFAULT_MAIN
|
||||
#define USE_DEFAULT_MAIN 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define USE_DEFAULT_MAIN 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
MAILBOX_QUEUE: If this switch is set, the mailbox services will be stored in a queue.<br>
|
||||
With this switch reset only one mailbox service can be processed in parallel. */
|
||||
#ifndef MAILBOX_QUEUE
|
||||
#define MAILBOX_QUEUE 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MAILBOX_QUEUE 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
AOE_SUPPORTED: If the AoE services are supported, then this switch shall be set. */
|
||||
#ifndef AOE_SUPPORTED
|
||||
#define AOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define AOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
COE_SUPPORTED: If the CoE services are supported, then his switch shall be set. */
|
||||
#ifndef COE_SUPPORTED
|
||||
#define COE_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define COE_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
COMPLETE_ACCESS_SUPPORTED: If the complete SDO access (accessing all entries of an object with one SDO service, then this<br>
|
||||
switch shall be set. Furthermore,COE_SUPPORTED shall be set. */
|
||||
#ifndef COMPLETE_ACCESS_SUPPORTED
|
||||
#define COMPLETE_ACCESS_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define COMPLETE_ACCESS_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
SEGMENTED_SDO_SUPPORTED: If the segmented SDO services should be supported, then this switch shall be set.<br>
|
||||
Furthermore, COE_SUPPORTED shall be set. */
|
||||
#ifndef SEGMENTED_SDO_SUPPORTED
|
||||
#define SEGMENTED_SDO_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define SEGMENTED_SDO_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -271,26 +283,26 @@ a serial interface is needed), this switch should be set. In that case ABORTIDX_
|
||||
returned from OBJ_Read or OBJ_Write and the response shall be sent by calling SDOS_SdoRes, when<br>
|
||||
the response is available. */
|
||||
#ifndef SDO_RES_INTERFACE
|
||||
#define SDO_RES_INTERFACE 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define SDO_RES_INTERFACE 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
USE_SINGLE_PDO_MAPPING_ENTRY_DESCR: If this setting is set a PDO mapping entry description just need to be defined for the first entry. For all furher entries the same description is used. */
|
||||
#ifndef USE_SINGLE_PDO_MAPPING_ENTRY_DESCR
|
||||
#define USE_SINGLE_PDO_MAPPING_ENTRY_DESCR 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define USE_SINGLE_PDO_MAPPING_ENTRY_DESCR 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
BACKUP_PARAMETER_SUPPORTED: If this switch is set, then the functions in the application example to load and<br>
|
||||
store backup parameter will be compiled. Furthermore, COE_SUPPORTED shall be set. */
|
||||
#ifndef BACKUP_PARAMETER_SUPPORTED
|
||||
#define BACKUP_PARAMETER_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define BACKUP_PARAMETER_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
STORE_BACKUP_PARAMETER_IMMEDIATELY: Objet values will be stored when they are written.This switch is only evaluated if "BACKUP_PARAMETER_SUPPORTED" is set. */
|
||||
#ifndef STORE_BACKUP_PARAMETER_IMMEDIATELY
|
||||
#define STORE_BACKUP_PARAMETER_IMMEDIATELY 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define STORE_BACKUP_PARAMETER_IMMEDIATELY 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -298,13 +310,13 @@ DIAGNOSIS_SUPPORTED: If this define is set the slave stack supports diagnosis me
|
||||
To support diagnosis messages COE_SUPPORTED shall be enabled and the platform shall support dynamic memory allocation.<br>
|
||||
NOTE: this feature is implemented according to ETG.1020 */
|
||||
#ifndef DIAGNOSIS_SUPPORTED
|
||||
#define DIAGNOSIS_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define DIAGNOSIS_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
EMERGENCY_SUPPORTED: If this define is set the slave stack supports emergency messages. COE_SUPPORTED or SOE_SUPPORTED shall be enabled */
|
||||
#ifndef EMERGENCY_SUPPORTED
|
||||
#define EMERGENCY_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EMERGENCY_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -312,7 +324,7 @@ VOE_SUPPORTED: If the VoE services should be supported, then this switch shall b
|
||||
VoE functions in mailbox.c are implemented, but the VoE service functions have to be added. Furthermore, the example code cannot be linked<br>
|
||||
correctly, because these functions are missing. */
|
||||
#ifndef VOE_SUPPORTED
|
||||
#define VOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define VOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -320,44 +332,44 @@ SOE_SUPPORTED: If the SoE services should be supported, then this switch shall b
|
||||
SoE functions in mailbox.c are implemented, but the SoE service functions have to be added. Furthermore, the example code cannot be linked<br>
|
||||
correctly, because these functions are missing. */
|
||||
#ifndef SOE_SUPPORTED
|
||||
#define SOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define SOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
EOE_SUPPORTED: If the EoE services should be supported, then this switch shall be set. */
|
||||
#ifndef EOE_SUPPORTED
|
||||
#define EOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
STATIC_ETHERNET_BUFFER: If this switch is set a static buffer is used to store ethernet frames, otherwise the buffer is allocated on demand */
|
||||
#ifndef STATIC_ETHERNET_BUFFER
|
||||
#define STATIC_ETHERNET_BUFFER 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define STATIC_ETHERNET_BUFFER 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
FOE_SUPPORTED: If the FoE services should be supported, then this switch shall be set. */
|
||||
#ifndef FOE_SUPPORTED
|
||||
#define FOE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define FOE_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
MAILBOX_SUPPORTED: This switch is set automatically if at least one mailbox protocol is enabled. */
|
||||
#ifndef MAILBOX_SUPPORTED
|
||||
#define MAILBOX_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MAILBOX_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
BOOTSTRAPMODE_SUPPORTED: If the firmware update over FoE services should be supported, then this switch shall be set.<br>
|
||||
If this switch is set, then also "FOE_SUPPORTED" shall be set. */
|
||||
#ifndef BOOTSTRAPMODE_SUPPORTED
|
||||
#define BOOTSTRAPMODE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define BOOTSTRAPMODE_SUPPORTED 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
OP_PD_REQUIRED: If this switch is reset the state transition SAFEOP_2_OP will also successful if no process data was received. The watchdog will only be active when first process data was received (bEcatFirstOutputsReceived) */
|
||||
#ifndef OP_PD_REQUIRED
|
||||
#define OP_PD_REQUIRED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define OP_PD_REQUIRED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -378,31 +390,31 @@ NOTE: Within the stack this value - 50ms will be used to react before the master
|
||||
CHECK_SM_PARAM_ALIGNMENT: If true the SyncManager length and start address will be checked according the ESC Access.<br>
|
||||
e.g. ESC_32BIT_ACCESS is set the length and address shall be to an even 4Byte address. */
|
||||
#ifndef CHECK_SM_PARAM_ALIGNMENT
|
||||
#define CHECK_SM_PARAM_ALIGNMENT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define CHECK_SM_PARAM_ALIGNMENT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
EXPLICIT_DEVICE_ID: If this switch is set Explicit device ID requests are handled. For further information about Explicit Device ID see ETG.1020 specification: www.ethercat.org/MemberArea/download_protocolenhancements.asp */
|
||||
#ifndef EXPLICIT_DEVICE_ID
|
||||
#define EXPLICIT_DEVICE_ID 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define EXPLICIT_DEVICE_ID 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_SM_WD_SUPPORTED: This switch should be set if the SyncManger watchdog provided by the ESC should be used. If reset the process data watchdog is triggered by a local timer */
|
||||
#ifndef ESC_SM_WD_SUPPORTED
|
||||
#define ESC_SM_WD_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_SM_WD_SUPPORTED 1 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
STATIC_OBJECT_DIC: If this switch is set, the object dictionary is "build" static (by default only PIC18 objects are added static) */
|
||||
#ifndef STATIC_OBJECT_DIC
|
||||
#define STATIC_OBJECT_DIC 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define STATIC_OBJECT_DIC 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
ESC_EEPROM_ACCESS_SUPPORT: If this switch is set the slave stack provides functions to access the EEPROM. */
|
||||
#ifndef ESC_EEPROM_ACCESS_SUPPORT
|
||||
#define ESC_EEPROM_ACCESS_SUPPORT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define ESC_EEPROM_ACCESS_SUPPORT 0 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
|
||||
@ -821,37 +833,37 @@ OBJ_WORD_ALIGN: Shall be set if the object structures are not Byte aligned and 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
ENTER_MBX_CRITICAL: Marco which is called when a critical mailbox section is entered */
|
||||
ENTER_MBX_CRITICAL: Macro which is called when a critical mailbox section is entered */
|
||||
#ifndef ENTER_MBX_CRITICAL
|
||||
#define ENTER_MBX_CRITICAL
|
||||
#endif
|
||||
|
||||
/**
|
||||
LEAVE_MBX_CRITICAL: Marco which is called when a critical mailbox section is left */
|
||||
LEAVE_MBX_CRITICAL: Macro which is called when a critical mailbox section is left */
|
||||
#ifndef LEAVE_MBX_CRITICAL
|
||||
#define LEAVE_MBX_CRITICAL
|
||||
#endif
|
||||
|
||||
/**
|
||||
ENTER_AOE_CRITICAL: Marco which is called when a critical AoE section is entered */
|
||||
ENTER_AOE_CRITICAL: Macro which is called when a critical AoE section is entered */
|
||||
#ifndef ENTER_AOE_CRITICAL
|
||||
#define ENTER_AOE_CRITICAL
|
||||
#endif
|
||||
|
||||
/**
|
||||
LEAVE_AOE_CRITICAL: Marco which is called when a critical AoE section is left */
|
||||
LEAVE_AOE_CRITICAL: Macro which is called when a critical AoE section is left */
|
||||
#ifndef LEAVE_AOE_CRITICAL
|
||||
#define LEAVE_AOE_CRITICAL
|
||||
#endif
|
||||
|
||||
/**
|
||||
ENTER_EMCY_CRITICAL: Marco which is called when a critical emergency section is entered */
|
||||
ENTER_EMCY_CRITICAL: Macro which is called when a critical emergency section is entered */
|
||||
#ifndef ENTER_EMCY_CRITICAL
|
||||
#define ENTER_EMCY_CRITICAL
|
||||
#endif
|
||||
|
||||
/**
|
||||
LEAVE_EMCY_CRITICAL: Marco which is called when a critical emergency section is left */
|
||||
LEAVE_EMCY_CRITICAL: Macro which is called when a critical emergency section is left */
|
||||
#ifndef LEAVE_EMCY_CRITICAL
|
||||
#define LEAVE_EMCY_CRITICAL
|
||||
#endif
|
||||
@ -898,7 +910,7 @@ REVISION_NUMBER: Object 0x1018 SI3 (EtherCAT product revision number) */
|
||||
/**
|
||||
SERIAL_NUMBER: Object 0x1018 SI4 (EtherCAT product serial number) */
|
||||
#ifndef SERIAL_NUMBER
|
||||
#define SERIAL_NUMBER 0x00001419
|
||||
#define SERIAL_NUMBER 0x00001234
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -998,7 +1010,7 @@ MAX_MBX_WRITE_ADDRESS: Maximum address for the write (receive) mailbox (Sync Man
|
||||
/**
|
||||
MAX_PD_INPUT_SIZE: Maximum size of the process input data (Sync Manager 3) for cyclic exchange. */
|
||||
#ifndef MAX_PD_INPUT_SIZE
|
||||
#define MAX_PD_INPUT_SIZE 0x0044 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MAX_PD_INPUT_SIZE 0x0044 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1016,7 +1028,7 @@ MAX_MBX_READ_ADDRESS: Maximum address for the read (send) mailbox (Sync Manager
|
||||
/**
|
||||
MAX_PD_OUTPUT_SIZE: Maximum size of the process output data (Sync Manager 2) for cyclic exchange. */
|
||||
#ifndef MAX_PD_OUTPUT_SIZE
|
||||
#define MAX_PD_OUTPUT_SIZE 0x044 //This define was already evaluated by ET9300 Project Handler(V. 1.4.1.0)!
|
||||
#define MAX_PD_OUTPUT_SIZE 0x044 //This define was already evaluated by ET9300 Project Handler(V. 1.5.3.0)!
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
221
ecatappl.c
221
ecatappl.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -15,8 +16,18 @@
|
||||
\brief Implementation
|
||||
This file contains the Process Data interface
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 CIA402 3: change define "CIA402_DEVICE" to "CiA402_SAMPLE_APPLICATION"<br>
|
||||
V5.13 CIA402 4: decouple CIA402 state machine and application from ESM (according ETG.6010, clause 4)<br>
|
||||
V5.13 COE4: update default entry name handling in case of 16Bit characters, add CoE Read/write indication functions<br>
|
||||
V5.13 ECAT 5: check inputsize before calling PDO_InputMappingdo not call PDO_InputMapping in case of no available process data<br>
|
||||
V5.13 ECAT 6: change input mapping trigger in case of DC Sync<br>
|
||||
V5.13 ECAT1: handle Sync mapped to AL Event<br>
|
||||
V5.13 ECAT4: set delay between EEPROM access retries to 10ms<br>
|
||||
V5.13 EEPROM1: update eeprom reload in case of ESC 32Bit access (and the small eeprom emulation)<br>
|
||||
V5.13 TEST6: add 0xA002 monitoring ob function calls<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 APPL1: add optional application function called from the main loop (after mbx and esm are executed)<br>
|
||||
V5.12 BOOT1: add a bootloader sample application (only the ESM and FoE is supported)<br>
|
||||
@ -51,7 +62,7 @@ V5.10 ECAT13: Update Synchronisation handling (FreeRun,SM Sync, Sync0, Sync1)<br
|
||||
Update 0x1C3x entries<br>
|
||||
V5.10 ECAT2: Prevent EEPROM data null pointer access (if the pointer is null an command error is set)<br>
|
||||
EEPROM emulation return command error if unknown command was received<br>
|
||||
V5.10 ECAT4: Update alignment marco for 8 to 15 bit alignments (16 and 32 Bit controllers)<br>
|
||||
V5.10 ECAT4: Update alignment macro for 8 to 15 bit alignments (16 and 32 Bit controllers)<br>
|
||||
Bugfix calculate LED blink frequency<br>
|
||||
V5.10 ECAT7: Add "bInitFinished" to indicate if the initialization is complete<br>
|
||||
V5.10 HW2: Change HW_GetTimer return value to UINT32<br>
|
||||
@ -133,12 +144,16 @@ V4.00 APPL 6: The main function was split in MainInit and MainLoop
|
||||
#include "coeappl.h"
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 148 to 150 deleted*/
|
||||
|
||||
#define _APPL_INTERFACE_ 1
|
||||
#include "applInterface.h"
|
||||
#undef _APPL_INTERFACE_
|
||||
|
||||
/*ECATCHANGE_START(V5.13) CIA402 3*/
|
||||
/*ECATCHANGE_END(V5.13) CIA402 3*/
|
||||
#include "cia402appl.h"
|
||||
/*ET9300 Project Handler :(#elif EL9800_APPLICATION) lines 160 to 173 deleted*/
|
||||
|
||||
|
||||
|
||||
@ -148,6 +163,7 @@ V4.00 APPL 6: The main function was split in MainInit and MainLoop
|
||||
------
|
||||
--------------------------------------------------------------------------------------*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_ACCESS_SUPPORT) lines 185 to 187 deleted*/
|
||||
|
||||
#ifndef ECAT_TIMER_INC_P_MS
|
||||
/**
|
||||
@ -158,16 +174,14 @@ V4.00 APPL 6: The main function was split in MainInit and MainLoop
|
||||
|
||||
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
#define MEASUREMENT_ACTIVE (((sSyncManOutPar.u16GetCycleTime & 0x1) == 0x1) || ((sSyncManInPar.u16GetCycleTime & 0x1) == 0x1))
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
/*ET9300 Project Handler :(#elif MAX_PD_OUTPUT_SIZE > 0) lines 204 to 210 deleted*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ local variables and constants
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
/*variables required to calculate values for SM Synchronisation objects (0x1C3x)*/
|
||||
|
||||
UINT32 u32CycleTimeStartValue; /** <\brief contains the timer start value to measure the application cycle (used in freerun and SM2 sync)*/
|
||||
@ -180,15 +194,16 @@ BOOL bMinCycleTimeMeasurementStarted; /** <\brief Indicates if the min cycle mea
|
||||
|
||||
UINT32 u32MinCycleTimeValue; /** <\brief tmp value of the min cycle time during measurement*/
|
||||
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 237 to 241 deleted*/
|
||||
|
||||
|
||||
UINT16 aPdOutputData[(MAX_PD_OUTPUT_SIZE>>1)];
|
||||
UINT16 aPdInputData[(MAX_PD_INPUT_SIZE>>1)];
|
||||
|
||||
/*variables are declared in ecatslv.c*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 252 to 256 deleted*/
|
||||
extern VARVOLATILE UINT8 u8dummy;
|
||||
|
||||
BOOL bInitFinished = FALSE; /** < \brief indicates if the initialization is finished*/
|
||||
@ -198,10 +213,8 @@ BOOL bInitFinished = FALSE; /** < \brief indicates if the initialization is fini
|
||||
------ local functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
UINT32 GetSystemTimeDelay(UINT32 u32StartTime);
|
||||
void HandleCycleTimeMeasurement(void);
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
@ -212,21 +225,19 @@ void HandleCycleTimeMeasurement(void);
|
||||
/**
|
||||
\brief This function will copies the inputs from the local memory to the ESC memory
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
/*ET9300 Project Handler :(#if _PIC18 && AL_EVENT_ENABLED) lines 284 to 288 deleted*/
|
||||
void PDO_InputMapping(void)
|
||||
{
|
||||
|
||||
#if ((MIN_PD_CYCLE_TIME == 0) || (PD_INPUT_CALC_AND_COPY_TIME == 0))
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
UINT32 u32TimeValue = 0;
|
||||
UINT16 ALEvent = HW_GetALEventRegister_Isr();
|
||||
ALEvent = SWAPWORD(ALEvent);
|
||||
|
||||
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
u32TimeValue = GetSystemTimeDelay(0);
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
#endif /* ((MIN_PD_CYCLE_TIME == 0) || (PD_INPUT_CALC_AND_COPY_TIME == 0)) */
|
||||
|
||||
|
||||
@ -241,7 +252,6 @@ void PDO_InputMapping(void)
|
||||
|
||||
|
||||
#if ((MIN_PD_CYCLE_TIME == 0) || (PD_INPUT_CALC_AND_COPY_TIME == 0))
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
@ -278,7 +288,6 @@ void PDO_InputMapping(void)
|
||||
#endif /* (MIN_PD_CYCLE_TIME == 0) */
|
||||
}
|
||||
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
#endif /* ((MIN_PD_CYCLE_TIME == 0) || (PD_INPUT_CALC_AND_COPY_TIME == 0)) */
|
||||
|
||||
}
|
||||
@ -287,9 +296,9 @@ void PDO_InputMapping(void)
|
||||
\brief This function will copies the outputs from the ESC memory to the local memory.
|
||||
This function is only called in case of an SM2 (output process data) event.
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
/*ET9300 Project Handler :(#if _PIC18 && AL_EVENT_ENABLED) lines 371 to 375 deleted*/
|
||||
void PDO_OutputMapping(void)
|
||||
{
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
UINT32 u32TimeValue = 0;
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
@ -305,13 +314,11 @@ void PDO_OutputMapping(void)
|
||||
HandleCycleTimeMeasurement();
|
||||
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
|
||||
HW_EscReadIsr(((MEM_ADDR *)aPdOutputData), nEscAddrOutputData, nPdOutputSize );
|
||||
APPL_OutputMapping((UINT16*) aPdOutputData);
|
||||
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
#if ((MIN_PD_CYCLE_TIME == 0) || (PD_OUTPUT_CALC_AND_COPY_TIME == 0))
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
@ -330,7 +337,6 @@ void PDO_OutputMapping(void)
|
||||
#endif
|
||||
}
|
||||
#endif /* #if ((MIN_PD_CYCLE_TIME == 0) || (PD_OUTPUT_CALC_AND_COPY_TIME == 0)) */
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -350,16 +356,19 @@ void ECAT_CheckTimer(void)
|
||||
EsmTimeoutCounter--;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 444 to 449 deleted*/
|
||||
|
||||
ECAT_SetLedIndication();
|
||||
|
||||
DC_CheckWatchdog();
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 459 to 478 deleted*/
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
|
||||
/*ECATCHANGE_START(V5.13) */
|
||||
/* Increment the counter every ms between two updates based on the system time (32Bit overrun is handled in COE_SyncTimeStamp) */
|
||||
if (!b32BitDc || ((u64Timestamp & 0xFFFFFFFF) <= 4293000000))
|
||||
if (!b32BitDc || ((u64Timestamp & 0xFFFFFFFF) <= 4293000000UL))
|
||||
/*ECATCHANGE_END(V5.13) */
|
||||
{
|
||||
|
||||
/* the timestamp is stored in ns */
|
||||
@ -373,10 +382,11 @@ void ECAT_CheckTimer(void)
|
||||
}
|
||||
|
||||
u32CheckForDcOverrunCnt++;
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION && COE_SUPPORTED) lines 508 to 512 deleted*/
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief In case of non DC synchronization the cycle time measurement is started and 0x1C3.2 (Cycle time) is updated
|
||||
@ -453,16 +463,33 @@ UINT32 GetSystemTimeDelay(UINT32 u32StartTime)
|
||||
}
|
||||
return u32Delta;
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
|
||||
/*ECATCHANGE_START(V5.13) ECAT1*/
|
||||
/*ECATCHANGE_END(V5.13) ECAT1*/
|
||||
/*ET9300 Project Handler :(#if _PIC18) lines 603 to 607 deleted*/
|
||||
void PDI_Isr(void)
|
||||
{
|
||||
/*ECATCHANGE_START(V5.13) ECAT1*/
|
||||
BOOL SyncAcknowledgePending = FALSE;
|
||||
|
||||
/* get the AL event register */
|
||||
UINT16 ALEvent = HW_GetALEventRegister_Isr();
|
||||
ALEvent = SWAPWORD(ALEvent);
|
||||
|
||||
|
||||
/* Check if Sync1 Isr has to be called */
|
||||
|
||||
if (ALEvent & SYNC1_EVENT)
|
||||
{
|
||||
Sync1_Isr();
|
||||
|
||||
SyncAcknowledgePending = TRUE;
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) ECAT1*/
|
||||
|
||||
|
||||
if(bEscIntEnabled)
|
||||
{
|
||||
/* get the AL event register */
|
||||
UINT16 ALEvent = HW_GetALEventRegister_Isr();
|
||||
ALEvent = SWAPWORD(ALEvent);
|
||||
|
||||
if ( ALEvent & PROCESS_OUTPUT_EVENT )
|
||||
{
|
||||
if(bDcRunning && bDcSyncActive)
|
||||
@ -475,15 +502,15 @@ void PDI_Isr(void)
|
||||
sSyncManOutPar.u16SmEventMissedCounter--;
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
sSyncManInPar.u16SmEventMissedCounter = sSyncManOutPar.u16SmEventMissedCounter;
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
/*ET9300 Project Handler :(#if COE_SUPPORTED #else) lines 654 to 659 deleted*/
|
||||
|
||||
|
||||
/* Outputs were updated, set flag for watchdog monitoring */
|
||||
bEcatFirstOutputsReceived = TRUE;
|
||||
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 666 to 669 deleted*/
|
||||
|
||||
/*
|
||||
handle output process data event
|
||||
@ -496,10 +523,12 @@ void PDI_Isr(void)
|
||||
else
|
||||
{
|
||||
/* Just acknowledge the process data event in the INIT,PreOP and SafeOP state */
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 682 to 688 deleted*/
|
||||
HW_EscReadByteIsr(u8dummy,nEscAddrOutputData);
|
||||
HW_EscReadByteIsr(u8dummy,(nEscAddrOutputData+nPdOutputSize-1));
|
||||
}
|
||||
}
|
||||
/*ET9300 Project Handler :(#elif MAX_PD_INPUT_SIZE > 0) lines 694 to 718 deleted*/
|
||||
|
||||
/*
|
||||
Call ECAT_Application() in SM Sync mode
|
||||
@ -509,9 +538,14 @@ void PDI_Isr(void)
|
||||
/* The Application is synchronized to process data Sync Manager event*/
|
||||
ECAT_Application();
|
||||
}
|
||||
/*ET9300 Project Handler :(#elif MAX_PD_INPUT_SIZE > 0) lines 730 to 736 deleted*/
|
||||
/*ET9300 Project Handler :(#if COE_SUPPORTED #else) lines 737 to 744 deleted*/
|
||||
|
||||
if ( bEcatInputUpdateRunning
|
||||
/*ECATCHANGE_START(V5.13) ECAT 5*/
|
||||
if ( (bEcatInputUpdateRunning == TRUE) && (nPdInputSize > 0)
|
||||
/*ECATCHANGE_END(V5.13) ECAT 5*/
|
||||
&& ((sSyncManInPar.u16SyncType == SYNCTYPE_SM_SYNCHRON) || (sSyncManInPar.u16SyncType == SYNCTYPE_SM2_SYNCHRON))
|
||||
/*ET9300 Project Handler :(#if COE_SUPPORTED #else) lines 752 to 754 deleted*/
|
||||
)
|
||||
{
|
||||
/* EtherCAT slave is at least in SAFE-OPERATIONAL, update inputs */
|
||||
@ -531,14 +565,31 @@ void PDI_Isr(void)
|
||||
sSyncManInPar.u16CycleExceededCounter = sSyncManOutPar.u16CycleExceededCounter;
|
||||
|
||||
/* Acknowledge the process data event*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 780 to 786 deleted*/
|
||||
HW_EscReadByteIsr(u8dummy,nEscAddrOutputData);
|
||||
HW_EscReadByteIsr(u8dummy,(nEscAddrOutputData+nPdOutputSize-1));
|
||||
}
|
||||
/*ET9300 Project Handler :(#elif MAX_PD_INPUT_SIZE > 0) lines 791 to 811 deleted*/
|
||||
} //if(bEscIntEnabled)
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
/*ECATCHANGE_START(V5.13) ECAT1*/
|
||||
if (ALEvent & SYNC0_EVENT)
|
||||
{
|
||||
Sync0_Isr();
|
||||
|
||||
SyncAcknowledgePending = TRUE;
|
||||
}
|
||||
|
||||
/* Read Sync0/1 Status Register to acknowledge the event bit in the AL Event register */
|
||||
if (SyncAcknowledgePending)
|
||||
{
|
||||
volatile UINT32 SyncState = 0;
|
||||
HW_EscReadDWord(SyncState, ESC_DC_SYNC_STATUS);
|
||||
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) ECAT1*/
|
||||
|
||||
COE_UpdateSyncErrorStatus();
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
}
|
||||
|
||||
@ -548,11 +599,25 @@ void Sync0_Isr(void)
|
||||
|
||||
if(bDcSyncActive)
|
||||
{
|
||||
/*ECATCHANGE_START(V5.13) ECAT 6*/
|
||||
BOOL bCallInputMapping = FALSE;
|
||||
/*ECATCHANGE_END(V5.13) ECAT 6*/
|
||||
/*ET9300 Project Handler :(#if !AL_EVENT_ENABLED) lines 853 to 896 deleted*/
|
||||
|
||||
if ( bEcatInputUpdateRunning )
|
||||
/*ECATCHANGE_START(V5.13) ECAT 6*/
|
||||
if ((bEcatInputUpdateRunning == TRUE) && (LatchInputSync0Value > 0) && (nPdInputSize > 0))
|
||||
{
|
||||
LatchInputSync0Counter++;
|
||||
if(LatchInputSync0Value > LatchInputSync0Counter) /* Inputs shall be latched on a specific Sync0 event */
|
||||
{
|
||||
LatchInputSync0Counter++;
|
||||
}
|
||||
|
||||
if (LatchInputSync0Value == LatchInputSync0Counter)
|
||||
{
|
||||
bCallInputMapping = TRUE;
|
||||
}
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) ECAT 6*/
|
||||
|
||||
if(u16SmSync0Value > 0)
|
||||
{
|
||||
@ -564,11 +629,12 @@ void Sync0_Isr(void)
|
||||
sSyncManOutPar.u16SmEventMissedCounter = sSyncManOutPar.u16SmEventMissedCounter + 3;
|
||||
}
|
||||
|
||||
if ((nPdInputSize > 0) && (nPdOutputSize == 0) && (sSyncManInPar.u16SmEventMissedCounter <= sErrorSettings.u16SyncErrorCounterLimit))
|
||||
{
|
||||
sSyncManInPar.u16SmEventMissedCounter = sSyncManInPar.u16SmEventMissedCounter + 3;
|
||||
}
|
||||
if ((nPdInputSize > 0) && (nPdOutputSize == 0) && (sSyncManInPar.u16SmEventMissedCounter <= sErrorSettings.u16SyncErrorCounterLimit))
|
||||
{
|
||||
sSyncManInPar.u16SmEventMissedCounter = sSyncManInPar.u16SmEventMissedCounter + 3;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if COE_SUPPORTED #else) lines 937 to 942 deleted*/
|
||||
} // if (u16SmSync0Counter > u16SmSync0Value)
|
||||
|
||||
|
||||
@ -593,6 +659,7 @@ void Sync0_Isr(void)
|
||||
u16SmSync0Counter = 0;
|
||||
|
||||
sSyncManInPar.u16SmEventMissedCounter = 0;
|
||||
/*ET9300 Project Handler :(#if COE_SUPPORTED #else) lines 970 to 972 deleted*/
|
||||
|
||||
}
|
||||
}
|
||||
@ -607,8 +674,8 @@ void Sync0_Isr(void)
|
||||
/* Application is synchronized to SYNC0 event*/
|
||||
ECAT_Application();
|
||||
|
||||
if ( bEcatInputUpdateRunning
|
||||
&& (LatchInputSync0Value > 0) && (LatchInputSync0Value == LatchInputSync0Counter) ) /* Inputs shall be latched on a specific Sync0 event */
|
||||
/*ECATCHANGE_START(V5.13) ECAT 6*/
|
||||
if (bCallInputMapping == TRUE)
|
||||
{
|
||||
/* EtherCAT slave is at least in SAFE-OPERATIONAL, update inputs */
|
||||
PDO_InputMapping();
|
||||
@ -619,12 +686,11 @@ void Sync0_Isr(void)
|
||||
LatchInputSync0Counter = 0;
|
||||
}
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) ECAT 6*/
|
||||
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT5*/
|
||||
COE_UpdateSyncErrorStatus();
|
||||
/*ECATCHANGE_END(V5.12) ECAT5*/
|
||||
|
||||
}
|
||||
|
||||
@ -632,7 +698,9 @@ void Sync1_Isr(void)
|
||||
{
|
||||
Sync1WdCounter = 0;
|
||||
|
||||
if ( bEcatInputUpdateRunning
|
||||
/*ECATCHANGE_START(V5.13) ECAT 5*/
|
||||
if ( (bEcatInputUpdateRunning == TRUE) && (nPdInputSize > 0)
|
||||
/*ECATCHANGE_END(V5.13) ECAT 5*/
|
||||
&& (sSyncManInPar.u16SyncType == SYNCTYPE_DCSYNC1)
|
||||
&& (LatchInputSync0Value == 0)) /* Inputs are latched on Sync1 (LatchInputSync0Value == 0), if LatchInputSync0Value > 0 inputs are latched with Sync0 */
|
||||
{
|
||||
@ -846,25 +914,36 @@ UINT16 MainInit(void)
|
||||
#endif
|
||||
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT8*/
|
||||
/* Reset application function pointer*/
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 1240 to 1245 deleted*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 1248 to 1251 deleted*/
|
||||
|
||||
pAPPL_FoeRead = NULL;
|
||||
pAPPL_FoeReadData = NULL;
|
||||
pAPPL_FoeError = NULL;
|
||||
pAPPL_FoeWrite = NULL;
|
||||
pAPPL_FoeWriteData = NULL;
|
||||
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
pAPPL_CoeReadInd = NULL;
|
||||
pAPPL_CoeWriteInd = NULL;
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
|
||||
pAPPL_MainLoop = NULL;
|
||||
/*ECATCHANGE_END(V5.12) ECAT8*/
|
||||
|
||||
/* initialize the EtherCAT Slave Interface */
|
||||
ECAT_Init();
|
||||
/* initialize the objects */
|
||||
COE_ObjInit();
|
||||
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 1277 to 1280 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_ACCESS_SUPPORT) lines 1282 to 1315 deleted*/
|
||||
/*indicate that the slave stack initialization finished*/
|
||||
bInitFinished = TRUE;
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
|
||||
bMinCycleTimeMeasurementStarted = FALSE;
|
||||
u32CycleTimeStartValue = 0;
|
||||
@ -885,7 +964,7 @@ UINT16 MainInit(void)
|
||||
|
||||
if (u32TimeValue <= u32Delta)
|
||||
{
|
||||
u32Delta = u32Delta - u32TimeValue;
|
||||
u32Delta = u32Delta - u32TimeValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -909,8 +988,8 @@ UINT16 MainInit(void)
|
||||
}
|
||||
|
||||
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 1368 to 1391 deleted*/
|
||||
|
||||
/*Application Init need to be called from the application layer*/
|
||||
return Error;
|
||||
@ -933,16 +1012,19 @@ void MainLoop(void)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FreeRun-Mode: bEscIntEnabled = FALSE, bDcSyncActive = FALSE
|
||||
Synchron-Mode: bEscIntEnabled = TRUE, bDcSyncActive = FALSE
|
||||
DC-Mode: bEscIntEnabled = TRUE, bDcSyncActive = TRUE */
|
||||
if (
|
||||
(!bEscIntEnabled || !bEcatFirstOutputsReceived) /* SM-Synchronous, but not SM-event received */
|
||||
/*ET9300 Project Handler :(#if MAX_PD_OUTPUT_SIZE > 0 #else) lines 1422 to 1424 deleted*/
|
||||
&& !bDcSyncActive /* DC-Synchronous */
|
||||
)
|
||||
{
|
||||
/* if the application is running in ECAT Synchron Mode the function ECAT_Application is called
|
||||
from the ESC interrupt routine (in mcihw.c or spihw.c),
|
||||
from the ESC interrupt routine,
|
||||
in ECAT Synchron Mode it should be additionally checked, if the SM-event is received
|
||||
at least once (bEcatFirstOutputsReceived = 1), otherwise no interrupt is generated
|
||||
and the function ECAT_Application has to be called here (with interrupts disabled,
|
||||
@ -958,6 +1040,7 @@ void MainLoop(void)
|
||||
{
|
||||
/* set the flag for the state machine behavior */
|
||||
bEcatFirstOutputsReceived = TRUE;
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 1448 to 1451 deleted*/
|
||||
if ( bEcatOutputUpdateRunning )
|
||||
{
|
||||
/* update the outputs */
|
||||
@ -971,23 +1054,22 @@ void MainLoop(void)
|
||||
{
|
||||
/* Outputs were updated, set flag for watchdog monitoring */
|
||||
bEcatFirstOutputsReceived = TRUE;
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 1466 to 1469 deleted*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT3*/
|
||||
DISABLE_ESC_INT();
|
||||
/*ECATCHANGE_END(V5.12) ECAT3*/
|
||||
ECAT_Application();
|
||||
|
||||
if ( bEcatInputUpdateRunning )
|
||||
{
|
||||
/*ECATCHANGE_START(V5.13) ECAT 5*/
|
||||
if ( (bEcatInputUpdateRunning == TRUE) && (nPdInputSize > 0))
|
||||
/*ECATCHANGE_END(V5.13) ECAT 5*/
|
||||
{
|
||||
/* EtherCAT slave is at least in SAFE-OPERATIONAL, update inputs */
|
||||
PDO_InputMapping();
|
||||
}
|
||||
/*ECATCHANGE_START(V5.12) ECAT3*/
|
||||
ENABLE_ESC_INT();
|
||||
/*ECATCHANGE_END(V5.12) ECAT3*/
|
||||
}
|
||||
|
||||
/* there is no interrupt routine for the hardware timer so check the timer register if the desired cycle elapsed*/
|
||||
@ -1002,12 +1084,10 @@ void MainLoop(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
if (u32CheckForDcOverrunCnt >= CHECK_DC_OVERRUN_IN_MS)
|
||||
{
|
||||
COE_SyncTimeStamp();
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
/* call EtherCAT functions */
|
||||
ECAT_Main();
|
||||
@ -1016,17 +1096,15 @@ void MainLoop(void)
|
||||
COE_Main();
|
||||
CheckIfEcatError();
|
||||
|
||||
if(bEcatInputUpdateRunning)
|
||||
{
|
||||
/*ECATCHANGE_START(V5.13) CIA402 4*/
|
||||
/*decouple CIA402 state machine from ESM*/
|
||||
/*ECATCHANGE_END(V5.13) CIA402 4*/
|
||||
CiA402_StateMachine();
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) APPL1*/
|
||||
if (pAPPL_MainLoop != NULL)
|
||||
{
|
||||
pAPPL_MainLoop();
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) APPL1*/
|
||||
}
|
||||
|
||||
/*The main function was moved to the application files.*/
|
||||
@ -1035,12 +1113,13 @@ void MainLoop(void)
|
||||
\brief ECAT_Application (prev. SSC versions "COE_Application")
|
||||
this function calculates and the physical process signals and triggers the input mapping
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
/*ET9300 Project Handler :(#if _PIC18 && AL_EVENT_ENABLED) lines 1546 to 1550 deleted*/
|
||||
void ECAT_Application(void)
|
||||
{
|
||||
#if (MIN_PD_CYCLE_TIME == 0)
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
UINT32 u32TimeValue = 0;
|
||||
|
||||
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
u32TimeValue = GetSystemTimeDelay(0);
|
||||
@ -1054,7 +1133,6 @@ void ECAT_Application(void)
|
||||
u32MinCycleTimeValue = 0;
|
||||
}
|
||||
} /* measurement started*/
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
#endif /* (MIN_PD_CYCLE_TIME == 0)*/
|
||||
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
@ -1066,17 +1144,15 @@ void ECAT_Application(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*Axis configuration is written in state change from PREOP to SAFEOP
|
||||
=> trigger CiA402 Application if device is in SAFEOP or OP
|
||||
(Motion Controller function is only triggered if DC Synchronisation is active and valid mode of operation is set)*/
|
||||
if(bEcatInputUpdateRunning)
|
||||
{
|
||||
APPL_Application();
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.13) CIA402 4*/
|
||||
/*decouple CIA402 application from ESM*/
|
||||
/*ECATCHANGE_END(V5.13) CIA402 4*/
|
||||
APPL_Application();
|
||||
|
||||
/* PDO Input mapping is called from the specific trigger ISR */
|
||||
|
||||
#if (MIN_PD_CYCLE_TIME == 0)
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
|
||||
if (MEASUREMENT_ACTIVE)
|
||||
{
|
||||
@ -1110,11 +1186,12 @@ void ECAT_Application(void)
|
||||
}
|
||||
|
||||
}/* measurement started*/
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
#endif /* #if MIN_PD_CYCLE_TIME == 0 */
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_ACCESS_SUPPORT) lines 1644 to 2002 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 2004 to 2224 deleted*/
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
57
ecatappl.h
57
ecatappl.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -22,7 +23,7 @@ V5.11 ECAT10: change PROTO handling to prevent compiler errors<br>
|
||||
V5.10 ECAT13: Update Synchronisation handling (FreeRun,SM Sync, Sync0, Sync1)<br>
|
||||
Compare DC UINT configuration (by ESC Config data) vs. DC activation register settings<br>
|
||||
Update 0x1C3x entries<br>
|
||||
V5.10 ECAT4: Update alignment marco for 8 to 15 bit alignments (16 and 32 Bit controllers)<br>
|
||||
V5.10 ECAT4: Update alignment macro for 8 to 15 bit alignments (16 and 32 Bit controllers)<br>
|
||||
Bugfix calculate LED blink frequency<br>
|
||||
<br>Changes to version - :<br>
|
||||
V5.01 : Start file change log
|
||||
@ -55,31 +56,33 @@ V5.01 : Start file change log
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#define BOOLEAN(x) UINT8(x):1 /**< \brief Marco to define BOOLEAN object entry*/
|
||||
#define BIT1(x) UINT8(x):1 /**< \brief Marco to define BIT1 object entry*/
|
||||
#define BIT2(x) UINT8(x):2 /**< \brief Marco to define BIT2 object entry*/
|
||||
#define BIT3(x) UINT8(x):3 /**< \brief Marco to define BIT3 object entry*/
|
||||
#define BIT4(x) UINT8(x):4 /**< \brief Marco to define BIT4 object entry*/
|
||||
#define BIT5(x) UINT8(x):5 /**< \brief Marco to define BIT5 object entry*/
|
||||
#define BIT6(x) UINT8(x):6 /**< \brief Marco to define BIT5 object entry*/
|
||||
#define BIT7(x) UINT8(x):7 /**< \brief Marco to define BIT6 object entry*/
|
||||
#define BIT8(x) UINT8(x):8 /**< \brief Marco to define BIT7 object entry*/
|
||||
/*ET9300 Project Handler :(#if CONTROLLER_16BIT || CONTROLLER_32BIT) lines 58 to 85 deleted*/
|
||||
#define BOOLEAN(x) UINT8 x:1 /**< \brief Macro to define BOOLEAN object entry*/
|
||||
#define BIT1(x) UINT8 x:1 /**< \brief Macro to define BIT1 object entry*/
|
||||
#define BIT2(x) UINT8 x:2 /**< \brief Macro to define BIT2 object entry*/
|
||||
#define BIT3(x) UINT8 x:3 /**< \brief Macro to define BIT3 object entry*/
|
||||
#define BIT4(x) UINT8 x:4 /**< \brief Macro to define BIT4 object entry*/
|
||||
#define BIT5(x) UINT8 x:5 /**< \brief Macro to define BIT5 object entry*/
|
||||
#define BIT6(x) UINT8 x:6 /**< \brief Macro to define BIT5 object entry*/
|
||||
#define BIT7(x) UINT8 x:7 /**< \brief Macro to define BIT6 object entry*/
|
||||
#define BIT8(x) UINT8 x:8 /**< \brief Macro to define BIT7 object entry*/
|
||||
#define ALIGN0(x)
|
||||
#define ALIGN1(x) UINT8(x):1; /**< \brief Marco to define ALIGN1 object entry*/
|
||||
#define ALIGN2(x) UINT8(x):2; /**< \brief Marco to define ALIGN2 object entry*/
|
||||
#define ALIGN3(x) UINT8(x):3; /**< \brief Marco to define ALIGN3 object entry*/
|
||||
#define ALIGN4(x) UINT8(x):4; /**< \brief Marco to define ALIGN4 object entry*/
|
||||
#define ALIGN5(x) UINT8(x):5; /**< \brief Marco to define ALIGN5 object entry*/
|
||||
#define ALIGN6(x) UINT8(x):6; /**< \brief Marco to define ALIGN6 object entry*/
|
||||
#define ALIGN7(x) UINT8(x):7; /**< \brief Marco to define ALIGN7 object entry*/
|
||||
#define ALIGN8(x) UINT8(x):8; /**< \brief Marco to define ALIGN8 object entry*/
|
||||
#define ALIGN9(x) UINT16(x):9; /**< \brief Marco to define ALIGN9 object entry*/
|
||||
#define ALIGN10(x) UINT16(x):10; /**< \brief Marco to define ALIGN10 object entry*/
|
||||
#define ALIGN11(x) UINT16(x):11; /**< \brief Marco to define ALIGN11 object entry*/
|
||||
#define ALIGN12(x) UINT16(x):12; /**< \brief Marco to define ALIGN12 object entry*/
|
||||
#define ALIGN13(x) UINT16(x):13; /**< \brief Marco to define ALIGN13 object entry*/
|
||||
#define ALIGN14(x) UINT16(x):14; /**< \brief Marco to define ALIGN14 object entry*/
|
||||
#define ALIGN15(x) UINT16(x):15; /**< \brief Marco to define ALIGN15 object entry*/
|
||||
#define ALIGN1(x) UINT8 x:1; /**< \brief Macro to define ALIGN1 object entry*/
|
||||
#define ALIGN2(x) UINT8 x:2; /**< \brief Macro to define ALIGN2 object entry*/
|
||||
#define ALIGN3(x) UINT8 x:3; /**< \brief Macro to define ALIGN3 object entry*/
|
||||
#define ALIGN4(x) UINT8 x:4; /**< \brief Macro to define ALIGN4 object entry*/
|
||||
#define ALIGN5(x) UINT8 x:5; /**< \brief Macro to define ALIGN5 object entry*/
|
||||
#define ALIGN6(x) UINT8 x:6; /**< \brief Macro to define ALIGN6 object entry*/
|
||||
#define ALIGN7(x) UINT8 x:7; /**< \brief Macro to define ALIGN7 object entry*/
|
||||
#define ALIGN8(x) UINT8 x:8; /**< \brief Macro to define ALIGN8 object entry*/
|
||||
/*ET9300 Project Handler :(#if _PIC18) lines 104 to 112 deleted*/
|
||||
#define ALIGN9(x) UINT16 x:9; /**< \brief Macro to define ALIGN9 object entry*/
|
||||
#define ALIGN10(x) UINT16 x:10; /**< \brief Macro to define ALIGN10 object entry*/
|
||||
#define ALIGN11(x) UINT16 x:11; /**< \brief Macro to define ALIGN11 object entry*/
|
||||
#define ALIGN12(x) UINT16 x:12; /**< \brief Macro to define ALIGN12 object entry*/
|
||||
#define ALIGN13(x) UINT16 x:13; /**< \brief Macro to define ALIGN13 object entry*/
|
||||
#define ALIGN14(x) UINT16 x:14; /**< \brief Macro to define ALIGN14 object entry*/
|
||||
#define ALIGN15(x) UINT16 x:15; /**< \brief Macro to define ALIGN15 object entry*/
|
||||
#endif //_ECATAPPL_H_
|
||||
|
||||
#if defined(_ECATAPPL_) && (_ECATAPPL_ == 1)
|
||||
@ -96,6 +99,7 @@ V5.01 : Start file change log
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 138 to 140 deleted*/
|
||||
|
||||
PROTO BOOL bEcatWaitForInputUpdate; /**< \brief Wait for input update*/
|
||||
PROTO BOOL bEtherCATRunLed; /**< \brief Current run LED value*/
|
||||
@ -104,6 +108,7 @@ PROTO BOOL bRunApplication; /**< \brief Indicates if the stack shall be running
|
||||
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 149 to 151 deleted*/
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Global Functions
|
||||
@ -124,7 +129,9 @@ PROTO void PDO_InputMapping(void);
|
||||
|
||||
PROTO void ECAT_SetLedIndication(void);
|
||||
PROTO void CalcSMCycleTime(void);
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_ACCESS_SUPPORT) lines 178 to 181 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_EEPROM_EMULATION) lines 183 to 185 deleted*/
|
||||
|
||||
|
||||
|
||||
|
||||
19
ecatcoe.c
19
ecatcoe.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -14,8 +15,11 @@
|
||||
\brief Implementation
|
||||
This file contains the CoE mailbox interface
|
||||
|
||||
\version 5.11
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.13 COE8: handle failure on continue indication<br>
|
||||
V5.13 TEST4: memory leak on SDO response receive<br>
|
||||
<br>Changes to version V5.0:<br>
|
||||
V5.11 COE4: "change prototype of ""COE_ContinueInd()"" return <> 0 if a failure occurred"<br>
|
||||
V5.11 ECAT10: change PROTO handling to prevent compiler errors<br>
|
||||
@ -45,6 +49,7 @@ V4.08 MBX 1: If the switch MAILBOX_QUEUE was set, we have to put all SDO Info Re
|
||||
/*remove definition of _ECATCOE_ (#ifdef is used in ecatcoe.h)*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 52 to 60 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------------------
|
||||
@ -83,7 +88,7 @@ V4.08 MBX 1: If the switch MAILBOX_QUEUE was set, we have to put all SDO Info Re
|
||||
void COE_Init(void)
|
||||
{
|
||||
pCoeSendStored = 0;
|
||||
nSdoInfoFragmentsLeft = 0;
|
||||
/*ET9300 Project Handler :(#if SEGMENTED_SDO_SUPPORTED) lines 99 to 101 deleted*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -107,6 +112,7 @@ UINT8 COE_ServiceInd(TCOEMBX MBXMEM *pCoeMbx)
|
||||
/* SDO-Request received, call SDOS_SdoInd to process the SDO-Request
|
||||
if an existing SDO-Stack shall be used, the corresponding function
|
||||
should be called */
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION && EMERGENCY_SUPPORTED) lines 125 to 152 deleted*/
|
||||
result = SDOS_SdoInd( (TINITSDOMBX MBXMEM *) pCoeMbx );
|
||||
break;
|
||||
|
||||
@ -118,6 +124,7 @@ UINT8 COE_ServiceInd(TCOEMBX MBXMEM *pCoeMbx)
|
||||
|
||||
|
||||
case COESERVICE_SDORESPONSE:
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 164 to 178 deleted*/
|
||||
case COESERVICE_EMERGENCY:
|
||||
case COESERVICE_TXPDO:
|
||||
case COESERVICE_RXPDO:
|
||||
@ -149,8 +156,12 @@ UINT8 COE_ContinueInd(TMBX MBXMEM * pMbx)
|
||||
if (pCoeSendStored)
|
||||
{
|
||||
/* send the stored CoE service which could not be sent before */
|
||||
MBX_MailboxSendReq(pCoeSendStored, 0);
|
||||
pCoeSendStored = 0;
|
||||
/*ECATCHANGE_START(V5.13) COE8*/
|
||||
if (MBX_MailboxSendReq(pCoeSendStored, COE_SERVICE) == 0)
|
||||
{
|
||||
pCoeSendStored = 0;
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) COE8*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -61,6 +62,7 @@ V5.01 : Start file change log
|
||||
/*---------------------------------------------
|
||||
- COE Structures
|
||||
-----------------------------------------------*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 64 to 67 deleted*/
|
||||
#define COEHEADER_COESERVICESHIFT 12 /**< \brief CoE service shift (within CoE header)*/
|
||||
#define COEHEADER_COESERVICEMASK 0xF000 /**< \brief CoE service mask (within CoE header)*/
|
||||
|
||||
|
||||
395
ecatfoe.c
Normal file
395
ecatfoe.c
Normal file
@ -0,0 +1,395 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
\addtogroup FoE FileTransfer over EtherCAT
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file ecatfoe.c
|
||||
\author EthercatSSC@beckhoff.com
|
||||
\brief Implementation
|
||||
This file contains the FoE mailbox interface
|
||||
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 EOE1: <br>
|
||||
V5.13 FOE1: handle failure on continue indication<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 FOE2: handle 16bit only access<br>
|
||||
V5.12 MBX4: in case of a disable mailbox queue and two consecutive foe uploads the mailbox receive handler is blocked<br>
|
||||
<br>Changes to version V5.10:<br>
|
||||
V5.11 FOE1: handle busy on a read request, change OPMode to OPCode (same terms as in the spec)<br>
|
||||
<br>Changes to version V5.0:<br>
|
||||
V5.10 MBX1: Remove multiple swapping of length filed in mailbox header<br>
|
||||
<br>Changes to version V4.40:<br>
|
||||
V5.0 FOE1: Free memory if FoE_ServciceInd() is left.<br>
|
||||
V5.0 FOE2: Update error code (Bit 15 shall not be set).<br>
|
||||
V5.0 FOE3: Update byte swapping for big endian and big endian 16 configurations.<br>
|
||||
V5.0 FOE4: Update Error text handling for 16Bit operations.<br>
|
||||
<br>Changes to version V4.11:<br>
|
||||
V4.40 FOE1: correct FoE busy values<br>
|
||||
V4.40 MBX2: HW_CopyToSendMailbox merge to a generic function (new: MBX_CopyToSendMailbox)<br>
|
||||
<br>Changes to version V4.10:<br>
|
||||
V4.11 FOE 1 fixed a problem with a huge FOE_MADATA define<br>
|
||||
V4.11 FOE 2 u16PacketNo is now a 32bit variable (u32PacketNo) to conform with the spec<br>
|
||||
<br>Changes to version V4.00:<br>
|
||||
V4.10 FOE 1-3 when downloading the firmware the FoE state machine was not set to FOE_READY<br>
|
||||
when the last data segment was downloaded so that the next FoE service failed<br>
|
||||
<br>Changes to version V3.20:<br>
|
||||
V4.00 FOE 1 - if a FoE Error service is received it should not be acknowledged<br>
|
||||
V4.00 FOE 2 - if a FoE service response could not be sent because the mailbox is full<br>
|
||||
it has to be re-transmit otherwise the response get lost<br>
|
||||
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#include "ecat_def.h"
|
||||
|
||||
|
||||
|
||||
#include "ecatslv.h"
|
||||
|
||||
#define _ECATFOE_ 1
|
||||
#include "ecatfoe.h"
|
||||
#undef _ECATFOE_
|
||||
#define _ECATFOE_ 0
|
||||
|
||||
#include "foeappl.h"
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
|
||||
\brief This function initialize the FoE Interface.
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void FOE_Init(void)
|
||||
{
|
||||
/* no file transmission sequence is running */
|
||||
u16FileAccessState = FOE_READY;
|
||||
/* initialize the expected packet number */
|
||||
u32PacketNo = 0;
|
||||
pFoeSendStored = NULL;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pFoeInd Pointer to the received mailbox data from the master.
|
||||
|
||||
\return result of the operation (0 (success) or mailbox error code (MBXERR_.... defined in
|
||||
mailbox.h))
|
||||
|
||||
\brief This function is called when a FoE (File Access over EtherCAT) service is received from
|
||||
the master.
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT8 FOE_ServiceInd(TFOEMBX MBXMEM * pFoeInd)
|
||||
{
|
||||
/* initialize the result of the service checking */
|
||||
UINT16 nextState = ECAT_FOE_ERRCODE_ILLEGAL;
|
||||
/* dataSize contains the size of the file data */
|
||||
UINT16 dataSize = SWAPWORD(pFoeInd->MbxHeader.Length) - FOE_HEADER_SIZE;
|
||||
|
||||
|
||||
/* it has to be checked if the mailbox protocol is correct, the sent mailbox data length has to
|
||||
great enough for the service header of the FoE service */
|
||||
if ( SWAPWORD(pFoeInd->MbxHeader.Length) < FOE_HEADER_SIZE )
|
||||
{
|
||||
return MBXERR_SIZETOOSHORT;
|
||||
}
|
||||
|
||||
switch ( SWAPWORD(pFoeInd->FoeHeader.OpCode) )
|
||||
{
|
||||
case ECAT_FOE_OPCODE_RRQ:
|
||||
/* file read is requested */
|
||||
if ( u16FileAccessState == FOE_READY )
|
||||
{
|
||||
UINT32 u32Password = SWAPDWORD((((UINT32)pFoeInd->FoeHeader.Cmd.Password[FOE_COMMAND_LOWWORD]) | ((UINT32)pFoeInd->FoeHeader.Cmd.Password[FOE_COMMAND_HIGHWORD]) << 16));
|
||||
/* last FoE sequence was finished, call application function */
|
||||
nextState = FOE_Read((UINT16 MBXMEM *)pFoeInd->Data, dataSize, (UINT16*)pFoeInd->Data, u32Password);
|
||||
|
||||
/* u32LastFileOffset contains the offset of the file which is sent now */
|
||||
u32LastFileOffset = 0;
|
||||
|
||||
if (nextState <= FOE_MAXDATA)
|
||||
{
|
||||
/* the first data packet shall be sent */
|
||||
u32PacketNo = 1;
|
||||
/* u32FileOffset contains the offset of the file which shall be sent when the next FoE ACK is received */
|
||||
u32FileOffset = nextState;
|
||||
}
|
||||
else if (nextState <= FOE_MAXBUSY)
|
||||
{
|
||||
u32PacketNo = 0;
|
||||
u32FileOffset = 0;
|
||||
u16FileAccessState = FOE_WAIT_FOR_ACK;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ECAT_FOE_OPCODE_WRQ:
|
||||
/* file write is requested */
|
||||
if ( u16FileAccessState == FOE_READY )
|
||||
{
|
||||
UINT32 u32Password = SWAPDWORD((((UINT32)pFoeInd->FoeHeader.Cmd.Password[FOE_COMMAND_LOWWORD]) | ((UINT32)pFoeInd->FoeHeader.Cmd.Password[FOE_COMMAND_HIGHWORD]) << 16));
|
||||
/* last FoE sequence was finished, call application function */
|
||||
nextState = FOE_Write((UINT16 MBXMEM *)pFoeInd->Data, dataSize, u32Password);
|
||||
if ( nextState == 0 )
|
||||
{
|
||||
/* checking was successful, sent a FoE Ack service */
|
||||
nextState = FOE_ACK;
|
||||
}
|
||||
/* initialize the packet number */
|
||||
u32PacketNo = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ECAT_FOE_OPCODE_DATA:
|
||||
/* file data is received */
|
||||
if ( u16FileAccessState == FOE_WAIT_FOR_DATA
|
||||
|| u16FileAccessState == FOE_WAIT_FOR_LAST_DATA )
|
||||
{
|
||||
UINT32 u32CmdPacketNo = SWAPDWORD((((UINT32)pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_LOWWORD]) | ((UINT32)pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_HIGHWORD]) << 16));
|
||||
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 170 to 172 deleted*/
|
||||
/* we are waiting for file data, service is correct */
|
||||
if ( u32CmdPacketNo == u32PacketNo )
|
||||
{
|
||||
/* the packet number is correct, call application function to store the file data */
|
||||
nextState = FOE_Data((UINT16 MBXMEM *)pFoeInd->Data, dataSize);
|
||||
if ( nextState == 0 )
|
||||
{
|
||||
/* checking was successful, sent a FoE Ack service */
|
||||
nextState = FOE_ACK;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nextState = ECAT_FOE_ERRCODE_PACKENO;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ECAT_FOE_OPCODE_ACK:
|
||||
/* acknowledge is received, next file part can be sent */
|
||||
if ( u16FileAccessState == FOE_WAIT_FOR_ACK )
|
||||
{
|
||||
/* we are waiting for an acknowledge, service is correct, call the application function
|
||||
to get the next part of the file */
|
||||
nextState = FOE_Ack( u32FileOffset, (UINT16 MBXMEM *)pFoeInd->Data );
|
||||
/* u32LastFileOffset contains the offset of the file which is sent now */
|
||||
u32LastFileOffset = u32FileOffset;
|
||||
|
||||
if (nextState <= FOE_MAXDATA)
|
||||
{
|
||||
/* u32FileOffset contains the offset of the file which shall be sent when the next FoE ACK is received */
|
||||
u32FileOffset += nextState;
|
||||
/* increment the packet number */
|
||||
u32PacketNo++;
|
||||
}
|
||||
}
|
||||
else if ( u16FileAccessState == FOE_WAIT_FOR_LAST_ACK )
|
||||
{
|
||||
/* we were waiting for the last acknowledge, now the sequence is finished */
|
||||
nextState = FOE_FINISHED_NOACK;
|
||||
}
|
||||
break;
|
||||
|
||||
case ECAT_FOE_OPCODE_ERR:
|
||||
/* a FoE Error service is received */
|
||||
if ( u16FileAccessState != FOE_READY )
|
||||
{
|
||||
UINT32 u32CmdErrorCode = SWAPDWORD((((UINT32)pFoeInd->FoeHeader.Cmd.ErrorCode[FOE_COMMAND_LOWWORD]) | ((UINT32)pFoeInd->FoeHeader.Cmd.ErrorCode[FOE_COMMAND_HIGHWORD]) << 16));
|
||||
|
||||
/* a file transmission sequence is active, inform the application, that this sequence
|
||||
was stopped */
|
||||
FOE_Error( u32CmdErrorCode );
|
||||
|
||||
nextState = FOE_FINISHED;
|
||||
}
|
||||
break;
|
||||
|
||||
case ECAT_FOE_OPCODE_BUSY:
|
||||
/* a FoE Busy service is received */
|
||||
if ( u16FileAccessState == FOE_WAIT_FOR_ACK
|
||||
|| u16FileAccessState == FOE_WAIT_FOR_LAST_ACK )
|
||||
{
|
||||
/* we are waiting for an acknowledge, service is correct, call the application function
|
||||
to resend the last part of the file */
|
||||
nextState = FOE_Busy( SWAPWORD(pFoeInd->FoeHeader.Cmd.Busy.Done), u32LastFileOffset, (UINT16 MBXMEM *)pFoeInd->Data );
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ( nextState <= FOE_MAXDATA )
|
||||
{
|
||||
/* we send DATA and wait for ACK */
|
||||
UINT32 d = SWAPDWORD(u32PacketNo);
|
||||
|
||||
/* store the OpCode in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.OpCode = SWAPWORD(ECAT_FOE_OPCODE_DATA);
|
||||
/* store the packet number in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_LOWWORD] = ((d & 0x0000FFFF));
|
||||
pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_HIGHWORD] = ((d & 0xFFFF0000) >> 16);
|
||||
|
||||
/* store the size of the mailbox data in the mailbox buffer */
|
||||
pFoeInd->MbxHeader.Length = FOE_HEADER_SIZE + nextState;
|
||||
|
||||
if ( nextState == u16SendMbxSize - FOE_HEADER_SIZE - MBX_HEADER_SIZE )
|
||||
{
|
||||
/* packets still following, we wait for an ACK */
|
||||
u16FileAccessState = FOE_WAIT_FOR_ACK;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* it was the last Packet, we wait for the last ACK */
|
||||
u16FileAccessState = FOE_WAIT_FOR_LAST_ACK;
|
||||
}
|
||||
}
|
||||
else if ( nextState <= FOE_MAXBUSY )
|
||||
{
|
||||
/* we are still storing the received file data (in flash for example) and
|
||||
send BUSY and wait for the DATA to be sent again */
|
||||
/* store the OpCode in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.OpCode = SWAPWORD(ECAT_FOE_OPCODE_BUSY);
|
||||
/* store the information how much progress we made until we can receive file data again */
|
||||
pFoeInd->FoeHeader.Cmd.Busy.Done = SWAPWORD(nextState-FOE_MAXBUSY_ZERO);
|
||||
|
||||
pFoeInd->FoeHeader.Cmd.Busy.Entire = 0;
|
||||
/* store the size of the mailbox data in the mailbox buffer */
|
||||
|
||||
pFoeInd->MbxHeader.Length = FOE_HEADER_SIZE;
|
||||
}
|
||||
else if ( nextState == FOE_ACK || nextState == FOE_ACKFINISHED )
|
||||
{
|
||||
/* we send ACK and wait for DATA
|
||||
the next file data is expected with an incremented packet number, but
|
||||
we have to acknowledge the old packet first */
|
||||
UINT32 d = SWAPDWORD(u32PacketNo);
|
||||
u32PacketNo++;
|
||||
|
||||
/* store the OpCode in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.OpCode = SWAPWORD(ECAT_FOE_OPCODE_ACK);
|
||||
/* store the packet number in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_LOWWORD] = ((d & 0x0000FFFF));
|
||||
pFoeInd->FoeHeader.Cmd.PacketNo[FOE_COMMAND_HIGHWORD] = ((d & 0xFFFF0000) >> 16);
|
||||
|
||||
/* store the size of the mailbox data in the mailbox buffer */
|
||||
pFoeInd->MbxHeader.Length = SIZEOF(TFOEHEADER);
|
||||
|
||||
/* we wait for the next data part */
|
||||
if ( nextState == FOE_ACK )
|
||||
{
|
||||
/* we wait for the next data part */
|
||||
u16FileAccessState = FOE_WAIT_FOR_DATA;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* the last data part was received */
|
||||
u16FileAccessState = FOE_READY;
|
||||
}
|
||||
}
|
||||
else if ( nextState < FOE_ERROR )
|
||||
{
|
||||
/* the file transmission sequence is finished, we have to send nothing */
|
||||
u16FileAccessState = FOE_READY;
|
||||
APPL_FreeMailboxBuffer(pFoeInd);
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 317 to 320 deleted*/
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT32 d = SWAPDWORD(nextState);
|
||||
UINT8 b = 0;
|
||||
|
||||
/* store the OpCode in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.OpCode = SWAPWORD(ECAT_FOE_OPCODE_ERR);
|
||||
/* store the ErrorCode in the mailbox buffer */
|
||||
pFoeInd->FoeHeader.Cmd.ErrorCode[FOE_COMMAND_LOWWORD] = ((d & 0x0000FFFF));
|
||||
pFoeInd->FoeHeader.Cmd.ErrorCode[FOE_COMMAND_HIGHWORD] = ((d & 0xFFFF0000) >> 16);
|
||||
|
||||
/* store the size of the mailbox data in the mailbox buffer */
|
||||
pFoeInd->MbxHeader.Length = SIZEOF(TFOEHEADER);
|
||||
|
||||
/* Error Text is returned in pFoeInd->Data */
|
||||
while (b < 32)
|
||||
{
|
||||
UINT16 data = ((UINT16 MBXMEM *) pFoeInd->Data)[(b >> 1)];
|
||||
|
||||
if ((data & 0x00FF) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
b++;
|
||||
|
||||
if ((data & 0xFF00) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
b++;
|
||||
}
|
||||
if ( b < 32 )
|
||||
{
|
||||
pFoeInd->MbxHeader.Length += b+1;
|
||||
}
|
||||
|
||||
/* the file transmission sequence is finished */
|
||||
u16FileAccessState = FOE_READY;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if BOOTSTRAPMODE_SUPPORTED) lines 363 to 385 deleted*/
|
||||
{
|
||||
if ( MBX_MailboxSendReq((TMBX MBXMEM *) pFoeInd, FOE_SERVICE) != 0 )
|
||||
{
|
||||
/* if the mailbox service could not be sent (or stored), the response will be
|
||||
stored in the variable pFoeSendStored and will be sent automatically
|
||||
from the mailbox handler (FOE_ContinueInd) when the send mailbox will be read
|
||||
the next time from the master */
|
||||
pFoeSendStored = (TMBX MBXMEM *) pFoeInd;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pMbx Pointer to the free mailbox buffer
|
||||
|
||||
\brief This function is called when the next mailbox fragment can be sent.
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void FOE_ContinueInd(TMBX MBXMEM * pMbx)
|
||||
{
|
||||
if ( pFoeSendStored )
|
||||
{
|
||||
/* send the stored FoE service which could not be sent before */
|
||||
/*ECATCHANGE_START(V5.13) FOE1*/
|
||||
if (MBX_MailboxSendReq(pFoeSendStored, FOE_SERVICE) == 0)
|
||||
{
|
||||
pFoeSendStored = 0;
|
||||
}
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) EOE1*/
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
171
ecatfoe.h
Normal file
171
ecatfoe.h
Normal file
@ -0,0 +1,171 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup FoE FileTransfer over EtherCAT
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file ecatfoe.h
|
||||
\author EthercatSSC@beckhoff.com
|
||||
|
||||
\version 5.12
|
||||
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 FOE2: handle 16bit only access<br>
|
||||
<br>Changes to version V5.10:<br>
|
||||
V5.11 FOE1: handle busy on a read request, change OPMode to OPCode (same terms as in the spec)<br>
|
||||
<br>Changes to version V5.01:<br>
|
||||
V5.10 FOE1: Add new FoE error codes (0x800C,0x800D,0x800F)<br>
|
||||
V5.10 FOE2: Update file handling to support File sizes greater than 0x8000 Bytes (change value of "FOE_MAXDATA")<br>
|
||||
<br>Changes to version - :<br>
|
||||
V5.01 : Start file change log
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "esc.h"
|
||||
#include "mailbox.h"
|
||||
|
||||
#ifndef _ECATFOE_H_
|
||||
#define _ECATFOE_H_
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Defines and Types
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
- Services
|
||||
-----------------------------------------------*/
|
||||
#define ECAT_FOE_OPCODE_RRQ 1 /**< \brief Read request*/
|
||||
#define ECAT_FOE_OPCODE_WRQ 2 /**< \brief Write request*/
|
||||
#define ECAT_FOE_OPCODE_DATA 3 /**< \brief Data datagram*/
|
||||
#define ECAT_FOE_OPCODE_ACK 4 /**< \brief Acknowledge datagram*/
|
||||
#define ECAT_FOE_OPCODE_ERR 5 /**< \brief Error datagram*/
|
||||
#define ECAT_FOE_OPCODE_BUSY 6 /**< \brief Busy datagram*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
- States
|
||||
-----------------------------------------------*/
|
||||
#define FOE_READY 0 /**< \brief Ready state*/
|
||||
#define FOE_WAIT_FOR_ACK 1 /**< \brief Wait for acknowledgement state*/
|
||||
#define FOE_WAIT_FOR_DATA 2 /**< \brief Wait for data state*/
|
||||
#define FOE_WAIT_FOR_RESET 3 /**< \brief Wait for reset state*/
|
||||
#define FOE_WAIT_FOR_LAST_ACK 4 /**< \brief Wait for last acknowledgement state*/
|
||||
#define FOE_PROGRAMMING 5 /**< \brief Programming state*/
|
||||
#define FOE_WAIT_FOR_LAST_DATA 6 /**< \brief Wait for last data state*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 71 to 73 deleted*/
|
||||
|
||||
|
||||
|
||||
/** \brief FoE header*/
|
||||
typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 OpCode; /**< \brief OpCode
|
||||
*
|
||||
* 1 : RRQ<br>
|
||||
* 2 : WRQ<br>
|
||||
* 3 : DATA<br>
|
||||
* 4 : ACK<br>
|
||||
* 5 : ERR<br>
|
||||
* 6 : BUSY*/
|
||||
union MBX_STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 Password[2]; /**< \brief Password (used in Read request and Write request). 0 if unknown*/
|
||||
UINT16 PacketNo[2]; /**< \brief Packet number (used in DATA and ACK datagram)*/
|
||||
UINT16 ErrorCode[2]; /**< \brief Error code (used in ERR datagram)*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 94 to 97 deleted*/
|
||||
#define FOE_COMMAND_LOWWORD 0
|
||||
#define FOE_COMMAND_HIGHWORD 1
|
||||
struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 Done; /**< \brief Done indication (used in BUSY datagram)*/
|
||||
UINT16 Entire; /**< \brief Entire indication (used in BUSY datagram)*/
|
||||
}MBX_STRUCT_PACKED_END
|
||||
Busy; /**< \brief Busy variable*/
|
||||
}MBX_STRUCT_PACKED_END
|
||||
Cmd; /**< \brief Command field*/
|
||||
|
||||
|
||||
}MBX_STRUCT_PACKED_END
|
||||
TFOEHEADER;
|
||||
|
||||
|
||||
#define FOE_HEADER_SIZE SIZEOF(TFOEHEADER) /**< \brief FoE header size*/
|
||||
|
||||
/** \brief Complete FoE datagram*/
|
||||
typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
TMBXHEADER MbxHeader; /**< \brief Mailbox header*/
|
||||
TFOEHEADER FoeHeader; /**< \brief FoE header*/
|
||||
UINT16 Data[((MAX_MBX_DATA_SIZE)-(FOE_HEADER_SIZE)) >> 1]; /**< \brief FoE Data buffer*/
|
||||
}MBX_STRUCT_PACKED_END
|
||||
TFOEMBX;
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 128 to 130 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
- Results
|
||||
-----------------------------------------------*/
|
||||
#define FOE_ERROR 0x8000 /**< \brief Error result*/
|
||||
#define FOE_FINISHED ((FOE_ERROR)-1) /**< \brief Datagram finished*/
|
||||
#define FOE_FINISHED_NOACK ((FOE_FINISHED)-1) /**< \brief Datagram finished no acknowledgement*/
|
||||
#define FOE_ACK ((FOE_FINISHED_NOACK)-1) /**< \brief Acknowledgement*/
|
||||
#define FOE_ACKFINISHED ((FOE_ACK)-1) /**< \brief Acknowledgement finished*/
|
||||
#define FOE_WAIT ((FOE_ACKFINISHED)-1) /**< \brief Wait */
|
||||
#define FOE_MAXBUSY ((FOE_WAIT)-1) /**< \brief Max busy indication*/
|
||||
#define FOE_MAXBUSY_ZERO ((FOE_MAXBUSY)-100) /**< \brief Min busy indication*/
|
||||
#define FOE_MAXDATA ((FOE_MAXBUSY_ZERO)-1) /**< \brief Maximum data within one FoE Datagram*/
|
||||
|
||||
#endif //_ECATFOE_H_
|
||||
|
||||
#if _ECATFOE_
|
||||
#define PROTO
|
||||
#else
|
||||
#define PROTO extern
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Global Variables
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
PROTO UINT32 u32PacketNo; /**< \brief Stores the actual packet number to be expected*/
|
||||
PROTO UINT32 u32FileOffset; /**< \brief Stores the next file offset to be sent */
|
||||
PROTO UINT32 u32LastFileOffset; /**< \brief Stores the actual sent file offset */
|
||||
PROTO UINT16 u16FileAccessState; /**< \brief Stores the actual state of the file transmission sequence */
|
||||
PROTO TMBX MBXMEM * pFoeSendStored; /**<If the mailbox service could not be sent (or stored),
|
||||
the FoE service will be stored in this variable
|
||||
and will be sent automatically from the mailbox handler
|
||||
(FOE_ContinueInd) when the send mailbox will be read
|
||||
the next time from the master */
|
||||
|
||||
PROTO UINT16 u16FoeMaxSendBlockSize; /**< \brief indicates the maximum size of an FoE fragment (from the slave to the master)*/
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Global Functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
PROTO void FOE_Init(void);
|
||||
PROTO UINT8 FOE_ServiceInd(TFOEMBX MBXMEM * pFoeInd);
|
||||
PROTO void FOE_ContinueInd(TMBX MBXMEM * pMbx);
|
||||
|
||||
#undef PROTO
|
||||
/** @}*/
|
||||
56
ecatslv.h
56
ecatslv.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -12,8 +13,11 @@
|
||||
\file ecatslv.h
|
||||
\author EthercatSSC@beckhoff.com
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 EMCY1: update emergency diagcodes for invalid sm configuration<br>
|
||||
V5.13 ESM1: local error handling update, ECAT_StateChange triggers only transitions from Op->Any or reject/accept a pending transition<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 COE4: add timestamp object (0x10F8) and update diagnosis handling<br>
|
||||
V5.12 ECAT6: remove mailbox SyncManager if no mailbox is supported (SM0 Output, SM1 Input)<br>
|
||||
@ -41,6 +45,7 @@ V5.01 : Start file change log
|
||||
|
||||
#include "ecat_def.h"
|
||||
|
||||
/*ET9300 Project Handler :(#if EL9800_HW #elif FC1100_HW #elif MCI_HW) lines 47 to 53 deleted*/
|
||||
#include "esc.h"
|
||||
#include "f2838x_cm_hw.h"
|
||||
|
||||
@ -60,6 +65,7 @@ V5.01 : Start file change log
|
||||
#define OBJGETNEXTSTR(p) ( (OBJCONST CHAR OBJMEM * )( &((p)[OBJSTRLEN( (OBJCONST CHAR OBJMEM *) (p) ) + 1]) ) ) /**< \brief Macro to get next name within the objetc name string*/
|
||||
#endif
|
||||
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 75 to 115 deleted*/
|
||||
#ifndef LO_BYTE
|
||||
#define LO_BYTE 0 /**< \brief LowByte within an WORD*/
|
||||
#endif
|
||||
@ -133,19 +139,19 @@ V5.01 : Start file change log
|
||||
#endif
|
||||
|
||||
#ifndef BIT2BYTE
|
||||
#define BIT2BYTE(x) (((x)+7)>>3) /**< \brief Marco to convert Bit size to Byte size (round up)*/
|
||||
#define BIT2BYTE(x) (((x)+7)>>3) /**< \brief Macro to convert Bit size to Byte size (round up)*/
|
||||
#endif
|
||||
|
||||
#ifndef BYTE2BIT
|
||||
#define BYTE2BIT(x) ((x)<<3) /**< \brief Marco to convert Byte size to Bit size*/
|
||||
#define BYTE2BIT(x) ((x)<<3) /**< \brief Macro to convert Byte size to Bit size*/
|
||||
#endif
|
||||
|
||||
#ifndef BIT2WORD
|
||||
#define BIT2WORD(x) (((x)+15)>>4) /**< \brief Marco to convert Bit size to Word size (round up)*/
|
||||
#define BIT2WORD(x) (((x)+15)>>4) /**< \brief Macro to convert Bit size to Word size (round up)*/
|
||||
#endif
|
||||
|
||||
#ifndef BYTE2WORD
|
||||
#define BYTE2WORD(x) (((x)+1)>>1) /**< \brief Marco to convert Bytes size to Word size (round up)*/
|
||||
#define BYTE2WORD(x) (((x)+1)>>1) /**< \brief Macro to convert Bytes size to Word size (round up)*/
|
||||
#endif
|
||||
|
||||
#ifndef ROUNDUPBYTE2WORD
|
||||
@ -165,6 +171,7 @@ V5.01 : Start file change log
|
||||
#define STATE_MASK ((UINT8) 0x0F) /**< \brief State mask*/
|
||||
#define STATE_CHANGE ((UINT8) 0x10) /**< \brief State change (Error indication/acknowledge) mask and value*/
|
||||
#define STATE_DEVID ((UINT8) 0x20) /**< \brief Request/response Explicit device ID*/
|
||||
#define STATE_VALID(x) ((((x) & STATE_MASK) == STATE_INIT) || (((x) & STATE_MASK) == STATE_PREOP) || (((x) & STATE_MASK) == STATE_SAFEOP) || (((x) & STATE_MASK) == STATE_OP)) /**< \brief Check if one of the mandatory supported state values are set*/
|
||||
|
||||
#define BOOT_2_INIT ((UINT8)((STATE_BOOT) << 4) | (STATE_INIT)) /**< \brief State transition BOOT to INIT*/
|
||||
#define BOOT_2_PREOP ((UINT8)((STATE_BOOT) << 4) | (STATE_PREOP)) /**< \brief State transition BOOT to INIT*/
|
||||
@ -202,16 +209,16 @@ V5.01 : Start file change log
|
||||
ESM transition error codes
|
||||
|
||||
*/
|
||||
|
||||
#define SYNCMANCHODDADDRESS 0x00 /**< \brief Emergency and Diagnosis code for an odd SyncManager address*/
|
||||
/*ECATCHANGE_START(V5.13) EMCY1*/
|
||||
#define SYNCMANCHSIZE 0x00 /**< \brief Emergency and Diagnosis code for an invalid SyncManager size*/
|
||||
#define SYNCMANCHADDRESS 0x01 /**< \brief Emergency and Diagnosis code for an invalid SyncManager address*/
|
||||
#define SYNCMANCHSIZE 0x02 /**< \brief Emergency and Diagnosis code for an invalid SyncManager size*/
|
||||
#define SYNCMANCHSETTINGS 0x03 /**< \brief Emergency and Diagnosis code for an invalid SyncManager settings*/
|
||||
#define ERROR_SYNCMANCH(code, channel) ((code)+((channel)<<2)) /**< \brief Marco to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHODDADDRESS(channel) ((SYNCMANCHODDADDRESS)+((channel)<<2)) /**< \brief Marco to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHADDRESS(channel) ((SYNCMANCHADDRESS)+((channel)<<2)) /**< \brief Marco to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHSIZE(channel) ((SYNCMANCHSIZE)+((channel)<<2)) /**< \brief Marco to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHSETTINGS(channel) ((SYNCMANCHSETTINGS)+((channel)<<2)) /**< \brief Marco to add SyncManager channel*/
|
||||
#define SYNCMANCHSETTINGS 0x02 /**< \brief Emergency and Diagnosis code for an invalid SyncManager settings*/
|
||||
#define ERROR_SYNCMANCH(code, channel) ((code)+((channel)<<2)) /**< \brief Macro to add SyncManager channel*/
|
||||
|
||||
/*ECATCHANGE_END(V5.13) EMCY1*/
|
||||
#define ERROR_SYNCMANCHADDRESS(channel) ((SYNCMANCHADDRESS)+((channel)<<2)) /**< \brief Macro to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHSIZE(channel) ((SYNCMANCHSIZE)+((channel)<<2)) /**< \brief Macro to add SyncManager channel*/
|
||||
#define ERROR_SYNCMANCHSETTINGS(channel) ((SYNCMANCHSETTINGS)+((channel)<<2)) /**< \brief Macro to add SyncManager channel*/
|
||||
#define ERROR_SYNCTYPES 0x80 /**< \brief Emergency and Diagnosis code for an invalid Sync types*/
|
||||
#define ERROR_DCSYNCCONTROL 0x81 /**< \brief Emergency and Diagnosis code for an invalid DC Sync control*/
|
||||
#define ERROR_DCSYNC0CYCLETIME 0x82 /**< \brief Emergency and Diagnosis code for an invalid Sync0 cycle time*/
|
||||
@ -294,8 +301,8 @@ V5.01 : Start file change log
|
||||
#define ALSTATUSCODE_MODULE_ID_LIST_NOT_MATCH 0x0070 /**< \brief Detected Module Ident List (0xF030) and Configured Module Ident List (0xF050) does not match*/
|
||||
#define ALSTATUSCODE_SUPPLY_VOLTAGE_TOO_LOW 0x0080 /**< \brief The slave supply voltage is too low*/
|
||||
#define ALSTATUSCODE_SUPPLY_VOLTAGE_TOO_HIGH 0x0081 /**< \brief The slave supply voltage is too high*/
|
||||
#define ALSTATUSCODE_TEMPERATURE_TOO_LOW 0x0080 /**< \brief The slave temperature is too low*/
|
||||
#define ALSTATUSCODE_TEMPERATURE_TOO_HIGH 0x0081 /**< \brief The slave temperature is too high*/
|
||||
#define ALSTATUSCODE_TEMPERATURE_TOO_LOW 0x0082 /**< \brief The slave temperature is too low*/
|
||||
#define ALSTATUSCODE_TEMPERATURE_TOO_HIGH 0x0083 /**< \brief The slave temperature is too high*/
|
||||
|
||||
|
||||
|
||||
@ -321,11 +328,13 @@ V5.01 : Start file change log
|
||||
#define MAILBOX_READ_EVENT ((UINT16) 0x0200) /**< \brief MBoxIn read event*/
|
||||
#define PROCESS_OUTPUT_EVENT ((UINT16) 0x0400) /**< \brief Output process data write event*/
|
||||
#define PROCESS_INPUT_EVENT ((UINT16) 0x0800) /**< \brief Input process data read event*/
|
||||
/*ET9300 Project Handler :(#if MAILBOX_SUPPORTED #else) lines 380 to 383 deleted*/
|
||||
|
||||
#define MAILBOX_WRITE 0 /**< \brief SyncManager ID for MBoxOut (master to slave)*/
|
||||
#define MAILBOX_READ 1 /**< \brief SyncManager ID for MBoxIn (slave to master)*/
|
||||
#define PROCESS_DATA_OUT 2 /**< \brief SyncManager ID for output process data (master to slave)*/
|
||||
#define PROCESS_DATA_IN 3 /**< \brief SyncManager ID for input process data (slave to master)*/
|
||||
/*ET9300 Project Handler :(#if MAILBOX_SUPPORTED #else) lines 390 to 393 deleted*/
|
||||
|
||||
|
||||
|
||||
@ -345,6 +354,7 @@ V5.01 : Start file change log
|
||||
#define LED_INVERT_DOUBLEFLASH 0xC2 /**< \brief LED invert double flash*/
|
||||
#define LED_ON 0x01 /**< \brief LED on*/
|
||||
|
||||
/*ET9300 Project Handler :(#elif ESC_SUPPORT_ECAT_LED) lines 414 to 422 deleted*/
|
||||
|
||||
|
||||
#define MEMORY_START_ADDRESS 0x1000 /**< \brief ESC DPRAM start address*/
|
||||
@ -355,6 +365,7 @@ V5.01 : Start file change log
|
||||
#endif
|
||||
#ifndef DC_EVENT_MASK
|
||||
#define DC_EVENT_MASK PROCESS_OUTPUT_EVENT /**< \brief AL Event mask (value of register 0x204) in case of DC synchronisation*/
|
||||
/*ET9300 Project Handler :(#if MAX_PD_OUTPUT_SIZE > 0 #else) lines 434 to 436 deleted*/
|
||||
#endif
|
||||
|
||||
|
||||
@ -370,6 +381,7 @@ V5.01 : Start file change log
|
||||
------ Global Variables
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*ET9300 Project Handler :(#if BOOTSTRAPMODE_SUPPORTED) lines 452 to 454 deleted*/
|
||||
PROTO BOOL bEcatOutputUpdateRunning; /**< \brief Indicates the OP state, will be set in StartOutputHandler
|
||||
and reset in StopOutputHandler*/
|
||||
|
||||
@ -409,9 +421,9 @@ PROTO UINT16 Sync1WdValue; /**< \brief Sync1 watchdog
|
||||
PROTO UINT16 LatchInputSync0Value; /**< \brief Sync0 event on which the inputs shall be latched and copied to the ESC buffer. If the inputs shall be latched base don Sync1 the value is set to 0.*/
|
||||
PROTO UINT16 LatchInputSync0Counter; /**< \brief Sync0 counter used to get the Sync0 event to latch the Inputs. */
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE4*/
|
||||
PROTO BOOL b32BitDc;
|
||||
/*ECATCHANGE_END(V5.12) COE4*/
|
||||
|
||||
/*ET9300 Project Handler :(#if !COE_SUPPORTED) lines 500 to 502 deleted*/
|
||||
|
||||
|
||||
PROTO BOOL bEscIntEnabled; /**< \brief Indicates that the ESC interrupt is enabled (SM2/3 or SYNC0/1-event),
|
||||
@ -419,8 +431,10 @@ PROTO BOOL bEscIntEnabled; /**< \brief Indicates th
|
||||
|
||||
PROTO BOOL b3BufferMode; /**< \brief Indicates that inputs and outputs are running in 3-Buffer-Mode*/
|
||||
|
||||
PROTO BOOL bLocalErrorFlag; /**< \brief Contains the information if the application has a local error*/
|
||||
/*ECATCHANGE_START(V5.13) ESM1*/
|
||||
PROTO UINT16 u16LocalErrorCode; /**< \brief Reason for local error*/
|
||||
PROTO UINT8 u8LocalErrorState; /**< \brief State of the current local error (lower state could be set by the master)*/
|
||||
/*ECATCHANGE_END(V5.13) ESM1*/
|
||||
PROTO BOOL bApplEsmPending; /**< \brief Indicates if the local application ESM function need to be called from Al_ConntrolRes (is true if NOERR_INWORK is returned by generic ESM function)*/
|
||||
PROTO BOOL bEcatWaitForAlControlRes; /**< \brief Contains the information that the state machine waits for an acknowledge
|
||||
for the last AL_ControlInd from the application/generic stack*/
|
||||
@ -441,10 +455,11 @@ PROTO UINT16 nMaxEscAddress; /**< \brief Max supporte
|
||||
|
||||
PROTO UINT8 nAlStatus; /**< \brief Contains the actual AL Status, will be written in AL_ControlInd*/
|
||||
|
||||
PROTO BOOL bExplicitDevIdRequested; /**< \brief Indicates if 0x0120.5 is set*/
|
||||
/*ET9300 Project Handler :(#if EXPLICIT_DEVICE_ID) lines 536 to 538 deleted*/
|
||||
|
||||
PROTO UINT16 EcatWdValue; /**< \brief Contains the value of the watchdog in ms, will be written in StartInputHandler.
|
||||
In case that the ESC watchdog feature is used this variable just indicates if the watchdog is enabled or disabled*/
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 542 to 546 deleted*/
|
||||
PROTO UINT16 nEscAddrOutputData; /**< \brief Contains the SM address for the output process data*/
|
||||
PROTO UINT16 nEscAddrInputData; /**< \brief Contains the SM address for the input process data*/
|
||||
|
||||
@ -459,6 +474,7 @@ PROTO void DisableSyncManChannel(UINT8 channel);
|
||||
PROTO TSYNCMAN ESCMEM *GetSyncMan(UINT8 channel);
|
||||
PROTO void SetALStatus(UINT8 alStatus, UINT16 alStatusCode);
|
||||
PROTO void AL_ControlInd(UINT8 alControl, UINT16 alStatusCode);
|
||||
/*ET9300 Project Handler :(#if !ESC_SM_WD_SUPPORTED) lines 565 to 569 deleted*/
|
||||
PROTO void DC_CheckWatchdog(void);
|
||||
PROTO void CheckIfEcatError(void);
|
||||
PROTO void ECAT_Init(void);
|
||||
|
||||
28
esc.h
28
esc.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -45,18 +46,21 @@ V5.01 : Start file change log
|
||||
#define BL_PAGE_SIZE 512
|
||||
|
||||
/*---------------------------------------------
|
||||
- ESC Offsets (Detailed Information about the registers are located in the ESC Datasheets e.g. ET1100 Datasheet www.beckhoff.com/english.asp?download/ethercat_development_products.htm?id=71003127100387)
|
||||
- ESC Offsets (Detailed Information about the registers are located in the ESC Datasheets e.g. ET1100 Datasheet http://www.beckhoff.com/english.asp?download/ethercat_development_products.htm?id=71003127100387)
|
||||
-----------------------------------------------*/
|
||||
#define ESC_INFO_OFFSET 0x0000 /**< \brief ESC information registers startoffset*/
|
||||
|
||||
#define ESC_COMM_INFO_OFFSET 0x0004 /**< \brief Communication information registers startoffset*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 54 to 59 deleted*/
|
||||
#define ESC_DPRAM_SIZE_OFFSET 0x0006 /**< \brief Register Description: Size of the supported DPRAM in KB*/
|
||||
/*ET9300 Project Handler :(#if ESC_16BIT_ACCESS) lines 61 to 65 deleted*/
|
||||
#define ESC_SM_CHANNELS_OFFSET 0x0005 /**< \brief Register Description: Number of supported SyncManager channels (or entities) of the EtherCAT Slave Controller*/
|
||||
|
||||
#define ESC_FEATURES_OFFSET 0x0008 /**< \brief Register indicating ESC features*/
|
||||
#define ESC_DC_32BIT_MASK 0x00000008 /**< \brief register 0x0008.3 indicates if the DC Unit supports 32Bit/64Bit DC*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 73 to 75 deleted*/
|
||||
|
||||
#define ESC_SLAVE_ADDRESS_OFFSET 0x0010 /**< \brief Register Description: Address used for node addressing (FPxx commands)*/
|
||||
|
||||
@ -70,8 +74,15 @@ V5.01 : Start file change log
|
||||
#define ESC_ERROR_LED_OVERRIDE 0x0139 /**< \brief Register Description: Set Ecat Error indication via ESC. (not all ESC types support this feature)*/
|
||||
|
||||
#define ESC_PDI_CONTROL_OFFSET 0x0140 /**< \brief Register Description: Specifies the process data interface*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 89 to 91 deleted*/
|
||||
#define ESC_DEVICE_EMULATION 0x0100 /**< \brief Device emulation bit*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS || ESC_16BIT_ACCESS) lines 95 to 99 deleted*/
|
||||
#define ESC_PDI_CONFIGURATION 0x0151 /**< \brief Register Description: PDI configuration register (values defined by the ESC configuration data)*/
|
||||
#define ESC_SYNC0_MAPPED_TO_ALEVENT 0x08 /**< \brief bit indicating if the Sync0 event is mapped to the AL Event register*/
|
||||
#define ESC_SYNC1_MAPPED_TO_ALEVENT 0x80 /**< \brief bit indicating if the Sync1 event is mapped to the AL Event register*/
|
||||
|
||||
|
||||
#define ESC_AL_EVENTMASK_OFFSET 0x0204 /**< \brief Register Description: AL Event masking of the AL Event Request register Events for mapping to PDI IRQ signal*/
|
||||
#define ESC_AL_EVENT_OFFSET 0x0220 /**< \brief Register Description: "Mirror" register for ESC events*/
|
||||
|
||||
@ -79,9 +90,11 @@ V5.01 : Start file change log
|
||||
|
||||
#define ESC_PD_WD_TIME 0x0420 /**< \brief Register Description: Number of basic watchdog increments (Default value with Watchdog divider 100us means 100ms Watchdog)*/
|
||||
#define ESC_PD_WD_STATE 0x0440 /**< \brief Register Description: Watchdog Status of Process Data (triggered by SyncManagers)*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 113 to 115 deleted*/
|
||||
#define ESC_PD_WD_TRIGGER_MASK 0x0001 /**< \brief Trigger state of the process data watchdog*/
|
||||
|
||||
#define ESC_EEPROM_CONFIG_OFFSET 0x0500 /**< \brief Register Description: EEPROM Access Configuration*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 120 to 138 deleted*/
|
||||
/*EEPROM config and access state bit mask (based on "ESC_EEPROM_CONFIG_OFFSET") - START*/
|
||||
#define ESC_EEPROM_ASSIGN_TO_PDI_MASK 0x0001 /**< \brief Description (0x500.0): PDI has EEPROM control*/
|
||||
#define ESC_EEPROM_LOCKED_BY_PDI_MASK 0x0100 /**< \brief Description (0x500.8): PDI locked EEPROM access*/
|
||||
@ -115,34 +128,41 @@ V5.01 : Start file change log
|
||||
#define ESC_SYSTEMTIME_OFFSET 0x0910 /**< \brief Register Description: Local copy of the System Time*/
|
||||
|
||||
#define ESC_DC_UNIT_CONTROL_OFFSET 0x0980 /**< \brief Register Description: Control registers for Cycle and Sync Unit (can be predefined with the "AssignActivate" Element in the device description, for further information see ETG.2000)*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 179 to 190 deleted*/
|
||||
#define ESC_DC_SYNC_ACTIVATION_OFFSET 0x0981 /**< \brief Register Description: Sync Configuration*/
|
||||
#define ESC_DC_SYNC_UNIT_ACTIVE_MASK 0x01 /**< \brief Description (0x981.0): Sync Out Unit is activated*/
|
||||
#define ESC_DC_SYNC0_ACTIVE_MASK 0x02 /**< \brief Description (0x981.1): Sync0 generation is activated*/
|
||||
#define ESC_DC_SYNC1_ACTIVE_MASK 0x04 /**< \brief Description (0x981.2): Sync1 generation is activated*/
|
||||
#define ESC_DC_SYNC_UNIT_AUTO_ACTIVE_MASK 0x08 /**< \brief Description (0x980.11): Sync Out Unit is activated automatic when System time was written*/
|
||||
|
||||
#define ESC_DC_SYNC_STATUS 0x098C /**< \brief Register Description: register 0x98E and 0x98F reflecting the status of Sync0 and Sync1*/
|
||||
|
||||
#define ESC_DC_SYNC0_CYCLETIME_OFFSET 0x09A0 /**< \brief Register Description: 32Bit Time between two consecutive SYNC0 pulses in ns*/
|
||||
#define ESC_DC_SYNC1_CYCLETIME_OFFSET 0x09A4 /**< \brief Register Description: 32Bit Time between two consecutive SYNC1 pulses in ns*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 205 to 207 deleted*/
|
||||
|
||||
|
||||
/*---------------------------------------------
|
||||
- Sync Manager
|
||||
-----------------------------------------------*/
|
||||
/** \brief SyncManager Register struture*/
|
||||
/** \brief SyncManager register structure*/
|
||||
typedef struct STRUCT_PACKED_START
|
||||
{
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 217 to 259 deleted*/
|
||||
|
||||
UINT16 PhysicalStartAddress; /**< \brief SyncManager address*/
|
||||
UINT16 Length; /**< \brief SyncManager length*/
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_16BIT_ACCESS) lines 264 to 303 deleted*/
|
||||
//ESC_8BIT ACCESS
|
||||
UINT8 Settings[4]; /**< \brief Register values 0x0804 : 0x0807*/
|
||||
|
||||
/*Defines to access :
|
||||
* - SM Control register 0x0804
|
||||
*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 310 to 312 deleted*/
|
||||
#define SM_SETTING_CONTROL_OFFSET 0 /**< \brief Offset to value of register 0x0804*/
|
||||
#define SM_SETTING_MODE_MASK 0x02 /**< \brief SyncManager mode mask*/
|
||||
#define SM_SETTING_MODE_THREE_BUFFER_VALUE 0x00 /**< \brief SyncManager 3Buffer mode value*/
|
||||
@ -155,11 +175,13 @@ typedef struct STRUCT_PACKED_START
|
||||
/*Defines to access :
|
||||
* - SM Status register 0x0805
|
||||
*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 326 to 328 deleted*/
|
||||
#define SM_SETTING_STATUS_OFFSET 1 /**< \brief Offset to value of register 0x0805*/
|
||||
#define SM_STATUS_MBX_BUFFER_FULL 0x08 /**< \brief Indicates in one buffer mode if buffer was completely written (based on "ESC_SYNCMAN_STATUS_OFFSET")*/
|
||||
/*Defines to access :
|
||||
* - SM Active register 0x0806
|
||||
*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 335 to 337 deleted*/
|
||||
#define SM_SETTING_ACTIVATE_OFFSET 2 /**< \brief Offset to value of register 0x0806*/
|
||||
#define SM_SETTING_ENABLE_VALUE 0x01 /**< \brief SyncManager enable*/
|
||||
#define SM_SETTING_REPAET_REQ_MASK 0x02 /**< \brief SyncManager Repeat request*/
|
||||
@ -168,6 +190,7 @@ typedef struct STRUCT_PACKED_START
|
||||
/*Defines to access :
|
||||
* - SM PDI COntrol register 0x0807
|
||||
*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 347 to 349 deleted*/
|
||||
#define SM_SETTING_PDICONTROL_OFFSET 3 /**< \brief Offset to value of register 0x0807*/
|
||||
#define SM_SETTING_PDI_DISABLE 0x01 /**< \brief Bit0 of register 0x0807 (if 1 SM is disabled from PDI)*/
|
||||
#define SM_SETTING_REPEAT_ACK 0x02 /**< \brief Bit1 of register 0x0807*/
|
||||
@ -175,6 +198,7 @@ typedef struct STRUCT_PACKED_START
|
||||
TSYNCMAN;
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if FC1100_HW) lines 361 to 363 deleted*/
|
||||
|
||||
#endif //_ESC_H_
|
||||
/** @}*/
|
||||
|
||||
299
foeappl.c
Normal file
299
foeappl.c
Normal file
@ -0,0 +1,299 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
\addtogroup FoE FileTransfer over EtherCAT
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file foeappl.c
|
||||
\author EthercatSSC@beckhoff.com
|
||||
\brief Implementation
|
||||
This file contains an example how to use the FoE services
|
||||
|
||||
\version 5.12
|
||||
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 FOE1: update new interface,move the FoE sample to sampleappl,add FoE application callback functions<br>
|
||||
<br>Changes to version V5.10:<br>
|
||||
V5.11 FOE2: FoE_Read() check File name buffer before store the requested file name, add string terminator<br>
|
||||
V5.11 TEST5: send a FoE busy on a FoE read request<br>
|
||||
V5.11 TEST9: "add behaviour 0x2020.7 (SDO requests on 0x3006.0 are set to pending until an FoE read request on ""UnlockSdoResp"" is received or in case that no mbx queue is supported when a new mbx request was received)"<br>
|
||||
<br>Changes to version V5.0:<br>
|
||||
V5.10 FOE2: Update file handling to support File sizes greater than 0x8000 Bytes (change value of "FOE_MAXDATA")<br>
|
||||
<br>Changes to version V4.20:<br>
|
||||
V5.0 FOE3: Add additional file name copy operation to provide name byte swapping<br>
|
||||
V5.0 FOE5: Add FoE test operation (FOE_SAVE_FILES need to be disabled). On download only the files size is save. On upload a file with incrementing content and the previous downloaded size will be created.<br>
|
||||
V5.0 FOE6: Save file if MBX 16Bit access is enabled<br>
|
||||
<br>Changes to version V4.11:<br>
|
||||
V4.20 FOE 2: Add File store compiler switch<br>
|
||||
V4.20 FOE 1: Removed FILESUPPORT<br>
|
||||
V4.11 FOE 1: nFileWriteOffset is now a 32bit variable to extend the maximum file size<br>
|
||||
<br>Changes to version V3.20:<br>
|
||||
V4.10 FOE 1-14: Filetransfer over FoE: Files can be read and stored to harddisk<br>
|
||||
without any filesizelimitation (FILESUPPORT must defined)
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#include "ecat_def.h"
|
||||
|
||||
|
||||
#include "ecatslv.h"
|
||||
|
||||
#include "ecatfoe.h"
|
||||
|
||||
#define _FOEAPPL_ 1
|
||||
#include "foeappl.h"
|
||||
#undef _FOEAPPL_
|
||||
#define _FOEAPPL_ 0
|
||||
|
||||
/*ET9300 Project Handler :(#if BOOTSTRAPMODE_SUPPORTED) lines 59 to 61 deleted*/
|
||||
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 64 to 66 deleted*/
|
||||
|
||||
#include "applInterface.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ internal Types and Defines
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Module internal function declarations
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Module internal variable definitions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pName Pointer to the name of the file
|
||||
\param nameSize Length of the file name
|
||||
\param pData Pointer to the response data
|
||||
\param password Password for the file read
|
||||
|
||||
\return size of the data to be sent, busy or an error code
|
||||
1..FOE_MAXBUSY-101 (size of data to be sent)
|
||||
FOE_MAXBUSY-100 (0%) (busy)
|
||||
FOE_MAXBUSY (100%) (busy)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (error)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (error)
|
||||
ECAT_FOE_ERRCODE_ACCESS (error)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (error)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (error)
|
||||
ECAT_FOE_ERRCODE_PACKENO (error)
|
||||
ECAT_FOE_ERRCODE_EXISTS (error)
|
||||
ECAT_FOE_ERRCODE_NOUSER (error)
|
||||
|
||||
\brief The function starts a file reading
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 FOE_Read(UINT16 MBXMEM * pName, UINT16 nameSize, UINT16 MBXMEM * pData, UINT32 password)
|
||||
{
|
||||
|
||||
if (pAPPL_FoeRead != NULL)
|
||||
{
|
||||
return pAPPL_FoeRead(pName, nameSize, password, u16FoeMaxSendBlockSize, pData);
|
||||
}
|
||||
|
||||
|
||||
return ECAT_FOE_ERRCODE_NOTDEFINED;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pName Pointer to the name of the file
|
||||
\param nameSize Length of the file name
|
||||
\param password Password for the file read
|
||||
|
||||
\return okay, busy or an error code
|
||||
0 (okay)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (error)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (error)
|
||||
ECAT_FOE_ERRCODE_ACCESS (error)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (error)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (error)
|
||||
ECAT_FOE_ERRCODE_PACKENO (error)
|
||||
ECAT_FOE_ERRCODE_EXISTS (error)
|
||||
ECAT_FOE_ERRCODE_NOUSER (error)
|
||||
|
||||
(no busy response shall be returned by this function.
|
||||
If the slave stack requires some time to handle the incoming data the function FOE_Data() should return busy)
|
||||
|
||||
\brief The function starts a file writing
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 FOE_Write(UINT16 MBXMEM * pName, UINT16 nameSize, UINT32 password)
|
||||
{
|
||||
if (pAPPL_FoeWrite != NULL)
|
||||
{
|
||||
return pAPPL_FoeWrite(pName,nameSize,password);
|
||||
}
|
||||
|
||||
return ECAT_FOE_ERRCODE_NOTDEFINED;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param pData Received file data
|
||||
\param Size Length of received file data
|
||||
|
||||
\return okay, busy or an error code
|
||||
0 (okay)
|
||||
FOE_MAXBUSY-100 (0%) (busy)
|
||||
FOE_MAXBUSY (100%) (busy)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (error)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (error)
|
||||
ECAT_FOE_ERRCODE_ACCESS (error)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (error)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (error)
|
||||
ECAT_FOE_ERRCODE_PACKENO (error)
|
||||
ECAT_FOE_ERRCODE_EXISTS (error)
|
||||
ECAT_FOE_ERRCODE_NOUSER (error)
|
||||
|
||||
\brief The function is called to write the next part of a file
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 FOE_Data(UINT16 MBXMEM * pData, UINT16 Size)
|
||||
{
|
||||
BOOL bDataFollowing = FALSE;
|
||||
|
||||
if(Size == (u16ReceiveMbxSize - MBX_HEADER_SIZE - FOE_HEADER_SIZE) )
|
||||
{
|
||||
bDataFollowing = TRUE;
|
||||
}
|
||||
|
||||
if(pAPPL_FoeWriteData != NULL)
|
||||
{
|
||||
UINT16 error = 0;
|
||||
error = pAPPL_FoeWriteData(pData, Size, bDataFollowing);
|
||||
|
||||
if (error > 0)
|
||||
{
|
||||
return error;
|
||||
}
|
||||
else if (bDataFollowing == FALSE)
|
||||
{
|
||||
return FOE_ACKFINISHED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return ECAT_FOE_ERRCODE_NOTDEFINED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param fileOffset Offset of the next file data to be sent
|
||||
\param pData Buffer for file data to be sent
|
||||
|
||||
\return size of the data to be sent, busy or an error code
|
||||
0 (all data was sent before)
|
||||
1..MAX_FILE_SIZE (size of data to be sent)
|
||||
FOE_MAXBUSY-100 (0%) (busy)
|
||||
FOE_MAXBUSY (100%) (busy)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (error)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (error)
|
||||
ECAT_FOE_ERRCODE_ACCESS (error)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (error)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (error)
|
||||
ECAT_FOE_ERRCODE_PACKENO (error)
|
||||
ECAT_FOE_ERRCODE_EXISTS (error)
|
||||
ECAT_FOE_ERRCODE_NOUSER (error)
|
||||
|
||||
\brief The function is called when the reading of a part of a file is acknowledged
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 FOE_Ack(UINT32 fileOffset, UINT16 MBXMEM * pData)
|
||||
{
|
||||
|
||||
if (pAPPL_FoeReadData != NULL)
|
||||
{
|
||||
return pAPPL_FoeReadData(fileOffset, u16FoeMaxSendBlockSize, pData);
|
||||
}
|
||||
|
||||
return ECAT_FOE_ERRCODE_NOTDEFINED;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param done Indicates how much of the busy action is done
|
||||
\param fileOffset Offset of the next file data to be sent
|
||||
\param pData Buffer for file data to be sent
|
||||
|
||||
\return size of the data to be sent, busy or an error code
|
||||
0 (all data was sent before)
|
||||
1..MAX_FILE_SIZE (size of data to be sent)
|
||||
FOE_MAXBUSY-100 (0%) (busy)
|
||||
FOE_MAXBUSY (100%) (busy)
|
||||
ECAT_FOE_ERRCODE_NOTDEFINED (error)
|
||||
ECAT_FOE_ERRCODE_NOTFOUND (error)
|
||||
ECAT_FOE_ERRCODE_ACCESS (error)
|
||||
ECAT_FOE_ERRCODE_DISKFULL (error)
|
||||
ECAT_FOE_ERRCODE_ILLEGAL (error)
|
||||
ECAT_FOE_ERRCODE_PACKENO (error)
|
||||
ECAT_FOE_ERRCODE_EXISTS (error)
|
||||
ECAT_FOE_ERRCODE_NOUSER (error)
|
||||
|
||||
\brief The function is called when the reading of a part of a file should be repeated
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UINT16 FOE_Busy(UINT16 done, UINT32 fileOffset, UINT16 MBXMEM * pData)
|
||||
{
|
||||
/* send last part again */
|
||||
return FOE_Ack(fileOffset, pData);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\param errorCode error code
|
||||
|
||||
\brief The function is called when a file transfer is aborted from the other station
|
||||
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void FOE_Error(UINT32 errorCode)
|
||||
{
|
||||
if (pAPPL_FoeError != NULL)
|
||||
{
|
||||
pAPPL_FoeError(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
89
foeappl.h
Normal file
89
foeappl.h
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup FoE FileTransfer over EtherCAT
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
\file foeappl.h
|
||||
\author EthercatSSC@beckhoff.com
|
||||
|
||||
\version 5.12
|
||||
|
||||
<br>Changes to version V5.01:<br>
|
||||
V5.12 FOE1: update new interface,move the FoE sample to sampleappl,add FoE application callback functions<br>
|
||||
<br>Changes to version - :<br>
|
||||
V5.01 : Start file change log
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Includes
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
#include "ecat_def.h"
|
||||
|
||||
#ifndef _FOEAPPL_H_
|
||||
#define _FOEAPPL_H_
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Defines and Types
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------
|
||||
- Error Codes
|
||||
-----------------------------------------------*/
|
||||
#define ECAT_FOE_ERRCODE_NOTDEFINED 0x8000 /**< \brief Not defined*/
|
||||
#define ECAT_FOE_ERRCODE_NOTFOUND 0x8001 /**< \brief The file requested by an FoE upload service could not be found on the server*/
|
||||
#define ECAT_FOE_ERRCODE_ACCESS 0x8002 /**< \brief Read or write access to this file not allowed (e.g. due to local control).*/
|
||||
#define ECAT_FOE_ERRCODE_DISKFULL 0x8003 /**< \brief Disk to store file is full or memory allocation exceeded*/
|
||||
#define ECAT_FOE_ERRCODE_ILLEGAL 0x8004 /**< \brief Illegal FoE operation, e.g. service identifier invalid*/
|
||||
#define ECAT_FOE_ERRCODE_PACKENO 0x8005 /**< \brief FoE packet number invalid*/
|
||||
#define ECAT_FOE_ERRCODE_EXISTS 0x8006 /**< \brief The file which is requested to be downloaded does already exist*/
|
||||
#define ECAT_FOE_ERRCODE_NOUSER 0x8007 /**< \brief No User*/
|
||||
#define ECAT_FOE_ERRCODE_BOOTSTRAPONLY 0x8008 /**< \brief FoE only supported in Bootstrap*/
|
||||
#define ECAT_FOE_ERRCODE_NOTINBOOTSTRAP 0x8009 /**< \brief This file may not be accessed in BOOTSTRAP state*/
|
||||
#define ECAT_FOE_ERRCODE_NORIGHTS 0x800A /**< \brief Password invalid*/
|
||||
#define ECAT_FOE_ERRCODE_PROGERROR 0x800B /**< \brief Generic programming error. Should only be returned if error reason cannot be distinguished*/
|
||||
#define ECAT_FOE_ERRCODE_INVALID_CHECKSUM 0x800C /**< \brief checksum included in the file is invalid*/
|
||||
#define ECAT_FOE_ERRCODE_INVALID_FIRMWARE 0x800D /**< \brief The hardware does not support the downloaded firmware*/
|
||||
#define ECAT_FOE_ERRCODE_NO_FILE 0x800F /**< \brief Do not use (identical with 0x8001)*/
|
||||
#define ECAT_FOE_ERRCODE_NO_FILE_HEADER 0x8010 /**< \brief Missing file header of error in file header*/
|
||||
#define ECAT_FOE_ERRCODE_FLASH_ERROR 0x8011 /**< \brief Flash cannot be accessed*/
|
||||
|
||||
#endif //_FOEAPPL_H_
|
||||
|
||||
#ifdef _FOEAPPL_
|
||||
#define PROTO
|
||||
#else
|
||||
#define PROTO extern
|
||||
#endif
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Global Variables
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ Global Functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
PROTO UINT16 FOE_Read(UINT16 MBXMEM * pName, UINT16 nameSize, UINT16 MBXMEM * pData, UINT32 password);
|
||||
PROTO UINT16 FOE_Write(UINT16 MBXMEM * pName, UINT16 nameSize, UINT32 password);
|
||||
PROTO UINT16 FOE_Data(UINT16 MBXMEM * pData, UINT16 Size);
|
||||
PROTO UINT16 FOE_Ack(UINT32 fileOffset, UINT16 MBXMEM * pData);
|
||||
PROTO UINT16 FOE_Busy(UINT16 done, UINT32 fileOffset, UINT16 MBXMEM * pData);
|
||||
PROTO void FOE_Error(UINT32 errorCode);
|
||||
|
||||
#undef PROTO
|
||||
/** @}*/
|
||||
161
mailbox.c
161
mailbox.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -71,8 +72,13 @@ psRepeatMbx will be set to 0.<br>
|
||||
When the repeated mailbox service was sent (call of MBX_MailboxReadInd), psReadMbx will be stored in psRepeatMbx<br>
|
||||
and psStoreMbx will be sent (in MBX_CopyToSendMailbox) and stored in psReadMbx, psStoreMbx will be set to 0.
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 EOE1: <br>
|
||||
V5.13 MBX2: clear unused bytes before write mailbox response<br>
|
||||
V5.13 MBX3: fix potential double free memory and lost of last read mailbox data<br>
|
||||
V5.13 TEST3: 0x2040.4 send ARP on unsupported mailbox request<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 EOE5: free pending buffer in EoE_Init, EoE_Init is called on startup and PI transition<br>
|
||||
V5.12 MBX1: use only 16Bit variables to write the last byte of the mailbox buffer in case of ESC_16BIT_Access,update clear message queue in case of stop mailbox handler<br>
|
||||
@ -134,6 +140,7 @@ V4.07 ECAT 1: The sources for SPI and MCI were merged (in ecat_def.h<br>
|
||||
|
||||
#include "ecatslv.h"
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 143 to 145 deleted*/
|
||||
|
||||
|
||||
#define _MAILBOX_ 1
|
||||
@ -141,10 +148,13 @@ V4.07 ECAT 1: The sources for SPI and MCI were merged (in ecat_def.h<br>
|
||||
#undef _MAILBOX_
|
||||
/*remove definition of _MAILBOX_ (#ifdef is used in mailbox.h)*/
|
||||
|
||||
/*ET9300 Project Handler :(#if SOE_SUPPORTED) lines 153 to 155 deleted*/
|
||||
/*ET9300 Project Handler :(#if AOE_SUPPORTED) lines 156 to 158 deleted*/
|
||||
#include "ecatcoe.h"
|
||||
/* ECATCHANGE_START(V5.12) MBX3*/
|
||||
#include "sdoserv.h"
|
||||
/* ECATCHANGE_END(V5.12) MBX3*/
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE || SEGMENTED_SDO_SUPPORTED) lines 161 to 163 deleted*/
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 165 to 167 deleted*/
|
||||
#include "ecatfoe.h"
|
||||
/*ET9300 Project Handler :(#if EMERGENCY_SUPPORTED) lines 171 to 173 deleted*/
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------------------
|
||||
@ -159,6 +169,7 @@ V4.07 ECAT 1: The sources for SPI and MCI were merged (in ecat_def.h<br>
|
||||
------
|
||||
--------------------------------------------------------------------------------------*/
|
||||
/*variables are declared in ecatslv.c*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 188 to 192 deleted*/
|
||||
extern VARVOLATILE UINT8 u8dummy;
|
||||
|
||||
BOOL bNoMbxMemoryAvailable; /**< \brief Indicates if enough dynamic memory is available to handle at least one mailbox datagram */
|
||||
@ -264,7 +275,9 @@ void MBX_Init(void)
|
||||
sMbxSendQueue.lastInQueue = 0;
|
||||
sMbxSendQueue.maxQueueSize = MAX_MBX_QUEUE_SIZE;
|
||||
psWriteMbx = NULL;
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 304 to 306 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 308 to 310 deleted*/
|
||||
|
||||
psRepeatMbx = NULL;
|
||||
psReadMbx = NULL;
|
||||
@ -272,6 +285,7 @@ void MBX_Init(void)
|
||||
|
||||
bMbxRepeatToggle = FALSE;
|
||||
/*Reset Repeat acknowledge bit of SyncManager1 (0x80F bit 2)*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 318 to 332 deleted*/
|
||||
{
|
||||
UINT8 sm1Activate = 0;
|
||||
HW_EscReadByte(sm1Activate,(ESC_SM_PDICONTROL_OFFSET + SIZEOF_SM_REGISTER));
|
||||
@ -284,6 +298,7 @@ void MBX_Init(void)
|
||||
u8MailboxSendReqStored = 0;
|
||||
u8MbxWriteCounter = 0;
|
||||
u8MbxReadCounter = 0;
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 346 to 348 deleted*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -303,6 +318,7 @@ UINT16 MBX_StartMailboxHandler(void)
|
||||
/* get address of the receive mailbox sync manager (SM0) */
|
||||
TSYNCMAN ESCMEM * pSyncMan = (TSYNCMAN ESCMEM *)GetSyncMan(MAILBOX_WRITE);
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 368 to 373 deleted*/
|
||||
/* store size of the receive mailbox */
|
||||
u16ReceiveMbxSize = pSyncMan->Length;
|
||||
/* store the address of the receive mailbox */
|
||||
@ -311,6 +327,7 @@ UINT16 MBX_StartMailboxHandler(void)
|
||||
/* get address of the send mailbox sync manager (SM1) */
|
||||
pSyncMan =(TSYNCMAN ESCMEM *) GetSyncMan(MAILBOX_READ);
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 383 to 388 deleted*/
|
||||
/* store the size of the send mailbox */
|
||||
u16SendMbxSize = pSyncMan->Length;
|
||||
/* store the address of the send mailbox */
|
||||
@ -321,7 +338,9 @@ UINT16 MBX_StartMailboxHandler(void)
|
||||
{
|
||||
return ALSTATUSCODE_INVALIDMBXCFGINPREOP;
|
||||
}
|
||||
/*ET9300 Project Handler :(#if AOE_SUPPORTED) lines 400 to 408 deleted*/
|
||||
|
||||
u16FoeMaxSendBlockSize = (u16SendMbxSize - SIZEOF(TFOEHEADER) - MBX_HEADER_SIZE);
|
||||
|
||||
/* enable the receive mailbox sync manager channel */
|
||||
EnableSyncManChannel(MAILBOX_WRITE);
|
||||
@ -390,10 +409,13 @@ void MBX_StopMailboxHandler(void)
|
||||
APPL_FreeMailboxBuffer(psReadMbx);
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 486 to 488 deleted*/
|
||||
|
||||
SODS_ClearPendingResponse();
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE || SEGMENTED_SDO_SUPPORTED) lines 490 to 492 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 494 to 496 deleted*/
|
||||
|
||||
FOE_Init();
|
||||
|
||||
psWriteMbx = NULL;
|
||||
psRepeatMbx = NULL;
|
||||
@ -402,6 +424,7 @@ void MBX_StopMailboxHandler(void)
|
||||
|
||||
bMbxRepeatToggle = FALSE;
|
||||
/*Reset Repeat acknowledge bit of SyncManager1 (0x080F bit 2)*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 511 to 525 deleted*/
|
||||
{
|
||||
UINT8 sm1Activate = 0;
|
||||
HW_EscReadByte(sm1Activate,(ESC_SM_PDICONTROL_OFFSET + SIZEOF_SM_REGISTER));
|
||||
@ -420,8 +443,6 @@ void MBX_StopMailboxHandler(void)
|
||||
if (pMbx)
|
||||
{
|
||||
APPL_FreeMailboxBuffer(pMbx);
|
||||
/*ECATCHANGE_START(V5.12) MBX1*/
|
||||
/*ECATCHANGE_END(V5.12) MBX1*/
|
||||
}
|
||||
} while (pMbx != NULL);
|
||||
|
||||
@ -431,11 +452,11 @@ void MBX_StopMailboxHandler(void)
|
||||
if (pMbx)
|
||||
{
|
||||
APPL_FreeMailboxBuffer(pMbx);
|
||||
/*ECATCHANGE_START(V5.12) MBX1*/
|
||||
/*ECATCHANGE_END(V5.12) MBX1*/
|
||||
}
|
||||
} while (pMbx != NULL);
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 557 to 559 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if EMERGENCY_SUPPORTED) lines 561 to 563 deleted*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -450,15 +471,27 @@ UINT8 MailboxServiceInd(TMBX MBXMEM *pMbx)
|
||||
{
|
||||
UINT8 result;
|
||||
|
||||
/*ET9300 Project Handler :(#if BOOTSTRAPMODE_SUPPORTED) lines 578 to 584 deleted*/
|
||||
|
||||
switch ( (pMbx->MbxHeader.Flags[MBX_OFFS_TYPE] & MBX_MASK_TYPE) >> MBX_SHIFT_TYPE )
|
||||
{
|
||||
/*ET9300 Project Handler :(#if AOE_SUPPORTED) lines 588 to 594 deleted*/
|
||||
case MBX_TYPE_COE:
|
||||
/* CoE datagram received */
|
||||
result = COE_ServiceInd((TCOEMBX MBXMEM *) pMbx);
|
||||
break;
|
||||
|
||||
/*ET9300 Project Handler :(#if SOE_SUPPORTED) lines 602 to 608 deleted*/
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 609 to 619 deleted*/
|
||||
case MBX_TYPE_FOE:
|
||||
/* FoE datagram received */
|
||||
result = FOE_ServiceInd((TFOEMBX MBXMEM *) pMbx);
|
||||
break;
|
||||
|
||||
/*ET9300 Project Handler :(#if VOE_SUPPORTED) lines 627 to 633 deleted*/
|
||||
default:
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION && EOE_SUPPORTED) lines 636 to 704 deleted*/
|
||||
result = MBXERR_UNSUPPORTEDPROTOCOL;
|
||||
break;
|
||||
}
|
||||
@ -499,6 +532,7 @@ void MBX_MailboxWriteInd(TMBX MBXMEM *pMbx)
|
||||
and unchanged */
|
||||
if ( mbxCounter == 0 || mbxCounter != u8MbxWriteCounter )
|
||||
{
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 745 to 769 deleted*/
|
||||
/* new mailbox service received */
|
||||
/* mbxCounter = 0: old EtherCAT master */
|
||||
/* new MBX service received, store the new mailbox counter */
|
||||
@ -508,6 +542,7 @@ void MBX_MailboxWriteInd(TMBX MBXMEM *pMbx)
|
||||
/* check the protocol type and call the XXXX_ServiceInd-function */
|
||||
|
||||
result = PutInMbxQueue(pMbx, &sMbxReceiveQueue);
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 780 to 782 deleted*/
|
||||
}
|
||||
|
||||
if ( result != 0 )
|
||||
@ -526,6 +561,7 @@ void MBX_MailboxWriteInd(TMBX MBXMEM *pMbx)
|
||||
APPL_FreeMailboxBuffer(pMbx);
|
||||
pMbx = NULL;
|
||||
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 802 to 805 deleted*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,13 +574,21 @@ void MBX_MailboxReadInd(void)
|
||||
{
|
||||
bSendMbxIsFull = FALSE;
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION && EOE_SUPPORTED) lines 818 to 823 deleted*/
|
||||
// HBu 02.05.06: the pointer psRepeatMbx is only free if there is no stored
|
||||
// mailbox service from the last repeat
|
||||
if ( psRepeatMbx && psStoreMbx == NULL )
|
||||
if (psRepeatMbx && psStoreMbx == NULL)
|
||||
{
|
||||
/* the last sent service is not stored for repeat any longer */
|
||||
APPL_FreeMailboxBuffer(psRepeatMbx);
|
||||
psRepeatMbx = NULL;
|
||||
/* the last sent service is not stored for repeat any longer */
|
||||
/*ECATCHANGE_START(V5.13) MBX3*/
|
||||
if (psReadMbx != psRepeatMbx)
|
||||
{
|
||||
APPL_FreeMailboxBuffer(psRepeatMbx);
|
||||
psRepeatMbx = NULL;
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) MBX3*/
|
||||
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 838 to 840 deleted*/
|
||||
}
|
||||
|
||||
/* the actual sent service has to be stored for repeat */
|
||||
@ -559,7 +603,9 @@ void MBX_MailboxReadInd(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
TMBX MBXMEM *pMbx = GetOutOfMbxQueue(&sMbxSendQueue);
|
||||
TMBX MBXMEM* pMbx = GetOutOfMbxQueue(&sMbxSendQueue);
|
||||
|
||||
|
||||
if (pMbx)
|
||||
{
|
||||
MBX_CopyToSendMailbox(pMbx);
|
||||
@ -569,6 +615,7 @@ void MBX_MailboxReadInd(void)
|
||||
if ( u8MailboxSendReqStored )
|
||||
{
|
||||
/* there are mailbox services stored to be sent */
|
||||
/*ET9300 Project Handler :(#if EMERGENCY_SUPPORTED) lines 869 to 880 deleted*/
|
||||
if ( u8MailboxSendReqStored & COE_SERVICE )
|
||||
{
|
||||
UINT8 result = 0;
|
||||
@ -585,6 +632,21 @@ void MBX_MailboxReadInd(void)
|
||||
}
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if SOE_SUPPORTED) lines 899 to 908 deleted*/
|
||||
if ( u8MailboxSendReqStored & FOE_SERVICE )
|
||||
{
|
||||
/* reset the flag indicating that FoE service to be sent was stored */
|
||||
u8MailboxSendReqStored &= ~FOE_SERVICE;
|
||||
/* call FoE function that will send the stored FoE service */
|
||||
FOE_ContinueInd(psWriteMbx);
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if VOE_SUPPORTED) lines 919 to 928 deleted*/
|
||||
/*ECATCHANGE_START(V5.13) EOE1*/
|
||||
/*pending EoE commands are handled from the MBX_Main function*/
|
||||
/*ECATCHANGE_END(V5.13) EOE1*/
|
||||
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 934 to 944 deleted*/
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -623,6 +685,7 @@ void MBX_MailboxRepeatReq(void)
|
||||
bSendMbxIsFull = FALSE;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 983 to 987 deleted*/
|
||||
|
||||
MBX_CopyToSendMailbox(pMbx);
|
||||
// HBu 17.06.06: psRepeatMbx has to be set to 0, when it was repeated, otherwise it would be returned twice
|
||||
@ -699,6 +762,7 @@ UINT8 MBX_MailboxSendReq( TMBX MBXMEM * pMbx, UINT8 flags )
|
||||
{
|
||||
u8MbxReadCounter++;
|
||||
}
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 1067 to 1070 deleted*/
|
||||
}
|
||||
/* HBu 13.02.06: Repeat-Counter was incremented too much if the mailbox service could not be sent */
|
||||
else
|
||||
@ -706,6 +770,7 @@ UINT8 MBX_MailboxSendReq( TMBX MBXMEM * pMbx, UINT8 flags )
|
||||
u8MbxReadCounter++;
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1078 to 1104 deleted*/
|
||||
if ( flags & FRAGMENTS_FOLLOW )
|
||||
{
|
||||
/* store the mailbox service that the corresponding XXX_ContinueInd function will
|
||||
@ -730,6 +795,7 @@ void MBX_CheckAndCopyMailbox( void )
|
||||
{
|
||||
UINT16 mbxLen;
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS) lines 1129 to 1137 deleted*/
|
||||
/* get the size of the received mailbox command and acknowledge the event*/
|
||||
HW_EscReadWord(mbxLen,u16EscAddrReceiveMbx);
|
||||
|
||||
@ -768,6 +834,7 @@ void MBX_CheckAndCopyMailbox( void )
|
||||
||( u8MailboxSendReqStored ) /* a mailbox service to be sent is still stored
|
||||
so the received mailbox service will not be processed
|
||||
until all stored mailbox services are sent */
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 1179 to 1181 deleted*/
|
||||
)
|
||||
{
|
||||
/* set flag that the processing of the mailbox service will be checked in the
|
||||
@ -801,15 +868,18 @@ void MBX_CheckAndCopyMailbox( void )
|
||||
/* copy the mailbox header and data*/
|
||||
HW_EscReadMbxMem((MEM_ADDR MBXMEM *) psWriteMbx,u16EscAddrReceiveMbx,mbxLen);
|
||||
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 1217 to 1219 deleted*/
|
||||
|
||||
{
|
||||
/*Read Control and Status of SyncManager 0 to check if the buffer is unlocked*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 1223 to 1231 deleted*/
|
||||
VARVOLATILE UINT8 smstate = 0x00;
|
||||
HW_EscReadByte(smstate,ESC_SYNCMAN_STATUS_OFFSET);
|
||||
|
||||
if(smstate & SM_STATUS_MBX_BUFFER_FULL)
|
||||
{
|
||||
/*Unlock the mailbox SyncManger buffer*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 1239 to 1245 deleted*/
|
||||
u8dummy = 0;
|
||||
HW_EscReadByte(u8dummy,(u16EscAddrReceiveMbx + u16ReceiveMbxSize - 1));
|
||||
|
||||
@ -855,23 +925,47 @@ UINT8 MBX_CopyToSendMailbox( TMBX MBXMEM *pMbx )
|
||||
{
|
||||
/* the variable mbxSize contains the size of the mailbox data to be sent */
|
||||
UINT16 mbxSize = pMbx->MbxHeader.Length;
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 1292 to 1295 deleted*/
|
||||
/*ECATCHANGE_START(V5.13) MBX2*/
|
||||
/*Reset the not used mailbox memory*/
|
||||
{
|
||||
UINT16 LastUsedAddr = u16EscAddrSendMbx + mbxSize + MBX_HEADER_SIZE;
|
||||
UINT16 LastAddrToReset = (u16EscAddrSendMbx + u16SendMbxSize);
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 1301 to 1326 deleted*/
|
||||
LastAddrToReset = LastAddrToReset - 1;
|
||||
u8dummy = 0;
|
||||
|
||||
/*clear all unused bytes*/
|
||||
while (LastUsedAddr < LastAddrToReset) /*reset all bytes until the second last valid address*/
|
||||
{
|
||||
HW_EscWriteByte(u8dummy, LastUsedAddr);
|
||||
LastUsedAddr = LastUsedAddr + 1;
|
||||
}
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) MBX2*/
|
||||
|
||||
HW_EscWriteMbxMem((MEM_ADDR *)pMbx, u16EscAddrSendMbx, (mbxSize + MBX_HEADER_SIZE));
|
||||
/* ECATCHANGE_HW(V5.10) HW1*/
|
||||
|
||||
|
||||
{
|
||||
/*Read Control and Status of SyncManager 1 to check if the buffer is still marked as empty*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 1345 to 1353 deleted*/
|
||||
VARVOLATILE UINT8 smstate = 0x00;
|
||||
HW_EscReadByte(smstate,(ESC_SYNCMAN_STATUS_OFFSET + SIZEOF_SM_REGISTER));
|
||||
|
||||
if(!(smstate & SM_STATUS_MBX_BUFFER_FULL))
|
||||
{
|
||||
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS || ESC_16BIT_ACCESS) lines 1361 to 1363 deleted*/
|
||||
|
||||
/*Write last Byte to trigger mailbox full flag*/
|
||||
/*ET9300 Project Handler :(#if ESC_32BIT_ACCESS #elif ESC_16BIT_ACCESS) lines 1366 to 1397 deleted*/
|
||||
u8dummy = 0;
|
||||
HW_EscWriteByte(u8dummy,(u16EscAddrSendMbx + u16SendMbxSize - 1));
|
||||
HW_EscWriteByte(u8dummy, (u16EscAddrSendMbx + u16SendMbxSize - 1));
|
||||
}
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 1404 to 1413 deleted*/
|
||||
/* store last send mailbox service for a possible repeat
|
||||
one buffer includes the last send service (psRepeatMbx),
|
||||
the other one the actual service to be sent (psReadMbx),
|
||||
@ -883,13 +977,13 @@ UINT8 MBX_CopyToSendMailbox( TMBX MBXMEM *pMbx )
|
||||
{
|
||||
psWriteMbx = NULL;
|
||||
}
|
||||
// HBu 17.06.06: psRepeatMbx was already updated in MBX_MailboxReadInd
|
||||
// psRepeatMbx = psReadMbx;
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 1425 to 1431 deleted*/
|
||||
psReadMbx = pMbx;
|
||||
|
||||
/* set flag that send mailbox is full now */
|
||||
bSendMbxIsFull = TRUE;
|
||||
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 1437 to 1440 deleted*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -897,9 +991,8 @@ UINT8 MBX_CopyToSendMailbox( TMBX MBXMEM *pMbx )
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\brief This function is called cyclically to check if a received
|
||||
Mailbox service was stored.
|
||||
|
||||
\brief This function is called cyclically to check if a received Mailbox service was
|
||||
stored.
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void MBX_Main(void)
|
||||
@ -920,21 +1013,33 @@ void MBX_Main(void)
|
||||
{
|
||||
/* Mailbox error response: type 0 (mailbox service protocol) */
|
||||
pMbx->MbxHeader.Length = 4;
|
||||
pMbx->MbxHeader.Flags[MBX_OFFS_TYPE] &= ~(MBX_MASK_TYPE);
|
||||
pMbx->MbxHeader.Flags[MBX_OFFS_TYPE] &= ~(MBX_MASK_TYPE);
|
||||
pMbx->Data[0] = SWAPWORD(MBXSERVICE_MBXERRORCMD);
|
||||
pMbx->Data[1] = SWAPWORD(result);
|
||||
MBX_MailboxSendReq(pMbx, 0);
|
||||
}
|
||||
}
|
||||
while ( pMbx != NULL );
|
||||
/*ET9300 Project Handler :(#if MAILBOX_QUEUE #else) lines 1478 to 1480 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if EMERGENCY_SUPPORTED) lines 1482 to 1489 deleted*/
|
||||
|
||||
if ( bReceiveMbxIsLocked )
|
||||
{
|
||||
/* the work on the receive mailbox is locked, check if it can be
|
||||
unlocked (if all mailbox commands has been sent */
|
||||
MBX_CheckAndCopyMailbox();
|
||||
}
|
||||
if (bReceiveMbxIsLocked)
|
||||
{
|
||||
/* the work on the receive mailbox is locked, check if it can be unlocked (if all
|
||||
mailbox commands has been sent */
|
||||
MBX_CheckAndCopyMailbox();
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.13) EOE1*/
|
||||
/*Try to send pending Mailbox data,
|
||||
could be to pending previously due to local (memory) limitations which are no available*/
|
||||
if (u8MailboxSendReqStored)
|
||||
{
|
||||
/* there are mailbox services stored to be sent */
|
||||
/*ET9300 Project Handler :(#if EOE_SUPPORTED) lines 1505 to 1513 deleted*/
|
||||
}
|
||||
/*ECATCHANGE_END(V5.13) EOE1*/
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -98,7 +99,9 @@ typedef struct MBX_STRUCT_PACKED_START
|
||||
UINT16 Length; /**< \brief Length*/
|
||||
UINT16 Address; /**< \brief Address*/
|
||||
|
||||
/*ET9300 Project Handler :(#if MBX_16BIT_ACCESS) lines 103 to 120 deleted*/
|
||||
UINT8 Flags[2]; /**< \brief Flags*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 122 to 125 deleted*/
|
||||
#define MBX_OFFS_TYPE 1 /**< \brief Protocol type offset*/
|
||||
#define MBX_OFFS_COUNTER 1 /**< \brief Protocol counter offset*/
|
||||
#define MBX_MASK_TYPE 0x0F /**< \brief Protocol type mask*/
|
||||
@ -162,11 +165,13 @@ PROTO UINT16 u16EscAddrReceiveMbx; /**< \brief Receive mailbox
|
||||
PROTO UINT16 u16EscAddrSendMbx; /**< \brief Send mailbox address (default SM1)*/
|
||||
PROTO UINT8 u8MbxWriteCounter; /**< \brief Write mailbox counter*/
|
||||
PROTO UINT8 u8MbxReadCounter; /**< \brief Read mailbox counter*/
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 193 to 195 deleted*/
|
||||
PROTO UINT8 u8MailboxSendReqStored; /**< \brief Mailbox send request stored*/
|
||||
PROTO TMBX MBXMEM * psWriteMbx; /**< \brief Pointer to write mailbox buffer*/
|
||||
PROTO TMBX MBXMEM * psReadMbx; /**< \brief Pointer to read mailbox buffer*/
|
||||
PROTO TMBX MBXMEM * psRepeatMbx; /**< \brief Pointer to repeat mailbox buffer*/
|
||||
PROTO TMBX MBXMEM * psStoreMbx; /**< \brief Pointer to store mailbox buffer*/
|
||||
/*ET9300 Project Handler :(#if !MAILBOX_QUEUE) lines 201 to 203 deleted*/
|
||||
PROTO TMBXQUEUE MBXMEM sMbxSendQueue; /**< \brief Send mailbox queue*/
|
||||
PROTO TMBXQUEUE MBXMEM sMbxReceiveQueue; /**< \brief Receive mailbox queue*/
|
||||
|
||||
|
||||
252
objdef.c
252
objdef.c
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -14,8 +15,13 @@
|
||||
\brief Implementation
|
||||
This file contains the object dictionary access functions
|
||||
|
||||
\version 5.12
|
||||
\version 5.13
|
||||
|
||||
<br>Changes to version V5.12:<br>
|
||||
V5.13 COE1: handling objects with 255 entries<br>
|
||||
V5.13 COE4: update default entry name handling in case of 16Bit characters, add CoE Read/write indication functions<br>
|
||||
V5.13 COE9: prevent compiler warning in get entry description if char is 8bit<br>
|
||||
V5.13 TEST7: add entries with bit9-16 types<br>
|
||||
<br>Changes to version V5.11:<br>
|
||||
V5.12 COE10: update object entry string handling<br>
|
||||
V5.12 COE3: update entry access right handling<br>
|
||||
@ -47,7 +53,7 @@ V5.10 ECAT13: Update Synchronisation handling (FreeRun,SM Sync, Sync0, Sync1)<br
|
||||
Compare DC UINT configuration (by ESC Config data) vs. DC activation register settings<br>
|
||||
Update 0x1C3x entries<br>
|
||||
V5.10 ECAT3: Add new datatype handling (BITARRxx)<br>
|
||||
Use read/write marco to access STRING entries<br>
|
||||
Use read/write macro to access STRING entries<br>
|
||||
V5.10 SDO1: Handle access to enums on odd memory addresses (only for MBX_16BIT_ACCESS)<br>
|
||||
V5.10 SDO2: Check for termination char in every substring<br>
|
||||
V5.10 SDO5: Check also for PDO mapping object if the subindex 0 was set to 0 before the entries will be changed.<br>
|
||||
@ -111,7 +117,7 @@ V4.00 COEAPPL 2: The handling of backup parameters was included according to<br>
|
||||
*/
|
||||
|
||||
|
||||
#define OBJDEF 0x4000
|
||||
#define OBJDEF 0x4000
|
||||
#define OBJDEFMAX 0x0A
|
||||
|
||||
/*---------------------------------------------------------------------------------------
|
||||
@ -132,7 +138,11 @@ V4.00 COEAPPL 2: The handling of backup parameters was included according to<br>
|
||||
#undef _OBJDEF_
|
||||
/*remove definition of _OBJDEF_ (#ifdef is used in objdef.h)*/
|
||||
|
||||
#include "applInterface.h"
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 143 to 145 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 147 to 149 deleted*/
|
||||
|
||||
|
||||
|
||||
@ -183,6 +193,7 @@ OBJCONST TOBJECT OBJMEM * OBJ_GetObjectHandle( UINT16 index )
|
||||
OBJCONST TOBJECT OBJMEM * pObjEntry = (OBJCONST TOBJECT OBJMEM *) COE_GetObjectDictionary();
|
||||
|
||||
while (pObjEntry!= NULL)
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 201 to 203 deleted*/
|
||||
{
|
||||
|
||||
if (pObjEntry->Index == index)
|
||||
@ -190,6 +201,7 @@ OBJCONST TOBJECT OBJMEM * OBJ_GetObjectHandle( UINT16 index )
|
||||
return pObjEntry;
|
||||
}
|
||||
pObjEntry = (TOBJECT OBJMEM *) pObjEntry->pNext;
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 212 to 214 deleted*/
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -213,65 +225,12 @@ UINT32 OBJ_GetObjectLength( UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJME
|
||||
/* get the information of ObjCode and MaxSubindex in local variables to support different types of microcontroller */
|
||||
UINT8 objCode = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_OBJCODEMASK) >> OBJFLAGS_OBJCODESHIFT;
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE6*/
|
||||
UINT8 maxSubindex = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_MAXSUBINDEXMASK) >> OBJFLAGS_MAXSUBINDEXSHIFT;
|
||||
/*ECATCHANGE_END(V5.12) COE6*/
|
||||
UINT32 size = 0;
|
||||
|
||||
if ( bCompleteAccess )
|
||||
{
|
||||
if ( objCode == OBJCODE_VAR )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if ((objCode == OBJCODE_ARR)
|
||||
|| (IS_RX_PDO(pObjEntry->Index) || IS_TX_PDO(pObjEntry->Index))
|
||||
)
|
||||
{
|
||||
|
||||
/* we have to get the maxSubindex from the actual value of subindex 0,
|
||||
which is stored as UINT16 at the beginning of the object's variable */
|
||||
maxSubindex = (UINT8) ((UINT16 MBXMEM *) (pObjEntry->pVarPtr))[0];
|
||||
|
||||
|
||||
size = pObjEntry->pEntryDesc[1].BitLength *maxSubindex;
|
||||
|
||||
/* no padding required: Bit entries within an array object may overlap byte borders*/
|
||||
|
||||
/* we have to convert the size in bytes */
|
||||
size = BIT2BYTE(size);
|
||||
|
||||
if ( subindex == 0 )
|
||||
{
|
||||
/* add size for subindex 0 (is transmitted as UINT16) */
|
||||
size += 2;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
/* add the sizes of all entries */
|
||||
for (i = 1; i <= maxSubindex; i++)
|
||||
{
|
||||
size += pObjEntry->pEntryDesc[i].BitLength;
|
||||
}
|
||||
/* we have to convert the size in bytes */
|
||||
size = BIT2BYTE(size);
|
||||
|
||||
if ( subindex == 0 )
|
||||
{
|
||||
/* add size for subindex 0 (is transmitted as UINT16) */
|
||||
size += 2;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 239 to 314 deleted*/
|
||||
{
|
||||
if ( objCode == OBJCODE_VAR )
|
||||
{
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 318 to 326 deleted*/
|
||||
|
||||
return (BIT2BYTE(pObjEntry->pEntryDesc->BitLength));
|
||||
|
||||
@ -283,14 +242,15 @@ UINT32 OBJ_GetObjectLength( UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJME
|
||||
}
|
||||
else if((objCode == OBJCODE_ARR)
|
||||
|| (IS_RX_PDO(pObjEntry->Index) || IS_TX_PDO(pObjEntry->Index))
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 340 to 343 deleted*/
|
||||
)
|
||||
{
|
||||
return (BIT2BYTE(pObjEntry->pEntryDesc[1].BitLength));
|
||||
}
|
||||
else
|
||||
{
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 350 to 356 deleted*/
|
||||
{
|
||||
/*ECATCHANGE_START(V5.12) COE6*/
|
||||
if (maxSubindex < subindex)
|
||||
{
|
||||
return 0;
|
||||
@ -300,7 +260,6 @@ UINT32 OBJ_GetObjectLength( UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJME
|
||||
{
|
||||
return (BIT2BYTE(pObjEntry->pEntryDesc[subindex].BitLength));
|
||||
}
|
||||
/*ECATCHANGE_END(V5.12) COE6*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -350,8 +309,10 @@ UINT16 OBJ_GetNoOfObjects(UINT8 listType)
|
||||
OBJCONST TOBJECT OBJMEM * pObjEntry = (OBJCONST TOBJECT OBJMEM *) COE_GetObjectDictionary();
|
||||
UINT16 n = 0;
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 416 to 422 deleted*/
|
||||
|
||||
while (pObjEntry != NULL)
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 426 to 428 deleted*/
|
||||
{
|
||||
/* count the objects of the requested list type */
|
||||
if ( pObjEntry->Index >= 0x1000 )
|
||||
@ -379,6 +340,7 @@ UINT16 OBJ_GetNoOfObjects(UINT8 listType)
|
||||
}
|
||||
/* next object in object dictionary */
|
||||
pObjEntry = (TOBJECT OBJMEM *) pObjEntry->pNext;
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 457 to 459 deleted*/
|
||||
}
|
||||
|
||||
return n;
|
||||
@ -407,6 +369,7 @@ UINT16 OBJ_GetObjectList(UINT16 listType, UINT16 *pIndex, UINT16 size, UINT16
|
||||
UINT16 listFlags = 0x0020 << listType;
|
||||
OBJCONST TOBJECT OBJMEM * pObjEntry;
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 488 to 500 deleted*/
|
||||
|
||||
if ( pIndex[0] == 0x1000 )
|
||||
{
|
||||
@ -427,6 +390,7 @@ UINT16 OBJ_GetObjectList(UINT16 listType, UINT16 *pIndex, UINT16 size, UINT16
|
||||
if ( pObjEntry != NULL )
|
||||
{
|
||||
while (pObjEntry != NULL && size > 1 )
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 522 to 524 deleted*/
|
||||
{
|
||||
/* get the next index of the requested object list if there is enough space in the mailbox buffer */
|
||||
if ( pObjEntry->Index >= 0x1000 )
|
||||
@ -436,11 +400,13 @@ UINT16 OBJ_GetObjectList(UINT16 listType, UINT16 *pIndex, UINT16 size, UINT16
|
||||
if ( t )
|
||||
{
|
||||
UINT8 maxSubindex = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_MAXSUBINDEXMASK) >> OBJFLAGS_MAXSUBINDEXSHIFT;
|
||||
UINT8 i = 0;
|
||||
/*ECATCHANGE_START(V5.13) COE1*/
|
||||
UINT16 i = 0;
|
||||
/*ECATCHANGE_END(V5.13) COE1*/
|
||||
|
||||
while ( t && i <= maxSubindex )
|
||||
{
|
||||
if ( OBJ_GetEntryDesc(pObjEntry, i)->ObjAccess & listFlags )
|
||||
if ( OBJ_GetEntryDesc(pObjEntry, (UINT8)i)->ObjAccess & listFlags )
|
||||
{
|
||||
t = 0;
|
||||
}
|
||||
@ -456,6 +422,7 @@ UINT16 OBJ_GetObjectList(UINT16 listType, UINT16 *pIndex, UINT16 size, UINT16
|
||||
}
|
||||
}
|
||||
pObjEntry = (TOBJECT OBJMEM *) pObjEntry->pNext;
|
||||
/*ET9300 Project Handler :(#if !STATIC_OBJECT_DIC #else) lines 557 to 559 deleted*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,19 +495,23 @@ UINT16 OBJ_GetDesc( UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJMEM * pObj
|
||||
{
|
||||
if ( objCode == OBJCODE_REC )
|
||||
{
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 632 to 653 deleted*/
|
||||
{
|
||||
// get pointer to description of subindex 1 :
|
||||
// 16bit variable to avoid overflow if subindex 0xFF is read
|
||||
UINT16 i = 1;
|
||||
UINT16 tmpSubindex = subindex;
|
||||
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 660 to 666 deleted*/
|
||||
{
|
||||
|
||||
OBJCONST UCHAR OBJMEM * pSubDesc = (OBJCONST UCHAR OBJMEM *) OBJGETNEXTSTR( pDesc );
|
||||
/* ECATCHANGE_START(V5.12) COE10*/
|
||||
while (( i <= tmpSubindex )
|
||||
&&( pSubDesc[0] != 0xFF && pSubDesc[0] != 0xFE && pSubDesc[0] != 0xFFFF))
|
||||
/* ECATCHANGE_END(V5.12) COE10*/
|
||||
&&( pSubDesc[0] != 0xFF && pSubDesc[0] != 0xFE
|
||||
/* ECATCHANGE_START(V5.13) COE9*/
|
||||
/*ET9300 Project Handler :(#if MEMORY_UNIT_16BIT) lines 673 to 676 deleted*/
|
||||
/* ECATCHANGE_END(V5.13) COE9*/
|
||||
))
|
||||
{
|
||||
if ( i == tmpSubindex )
|
||||
{
|
||||
@ -569,7 +540,9 @@ UINT16 OBJ_GetDesc( UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJMEM * pObj
|
||||
if ( pData )
|
||||
{
|
||||
UCHAR OBJMEM TmpDescr[13];
|
||||
OBJSTRCPY(TmpDescr,aSubindexDesc,SIZEOF(TmpDescr));
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
MEMCPY(TmpDescr, aSubindexDesc, SIZEOF(TmpDescr));
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
|
||||
OBJ_CopyNumberToString( &TmpDescr[9], subindex );
|
||||
MBXSTRCPY( pData, TmpDescr, SIZEOF(TmpDescr) );
|
||||
@ -600,6 +573,7 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM * OBJ_GetEntryDesc(OBJCONST TOBJECT OBJMEM * p
|
||||
|
||||
if ((objCode == OBJCODE_ARR)
|
||||
|| (IS_RX_PDO(pObjEntry->Index) || IS_TX_PDO(pObjEntry->Index))
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 742 to 746 deleted*/
|
||||
)
|
||||
{
|
||||
/* object is an array */
|
||||
@ -616,6 +590,7 @@ OBJCONST TSDOINFOENTRYDESC OBJMEM * OBJ_GetEntryDesc(OBJCONST TOBJECT OBJMEM * p
|
||||
}
|
||||
else
|
||||
{
|
||||
/*ET9300 Project Handler :(#if DIAGNOSIS_SUPPORTED) lines 763 to 771 deleted*/
|
||||
{
|
||||
/* object is a variable or a record return the corresponding entry */
|
||||
pEntry = &pObjEntry->pEntryDesc[Subindex];
|
||||
@ -710,8 +685,10 @@ UINT16 OBJ_GetEntryOffset(UINT8 subindex, OBJCONST TOBJECT OBJMEM * pObjEntry)
|
||||
{
|
||||
bitOffset += pEntry->BitLength;
|
||||
}
|
||||
|
||||
bitOffset += 16;
|
||||
else
|
||||
{
|
||||
bitOffset += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DEFTYPE_UNSIGNED32:
|
||||
@ -744,6 +721,26 @@ UINT16 OBJ_GetEntryOffset(UINT8 subindex, OBJCONST TOBJECT OBJMEM * pObjEntry)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case DEFTYPE_REAL64:
|
||||
case DEFTYPE_INTEGER64:
|
||||
case DEFTYPE_UNSIGNED64:
|
||||
#if OBJ_DWORD_ALIGN
|
||||
/* the 64-bit variables in the structure are dword-aligned,
|
||||
align the actual bitOffset to a dword */
|
||||
bitOffset = (bitOffset + 31) & 0xFFE0;
|
||||
#elif OBJ_WORD_ALIGN
|
||||
/* the 64-bit variables in the structure are word-aligned,
|
||||
align the actual bitOffset to a word */
|
||||
bitOffset = (bitOffset + 15) & 0xFFF0;
|
||||
#endif
|
||||
|
||||
if (i < subindex)
|
||||
{
|
||||
|
||||
bitOffset += 64;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* align the actual bitOffset to a byte */
|
||||
if (i < subindex)
|
||||
@ -855,10 +852,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
UINT8 objCode = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_OBJCODEMASK) >> OBJFLAGS_OBJCODESHIFT;
|
||||
UINT16 maxSubindex = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_MAXSUBINDEXMASK) >> OBJFLAGS_MAXSUBINDEXSHIFT;
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM *pEntry;
|
||||
/* lastSubindex is used for complete access to make loop over the requested entries
|
||||
to be read, we initialize this variable with the requested subindex that only
|
||||
one loop will be done for a single access */
|
||||
UINT16 lastSubindex = subindex;
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1053 to 1058 deleted*/
|
||||
|
||||
if ( objCode != OBJCODE_VAR && index >= 0x1000 )
|
||||
{
|
||||
@ -867,21 +861,10 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
object's variable */
|
||||
maxSubindex = (*((UINT16 *) (pObjEntry->pVarPtr))) & 0x00FF;
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1067 to 1080 deleted*/
|
||||
}
|
||||
|
||||
if ( bCompleteAccess )
|
||||
{
|
||||
if ( objCode == OBJCODE_VAR || index < 0x1000 )
|
||||
{
|
||||
/* complete access is not supported with simple objects or ENUM descriptions */
|
||||
return ABORTIDX_UNSUPPORTED_ACCESS;
|
||||
}
|
||||
|
||||
|
||||
/* we read until the maximum subindex */
|
||||
lastSubindex = maxSubindex;
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1083 to 1097 deleted*/
|
||||
if ( subindex > maxSubindex )
|
||||
{
|
||||
/* the maximum subindex is reached */
|
||||
@ -897,9 +880,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
{
|
||||
/* check if we have read access (bits 0-2 (PREOP, SAFEOP, OP) of ObjAccess)
|
||||
by comparing with the actual state (bits 1-3 (PREOP, SAFEOP, OP) of AL Status) */
|
||||
/*ECATCHANGE_START(V5.12) COE3*/
|
||||
if (0 == (((UINT8) ((pEntry->ObjAccess & ACCESS_READ)<<1)) & (nAlStatus & STATE_MASK)))
|
||||
/*ECATCHANGE_END(V5.12) COE3*/
|
||||
{
|
||||
/* we don't have read access */
|
||||
if ( (pEntry->ObjAccess & ACCESS_READ) == 0 )
|
||||
@ -914,13 +895,21 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ECATCHANGE_START(V5.12) COE7*/
|
||||
else
|
||||
{
|
||||
return ABORTIDX_UNSUPPORTED_ACCESS;
|
||||
}
|
||||
/* ECATCHANGE_END(V5.12) COE7*/
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1133 to 1140 deleted*/
|
||||
}
|
||||
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
if (pAPPL_CoeReadInd != NULL)
|
||||
{
|
||||
pAPPL_CoeReadInd(index, subindex, bCompleteAccess);
|
||||
}
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
|
||||
if ( pObjEntry->Read != NULL )
|
||||
{
|
||||
/* Read function is defined, we call the object specific read function */
|
||||
@ -940,12 +929,19 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
p = (CHAR **) pVarPtr;
|
||||
pVarPtr = (UINT16 MBXMEM *)p[subindex-1];
|
||||
|
||||
/*ECATCHANGE_START(V5.13) */
|
||||
/*ET9300 Project Handler :(#if MBX_16BIT_ACCESS && !MEMORY_UNIT_16BIT) lines 1170 to 1200 deleted*/
|
||||
{
|
||||
// Get enum value (first 32Bit)
|
||||
/*ECATCHANGE_START(V5.13) */
|
||||
/*ET9300 Project Handler :(#if MEMORY_UNIT_16BIT) lines 1204 to 1210 deleted*/
|
||||
|
||||
/*ET9300 Project Handler :(#if (BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT)) lines 1212 to 1215 deleted*/
|
||||
pData[0] = pVarPtr[0];
|
||||
pData[1] = pVarPtr[1];
|
||||
pData += 2;
|
||||
pVarPtr += 2;
|
||||
/*ECATCHANGE_END(V5.13) */
|
||||
|
||||
// Get enum description
|
||||
OBJTOMBXSTRCPY(pData,pVarPtr,size-4);
|
||||
@ -958,7 +954,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
|
||||
|
||||
/* a variable object is read */
|
||||
for (i = subindex; i <= lastSubindex; i++)
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1235 to 1237 deleted*/
|
||||
{
|
||||
/* if only a single entry is requested, this loop will only be done once */
|
||||
UINT16 MBXMEM *pVarPtr = (UINT16 MBXMEM *) pObjEntry->pVarPtr;
|
||||
@ -980,9 +976,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
|
||||
/* get the corresponding entry description */
|
||||
pEntry = OBJ_GetEntryDesc(pObjEntry, (UINT8)i);
|
||||
/*ECATCHANGE_START(V5.12) COE3*/
|
||||
if (0 != (((UINT8) ((pEntry->ObjAccess & ACCESS_READ)<<1)) & (nAlStatus & STATE_MASK)) )
|
||||
/*ECATCHANGE_END(V5.12) COE3*/
|
||||
{
|
||||
if ( i == subindex /* requested entry */
|
||||
|| (bCompleteAccess && i >= subindex) ) /* complete access and entry should be read */
|
||||
@ -993,6 +987,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
if ( i == 0 && objCode != OBJCODE_VAR )
|
||||
{
|
||||
/* we read subindex 0 of an array or record */
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1270 to 1276 deleted*/
|
||||
{
|
||||
pData[0] = SWAPWORD((UINT16)maxSubindex);
|
||||
}
|
||||
@ -1053,6 +1048,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
case DEFTYPE_BIT6:
|
||||
case DEFTYPE_BIT7:
|
||||
case DEFTYPE_BIT8:
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1337 to 1348 deleted*/
|
||||
case DEFTYPE_BITARR8:
|
||||
/* in this example the objects are defined in that way,
|
||||
that the bit types are always inside a 16-bit field,
|
||||
@ -1126,6 +1122,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
|
||||
/* in this example the objects are defined in that way,
|
||||
that the 32 bit type are always starting at an exact WORD offset */
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT) lines 1422 to 1425 deleted*/
|
||||
pData[0] = pVarPtr[0];
|
||||
pData[1] = pVarPtr[1];
|
||||
pData += 2;
|
||||
@ -1141,6 +1138,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
|
||||
/* in this example the objects are defined in that way,
|
||||
that the 64 bit type are always starting at an exact WORD offset */
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT) lines 1442 to 1447 deleted*/
|
||||
pData[0] = pVarPtr[0];
|
||||
pData[1] = pVarPtr[1];
|
||||
pData[2] = pVarPtr[2];
|
||||
@ -1270,7 +1268,7 @@ UINT8 OBJ_Read( UINT16 index, UINT8 subindex, UINT32 objSize, OBJCONST TOBJECT O
|
||||
object shall be done or not
|
||||
|
||||
\return result of the write operation (0 (success) or an abort code (ABORTIDX_.... defined in
|
||||
sdosrv.h))
|
||||
sdoserv.h))
|
||||
|
||||
\brief This function writes the requested object
|
||||
*////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -1284,10 +1282,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
UINT16 maxConfiguredSubindex = (pObjEntry->ObjDesc.ObjFlags & OBJFLAGS_MAXSUBINDEXMASK) >> OBJFLAGS_MAXSUBINDEXSHIFT; //required to check if value for Subindex0 is valid
|
||||
OBJCONST TSDOINFOENTRYDESC OBJMEM *pEntry;
|
||||
BOOL bClearSubindex0Required = FALSE;
|
||||
/* lastSubindex is used for complete access to make loop over the requested entries
|
||||
to be read, we initialize this variable with the requested subindex that only
|
||||
one loop will be done for a single access */
|
||||
UINT16 lastSubindex = subindex;
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1592 to 1597 deleted*/
|
||||
|
||||
/* if subindex 0 is writable, the maximum subindex should be checked in an object specific function,
|
||||
because for the PDO mapping and PDO assign the object shall only be written if subindex 0 is 0. */
|
||||
@ -1298,35 +1293,15 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
object's variable */
|
||||
maxSubindex = (UINT8) ((UINT16 MBXMEM *) (pObjEntry->pVarPtr))[0];
|
||||
|
||||
/*ECATCHANGE_START(V5.12) COE9*/
|
||||
/*If the subindex0 of a PDO assign or PDO mapping object is 0 the maximum subindex is specified by the object description*/
|
||||
if(maxSubindex == 0 && (IS_PDO_ASSIGN(index) || IS_RX_PDO(index) || IS_TX_PDO(index) || (index == 0xF030)))
|
||||
/*ECATCHANGE_END(V5.12) COE9*/
|
||||
{
|
||||
maxSubindex = maxConfiguredSubindex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( bCompleteAccess )
|
||||
{
|
||||
if ( objCode == OBJCODE_VAR )
|
||||
{
|
||||
/* complete access is not supported with simple objects */
|
||||
return ABORTIDX_UNSUPPORTED_ACCESS;
|
||||
}
|
||||
|
||||
if ((subindex == 0) && (dataSize > 0))
|
||||
{
|
||||
/* we change the subindex 0 */
|
||||
maxSubindex = (UINT8) SWAPWORD(pData[0]);
|
||||
}
|
||||
|
||||
|
||||
/* we write until the maximum subindex */
|
||||
lastSubindex = maxSubindex;
|
||||
}
|
||||
else
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1616 to 1636 deleted*/
|
||||
if (subindex > maxSubindex)
|
||||
{
|
||||
/* the maximum subindex is reached */
|
||||
@ -1342,19 +1317,15 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
|
||||
/* check if we have write access (bits 3-5 (PREOP, SAFEOP, OP) of ObjAccess)
|
||||
by comparing with the actual state (bits 1-3 (PREOP, SAFEOP, OP) of AL Status) */
|
||||
/*ECATCHANGE_START(V5.12) COE3*/
|
||||
if (0 == (((UINT8)((pEntry->ObjAccess & ACCESS_WRITE) >> 2)) & (nAlStatus & STATE_MASK) ))
|
||||
/*ECATCHANGE_END(V5.12) COE3*/
|
||||
{
|
||||
/* we don't have write access */
|
||||
if ( (pEntry->ObjAccess & ACCESS_WRITE) == 0 )
|
||||
{
|
||||
/* ECATCHANGE_START(V5.12) COE7*/
|
||||
if (pEntry->ObjAccess == 0)
|
||||
{
|
||||
return ABORTIDX_UNSUPPORTED_ACCESS;
|
||||
}
|
||||
/* ECATCHANGE_END(V5.12) COE7*/
|
||||
else
|
||||
{
|
||||
/* it is a read only entry */
|
||||
@ -1367,14 +1338,15 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
return ABORTIDX_IN_THIS_STATE_DATA_CANNOT_BE_READ_OR_STORED;
|
||||
}
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1674 to 1681 deleted*/
|
||||
|
||||
}
|
||||
|
||||
/* Subindex 0 shall be set to zero if a single PDO / PDO assign entry is written
|
||||
or a complete access without subindex0 is requested */
|
||||
/*ECATCHANGE_START(V5.12) COE9*/
|
||||
if((subindex > 0) &&
|
||||
(IS_PDO_ASSIGN(index) || IS_RX_PDO(index)|| IS_TX_PDO(index) || (index == 0xF030))
|
||||
/*ECATCHANGE_END(V5.12) COE9*/
|
||||
)
|
||||
{
|
||||
/*Check if Subindex0 was cleared before*/
|
||||
@ -1388,7 +1360,18 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
if ( pObjEntry->Write != NULL )
|
||||
{
|
||||
/* Write function is defined, we call the object specific write function */
|
||||
return pObjEntry->Write(index, subindex, dataSize, pData, bCompleteAccess);
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
UINT8 result = 0;
|
||||
|
||||
result = pObjEntry->Write(index, subindex, dataSize, pData, bCompleteAccess);
|
||||
|
||||
if ((result == 0) && (pAPPL_CoeWriteInd != NULL))
|
||||
{
|
||||
pAPPL_CoeWriteInd(index, subindex, bCompleteAccess);
|
||||
}
|
||||
|
||||
return result;
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1400,8 +1383,9 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
return 0; //no error
|
||||
}
|
||||
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1725 to 1731 deleted*/
|
||||
/* we use the standard write function */
|
||||
for (i = subindex; i <= lastSubindex; i++)
|
||||
/*ET9300 Project Handler :(#if COMPLETE_ACCESS_SUPPORTED) lines 1733 to 1735 deleted*/
|
||||
{
|
||||
/* if only a single entry is requested, this loop will only be done once */
|
||||
UINT16 MBXMEM *pVarPtr = (UINT16 MBXMEM *) pObjEntry->pVarPtr;
|
||||
@ -1415,9 +1399,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
|
||||
/* we check if we have write access (bits 3-5 (PREOP, SAFEOP, OP) of ObjAccess)
|
||||
by comparing with the actual state (bits 1-3 (PREOP, SAFEOP, OP) of AL Status) */
|
||||
/*ECATCHANGE_START(V5.12) COE3*/
|
||||
if (0 != (((UINT8)((pEntry->ObjAccess & ACCESS_WRITE) >> 2)) & (nAlStatus & STATE_MASK) ))
|
||||
/*ECATCHANGE_END(V5.12) COE3*/
|
||||
{
|
||||
/* we have write access for this entry */
|
||||
if (i != 0)
|
||||
@ -1500,6 +1482,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
case DEFTYPE_BIT6:
|
||||
case DEFTYPE_BIT7:
|
||||
case DEFTYPE_BIT8:
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION) lines 1832 to 1843 deleted*/
|
||||
case DEFTYPE_BITARR8:
|
||||
/* in this example the objects are defined in that way,
|
||||
that the bit types are always inside a 16-bit field,
|
||||
@ -1596,7 +1579,6 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
bSyncSetByUser = TRUE;
|
||||
}
|
||||
|
||||
/*ECATCHANGE_START(V5.12) ECAT1*/
|
||||
if (i == 8) /* "Get Cycle Time" written*/
|
||||
{
|
||||
|
||||
@ -1621,7 +1603,6 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
sSyncManInPar.u8SyncError = 0;
|
||||
}
|
||||
} /* Subindex 8 written*/
|
||||
/*ECATCHANGE_END(V5.12) ECAT1*/
|
||||
}
|
||||
|
||||
pVarPtr[0] = u16NewData;
|
||||
@ -1642,6 +1623,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
|
||||
/* in this example the objects are defined in that way,
|
||||
that the 32 bit type are always starting at an exact WORD offset */
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT) lines 1992 to 2003 deleted*/
|
||||
if(bClearSubindex0Required &&
|
||||
((pVarPtr[0] != pData[0])
|
||||
|| (pVarPtr[1] != pData[1])))
|
||||
@ -1654,6 +1636,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
pVarPtr[1] = pData[1];
|
||||
pData += 2;
|
||||
}
|
||||
/*ET9300 Project Handler :(#if TEST_APPLICATION && DIAGNOSIS_SUPPORTED) lines 2017 to 2028 deleted*/
|
||||
break;
|
||||
case DEFTYPE_REAL64:
|
||||
case DEFTYPE_INTEGER64:
|
||||
@ -1665,6 +1648,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
}
|
||||
/* in this example the objects are defined in that way,
|
||||
that the 64 bit type are always starting at an exact WORD offset */
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT || BIG_ENDIAN_FORMAT) lines 2040 to 2045 deleted*/
|
||||
pVarPtr[0] = pData[0];
|
||||
pVarPtr[1] = pData[1];
|
||||
pVarPtr[2] = pData[2];
|
||||
@ -1709,6 +1693,7 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
/* set flag */
|
||||
bWritten = 1;
|
||||
|
||||
/*ET9300 Project Handler :(#if STORE_BACKUP_PARAMETER_IMMEDIATELY && BACKUP_PARAMETER_SUPPORTED) lines 2091 to 2098 deleted*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1743,6 +1728,13 @@ UINT8 OBJ_Write( UINT16 index, UINT8 subindex, UINT32 dataSize, OBJCONST TOBJECT
|
||||
}
|
||||
}
|
||||
|
||||
/* ECATCHANGE_START(V5.13) COE4*/
|
||||
if (pAPPL_CoeWriteInd != NULL)
|
||||
{
|
||||
pAPPL_CoeWriteInd(index, subindex, bCompleteAccess);
|
||||
}
|
||||
/* ECATCHANGE_END(V5.13) COE4*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
9
objdef.h
9
objdef.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -134,9 +135,9 @@ V5.01 : Start file change log
|
||||
#define SYNCTYPE_TIMESVARIABLE 0x4000 /**< \brief Dynamic Cycle Times supported*/
|
||||
|
||||
|
||||
#define IS_PDO_ASSIGN(x) ((x >= 0x1C10) && (x <= 0x1C2F)) /**< \brief Marco to check if object index is SyncManager assign object*/
|
||||
#define IS_RX_PDO(x) (((x) >= 0x1600) && ((x) <= 0x17FF)) /**< \brief Marco to check if object index RxPDO mapping object*/
|
||||
#define IS_TX_PDO(x) (((x) >= 0x1A00) && ((x) <= 0x1BFF)) /**< \brief Marco to check if object index TxPDO mapping object*/
|
||||
#define IS_PDO_ASSIGN(x) ((x >= 0x1C10) && (x <= 0x1C2F)) /**< \brief Macro to check if object index is SyncManager assign object*/
|
||||
#define IS_RX_PDO(x) (((x) >= 0x1600) && ((x) <= 0x17FF)) /**< \brief Macro to check if object index RxPDO mapping object*/
|
||||
#define IS_TX_PDO(x) (((x) >= 0x1A00) && ((x) <= 0x1BFF)) /**< \brief Macro to check if object index TxPDO mapping object*/
|
||||
|
||||
|
||||
/**
|
||||
@ -177,7 +178,7 @@ typedef struct OBJ_STRUCT_PACKED_START
|
||||
UINT32 u32Sync0CycleTime; /**< \brief SunbIndex 010: Sync0 cycle time*/
|
||||
UINT16 u16SmEventMissedCounter; /**< \brief SunbIndex 011: SyncManager event missed counter*/
|
||||
UINT16 u16CycleExceededCounter; /**< \brief SunbIndex 012: Cycle exceed counter*/
|
||||
UINT16 u16Si13Reserved; /**< \brief SunbIndex 013: Shift too short (not supported, only padding)*/
|
||||
UINT16 u16ShiftTooShort; /**< \brief SunbIndex 013: Shift too short*/
|
||||
UINT16 u16Si14Reserved; /**< \brief SubIndex14 not supported*/
|
||||
UINT32 u32Si15Reserved; /**< \brief SubIndex15 not supported*/
|
||||
UINT32 u32Si16Reserved; /**< \brief SubIndex16 not supported*/
|
||||
|
||||
45
sdoserv.h
45
sdoserv.h
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* This source file is part of the EtherCAT Slave Stack Code licensed by Beckhoff Automation GmbH & Co KG, 33415 Verl, Germany.
|
||||
* The corresponding license agreement applies. This hint shall not be removed.
|
||||
* https://www.beckhoff.com/media/downloads/slave-stack-code/ethercat_ssc_license.pdf
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -98,7 +99,9 @@ V5.01 : Start file change log
|
||||
*/
|
||||
typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
/*ET9300 Project Handler :(#if MBX_16BIT_ACCESS) lines 101 to 128 deleted*/
|
||||
UINT8 Sdo[4]; /**< \brief 32Bit SDO header buffer*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_16BIT) lines 130 to 135 deleted*/
|
||||
#define SDOHEADER_COMMANDOFFSET 0 /**< \brief Memory offset for the command*/
|
||||
#define SDOHEADER_INDEXLOOFFSET 1 /**< \brief Memory offset for the low Byte of the object index*/
|
||||
#define SDOHEADER_INDEXHIOFFSET 2 /**< \brief Memory offset for the high Byte of the object index*/
|
||||
@ -144,6 +147,7 @@ TINITSDOMBX;
|
||||
*/
|
||||
typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
/*ET9300 Project Handler :(#if MBX_16BIT_ACCESS) lines 183 to 209 deleted*/
|
||||
UINT8 SegHeader; /**< \brief 8Bit header buffer*/
|
||||
#define SEGHEADER_MASK ((UINT8) 0xFF) /**< \brief SDO header mask*/
|
||||
#define SEGHEADER_NOMOREFOLLOWS ((UINT8) 0x01) /**< \brief More segments follow flag*/
|
||||
@ -498,6 +502,7 @@ typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 Index; /**< \brief Index of the parent object*/
|
||||
UINT16 Info; /**< \brief Info data including the subindex and identifier for the payload data*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 565 to 570 deleted*/
|
||||
#define ENTRY_MASK_SUBINDEX 0x00FF /**< \brief Subindex mask*/
|
||||
#define ENTRY_SUBINDEX_SHIFT 0 /**< \brief Subindex shift*/
|
||||
#define ENTRY_MASK_VALUEINFO 0xFF00 /**< \brief Value info mask*/
|
||||
@ -527,6 +532,7 @@ TSDOINFOERROR;
|
||||
typedef struct MBX_STRUCT_PACKED_START
|
||||
{
|
||||
UINT16 InfoHead; /**< \brief Opcode, Incomplete flag and 8 reserved bits*/
|
||||
/*ET9300 Project Handler :(#if BIG_ENDIAN_FORMAT) lines 601 to 606 deleted*/
|
||||
#define INFOHEAD_OPCODE_MASK 0x007F /**< \brief Opcode mask*/
|
||||
#define INFOHEAD_OPCODE_SHIFT 0 /**< \brief Opcode shift*/
|
||||
#define INFOHEADER_INCOMPLETE_MASK 0x0080 /**< \brief Incomplete mask*/
|
||||
@ -575,17 +581,7 @@ TSDOINFORMATION;
|
||||
/** @}*/
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup SdoPendingHandler SDO Pending Response
|
||||
* @{
|
||||
* If this feature is enabled (SDO_RES_INTERFACE 1) a SDO request may set to pending and is completed afterwards.
|
||||
* This can be used to forward the read/write request an additional thread, uController.
|
||||
*/
|
||||
#define SDO_PENDING_WRITE 0x1 /**< \brief SDO write request is pending*/
|
||||
#define SDO_PENDING_SEG_WRITE 0x2 /**< \brief SDO segmented write request is pending*/
|
||||
#define SDO_PENDING_READ 0x3 /**< \brief SDO read request is pending*/
|
||||
#define SDO_PENDING_SEG_READ 0x4 /**< \brief SDO segmented read request is pending*/
|
||||
/** @}*/
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE) lines 656 to 668 deleted*/
|
||||
|
||||
|
||||
#endif //_SDOSRV_H_
|
||||
@ -601,30 +597,13 @@ TSDOINFORMATION;
|
||||
#define PROTO extern
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup SdoPendingHandler SDO Pending Response
|
||||
*@{
|
||||
*/
|
||||
PROTO UINT8 u8PendingSdo; /**< \brief Identifier for the pending SDO service (see SDO_PENDING_XXX defines)*/
|
||||
PROTO BOOL bStoreCompleteAccess; /**< \brief Indicates if the pending SDO service is an complete access*/
|
||||
PROTO UINT8 u8StoreSubindex; /**< \brief Contains the subindex for the pending SDO request*/
|
||||
PROTO UINT16 u16StoreIndex; /**< \brief Contains the Index for the pending SDO request*/
|
||||
PROTO UINT32 u32StoreDataSize; /**< \brief Complete data size to be handled*/
|
||||
PROTO UINT16 MBXMEM *pStoreData; /**< \brief Pointer to the buffer to be handled*/
|
||||
PROTO UINT8 (* pSdoPendFunc)( UINT16 Index, UINT8 Subindex, UINT32 Size, UINT16 MBXMEM * pData, UINT8 bCompleteAccess ); /**< \brief Function pointer for the SDO pending request handler*/
|
||||
/** @}*/
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE) lines 684 to 697 deleted*/
|
||||
|
||||
|
||||
PROTO MEM_ADDR VARMEM aSdoInfoHeader[GET_MEM_SIZE(SDO_INFO_HEADER_BYTE_SIZE)]; /**< \brief SDO Info buffer*/
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup SegmentedSdo Segmented SDO
|
||||
* @{
|
||||
*/
|
||||
PROTO UINT16 VARMEM * VARMEM pSdoSegData; /**< \brief Pointer to the buffer handling to full object/entry data*/
|
||||
PROTO UINT16 VARMEM nSdoInfoFragmentsLeft; /**< \brief Number of fragments which need to be transmitted*/
|
||||
/** @}*/
|
||||
/*ET9300 Project Handler :(#if SEGMENTED_SDO_SUPPORTED) lines 703 to 711 deleted*/
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
@ -635,10 +614,8 @@ PROTO UINT16 VARMEM nSdoInfoFragmentsLeft; /**< \brief N
|
||||
PROTO UINT8 SDOS_SdoInfoInd(TSDOINFORMATION MBXMEM *pSdoInfoInd);
|
||||
PROTO UINT8 SDOS_SdoInd(TINITSDOMBX MBXMEM *pSdoInd);
|
||||
|
||||
PROTO void SDOS_SdoRes(UINT8 abort, UINT32 objLength, UINT16 MBXMEM *pData);
|
||||
/* ECATCHANGE_START(V5.12) MBX3*/
|
||||
PROTO void SODS_ClearPendingResponse();
|
||||
/* ECATCHANGE_END(V5.12) MBX3*/
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE) lines 722 to 724 deleted*/
|
||||
/*ET9300 Project Handler :(#if SDO_RES_INTERFACE || SEGMENTED_SDO_SUPPORTED) lines 725 to 727 deleted*/
|
||||
|
||||
|
||||
#undef PROTO
|
||||
|
||||
208
tiescfoe.c
Normal file
208
tiescfoe.c
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Texas Instruments Incorporated
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Include Files */
|
||||
/* ========================================================================== */
|
||||
|
||||
#include <ecat_def.h>
|
||||
#include <applInterface.h>
|
||||
|
||||
#include <string.h> /* for memset */
|
||||
#include <tiescfoe.h>
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Macros & Typedefs */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Global Variables */
|
||||
/* ========================================================================== */
|
||||
|
||||
#if FOE_SUPPORTED
|
||||
|
||||
extern unsigned char bBootMode; /**< \brief Indicates in slave is in BOOT mode*/
|
||||
|
||||
static uint8_t foe_download_flag;
|
||||
static uint8_t file_write_offset;
|
||||
|
||||
/*Section of RAM chosen to store FoE Data*/
|
||||
#define S0RAM_BASE 0x20000000U;
|
||||
|
||||
uint8_t *ptr = S0RAM_BASE;
|
||||
|
||||
#endif /* FOE_SUPPORTED */
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Function Declarations */
|
||||
/* ========================================================================== */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ application specific functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#if FOE_SUPPORTED
|
||||
/**
|
||||
* \brief This function should be called when a firmware download command is received
|
||||
* from EtherCAT master
|
||||
*
|
||||
* \param password password received from master
|
||||
*/
|
||||
void tiesc_start_foe_download(uint32_t password);
|
||||
|
||||
/**
|
||||
* \brief Stores the received data as part of firmware download from EtherCAT master.
|
||||
* This may get called multiple times during firmware download. This function
|
||||
* performs OSPI flash writes for every 256-bytes received from master.
|
||||
*
|
||||
* \param pData Pointer to data buffer
|
||||
* \param Size Number of bytes received
|
||||
*/
|
||||
|
||||
void tiesc_store_foe_data(uint16_t *pData, uint16_t Size);
|
||||
|
||||
uint16_t tiesc_foe_read(uint16_t *pName, uint16_t nameSize, uint32_t password,
|
||||
uint16_t maxBlockSize, uint16_t *pData);
|
||||
|
||||
uint16_t tiesc_foe_read_data(uint32_t offset, uint16_t maxBlockSize,
|
||||
uint16_t *pData);
|
||||
|
||||
uint16_t tiesc_foe_read_data(uint32_t offset, uint16_t maxBlockSize,
|
||||
uint16_t *pData);
|
||||
|
||||
uint16_t tiesc_foe_write_data(uint16_t *pData, uint16_t Size,
|
||||
unsigned char bDataFollowing);
|
||||
|
||||
uint16_t tiesc_foe_write(uint16_t *pName, uint16_t nameSize, uint32_t password);
|
||||
#endif /* FOE_SUPPORTED */
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Function Defintions */
|
||||
/* ========================================================================== */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------
|
||||
------
|
||||
------ generic functions
|
||||
------
|
||||
-----------------------------------------------------------------------------------------*/
|
||||
|
||||
#if FOE_SUPPORTED
|
||||
|
||||
void tiesc_start_foe_download(uint32_t password)
|
||||
{
|
||||
foe_download_flag = 1;
|
||||
}
|
||||
|
||||
/* Function to store Data received from FoE operation*/
|
||||
void tiesc_store_foe_data(uint16_t *pData, uint16_t Size)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<Size/2;i++)
|
||||
{
|
||||
/*Writing data to prescribed memory location*/
|
||||
uint8_t a = pData[i] >> 8;
|
||||
uint8_t b = pData[i];
|
||||
memset(ptr + file_write_offset, b, 1);
|
||||
file_write_offset++;
|
||||
memset(ptr + file_write_offset, a, 1);
|
||||
file_write_offset++;
|
||||
}
|
||||
}
|
||||
|
||||
void tiesc_boot_2_init_handler()
|
||||
{
|
||||
if(foe_download_flag)
|
||||
{
|
||||
/* Reset the flag */
|
||||
foe_download_flag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*Dummy function defined, functionality not supported here*/
|
||||
uint16_t tiesc_foe_read(uint16_t *pName, uint16_t nameSize, uint32_t password,
|
||||
uint16_t maxBlockSize, uint16_t *pData)
|
||||
{
|
||||
return TIESC_ECAT_FOE_ERRCODE_NOTFOUND;
|
||||
}
|
||||
|
||||
/*Dummy function defined, functionality not supported here*/
|
||||
uint16_t tiesc_foe_read_data(uint32_t offset, uint16_t maxBlockSize,
|
||||
uint16_t *pData)
|
||||
{
|
||||
return maxBlockSize;
|
||||
}
|
||||
|
||||
/* Function called Subsequently for every FoE Write Block*/
|
||||
uint16_t tiesc_foe_write_data(uint16_t *pData, uint16_t Size,
|
||||
unsigned char bDataFollowing)
|
||||
{
|
||||
if(bBootMode)
|
||||
{
|
||||
tiesc_store_foe_data(pData, Size);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TIESC_ECAT_FOE_ERRCODE_BOOTSTRAPONLY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Function called to initiate FoE Write Operation*/
|
||||
uint16_t tiesc_foe_write(uint16_t *pName, uint16_t nameSize, uint32_t password)
|
||||
{
|
||||
if(bBootMode)
|
||||
{
|
||||
tiesc_start_foe_download(password);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TIESC_ECAT_FOE_ERRCODE_BOOTSTRAPONLY;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* FOE_SUPPORTED */
|
||||
|
||||
/* Initialises FoE Related functions to be called by the stack*/
|
||||
void tiesc_foe_init(void)
|
||||
{
|
||||
#if FOE_SUPPORTED
|
||||
pAPPL_FoeRead = tiesc_foe_read;
|
||||
pAPPL_FoeReadData = tiesc_foe_read_data;
|
||||
pAPPL_FoeWriteData = tiesc_foe_write_data;
|
||||
pAPPL_FoeWrite = tiesc_foe_write;
|
||||
foe_download_flag = 0;
|
||||
#endif
|
||||
}
|
||||
63
tiescfoe.h
Normal file
63
tiescfoe.h
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Texas Instruments Incorporated
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _TIESC_FOE_H_
|
||||
#define _TIESC_FOE_H_
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Macros & Typedefs */
|
||||
/* ========================================================================== */
|
||||
|
||||
#if FOE_SUPPORTED
|
||||
|
||||
#define TIESC_ECAT_FOE_ERRCODE_NOTFOUND 0x8001 /**< The file requested by an FoE upload service could not be found on the server*/
|
||||
#define TIESC_ECAT_FOE_ERRCODE_BOOTSTRAPONLY 0x8008 /**< FoE only supported in Bootstrap*/
|
||||
#define TIESC_ECAT_FOE_ERRCODE_NOTINBOOTSTRAP 0x8009 /**< This file may not be accessed in BOOTSTRAP state*/
|
||||
|
||||
#endif /* FOE_SUPPORTED */
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Structure Declarations */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Function Declarations */
|
||||
/* ========================================================================== */
|
||||
|
||||
/**
|
||||
* \brief This function is called when the state is switched from BOOT to Init
|
||||
*/
|
||||
void tiesc_boot_2_init_handler();
|
||||
|
||||
void tiesc_foe_init(void);
|
||||
|
||||
#endif /* _TIESC_FOE_H_*/
|
||||
Loading…
Reference in New Issue
Block a user