diff --git a/FreeRTOS/source/include/NetworkInterface.h b/FreeRTOS/source/include/NetworkInterface.h index f7544b1..5a45636 100644 --- a/FreeRTOS/source/include/NetworkInterface.h +++ b/FreeRTOS/source/include/NetworkInterface.h @@ -28,309 +28,314 @@ #ifndef NETWORK_INTERFACE_H #define NETWORK_INTERFACE_H -#include "FreeRTOS.h" -#include "FreeRTOSIPConfig.h" -#include "stdio.h" -#include "stdint.h" +//#include "FreeRTOS.h" +//#include "FreeRTOSIPConfig.h" +//#include "stdio.h" +//#include "stdint.h" +#include "FreeRTOS_IP.h" +#include "Driver_ETH_MAC.h" /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif -/* *INDENT-ON* */ -/** - * @brief HAL State structures definition - */ - typedef enum - { - HAL_ETH_STATE_RESET = 0x00U, /*!< Peripheral not yet Initialized or disabled */ - HAL_ETH_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */ - HAL_ETH_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */ - HAL_ETH_STATE_BUSY_TX = 0x12U, /*!< Data Transmission process is ongoing */ - HAL_ETH_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */ - HAL_ETH_STATE_BUSY_TX_RX = 0x32U, /*!< Data Transmission and Reception process is ongoing */ - HAL_ETH_STATE_BUSY_WR = 0x42U, /*!< Write process is ongoing */ - HAL_ETH_STATE_BUSY_RD = 0x82U, /*!< Read process is ongoing */ - HAL_ETH_STATE_TIMEOUT = 0x03U, /*!< Timeout state */ - HAL_ETH_STATE_ERROR = 0x04U /*!< Reception process is ongoing */ - } HAL_ETH_StateTypeDef; - -/** - * @brief ETH Init Structure definition - */ - -typedef struct -{ - uint32_t AutoNegotiation; /*!< Selects or not the AutoNegotiation mode for the external PHY - * The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps) - * and the mode (half/full-duplex). - * This parameter can be a value of @ref ETH_AutoNegotiation */ - - uint32_t Speed; /*!< Sets the Ethernet speed: 10/100 Mbps. - * This parameter can be a value of @ref ETH_Speed */ - - uint32_t DuplexMode; /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode - * This parameter can be a value of @ref ETH_Duplex_Mode */ - - uint16_t PhyAddress; /*!< Ethernet PHY address. - * This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint8_t * MACAddr; /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */ - - uint32_t RxMode; /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode. - * This parameter can be a value of @ref ETH_Rx_Mode */ - - uint32_t ChecksumMode; /*!< Selects if the checksum is check by hardware or by software. - * This parameter can be a value of @ref ETH_Checksum_Mode */ - - uint32_t MediaInterface; /*!< Selects the media-independent interface or the reduced media-independent interface. - * This parameter can be a value of @ref ETH_Media_Interface */ -} ETH_InitTypeDef; - - -/** - * @brief ETH MAC Configuration Structure definition - */ - -typedef struct -{ - uint32_t Watchdog; /*!< Selects or not the Watchdog timer - * When enabled, the MAC allows no more then 2048 bytes to be received. - * When disabled, the MAC can receive up to 16384 bytes. - * This parameter can be a value of @ref ETH_Watchdog */ - - uint32_t Jabber; /*!< Selects or not Jabber timer - * When enabled, the MAC allows no more then 2048 bytes to be sent. - * When disabled, the MAC can send up to 16384 bytes. - * This parameter can be a value of @ref ETH_Jabber */ - - uint32_t InterFrameGap; /*!< Selects the minimum IFG between frames during transmission. - * This parameter can be a value of @ref ETH_Inter_Frame_Gap */ - - uint32_t CarrierSense; /*!< Selects or not the Carrier Sense. - * This parameter can be a value of @ref ETH_Carrier_Sense */ - - uint32_t ReceiveOwn; /*!< Selects or not the ReceiveOwn, - * ReceiveOwn allows the reception of frames when the TX_EN signal is asserted - * in Half-Duplex mode. - * This parameter can be a value of @ref ETH_Receive_Own */ - - uint32_t LoopbackMode; /*!< Selects or not the internal MAC MII Loopback mode. - * This parameter can be a value of @ref ETH_Loop_Back_Mode */ - - uint32_t ChecksumOffload; /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers. - * This parameter can be a value of @ref ETH_Checksum_Offload */ - - uint32_t RetryTransmission; /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL, - * when a collision occurs (Half-Duplex mode). - * This parameter can be a value of @ref ETH_Retry_Transmission */ - - uint32_t AutomaticPadCRCStrip; /*!< Selects or not the Automatic MAC Pad/CRC Stripping. - * This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */ - - uint32_t BackOffLimit; /*!< Selects the BackOff limit value. - * This parameter can be a value of @ref ETH_Back_Off_Limit */ - - uint32_t DeferralCheck; /*!< Selects or not the deferral check function (Half-Duplex mode). - * This parameter can be a value of @ref ETH_Deferral_Check */ - - uint32_t ReceiveAll; /*!< Selects or not all frames reception by the MAC (No filtering). - * This parameter can be a value of @ref ETH_Receive_All */ - - uint32_t SourceAddrFilter; /*!< Selects the Source Address Filter mode. - * This parameter can be a value of @ref ETH_Source_Addr_Filter */ - - uint32_t PassControlFrames; /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames) - * This parameter can be a value of @ref ETH_Pass_Control_Frames */ - - uint32_t BroadcastFramesReception; /*!< Selects or not the reception of Broadcast Frames. - * This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */ - - uint32_t DestinationAddrFilter; /*!< Sets the destination filter mode for both unicast and multicast frames. - * This parameter can be a value of @ref ETH_Destination_Addr_Filter */ - - uint32_t PromiscuousMode; /*!< Selects or not the Promiscuous Mode - * This parameter can be a value of @ref ETH_Promiscuous_Mode */ - - uint32_t MulticastFramesFilter; /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter. - * This parameter can be a value of @ref ETH_Multicast_Frames_Filter */ - - uint32_t UnicastFramesFilter; /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter. - * This parameter can be a value of @ref ETH_Unicast_Frames_Filter */ - - uint32_t HashTableHigh; /*!< This field holds the higher 32 bits of Hash table. - * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t HashTableLow; /*!< This field holds the lower 32 bits of Hash table. - * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ - - uint32_t PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control frame. - * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFF */ - - uint32_t ZeroQuantaPause; /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames. - * This parameter can be a value of @ref ETH_Zero_Quanta_Pause */ - - uint32_t PauseLowThreshold; /*!< This field configures the threshold of the PAUSE to be checked for - * automatic retransmission of PAUSE Frame. - * This parameter can be a value of @ref ETH_Pause_Low_Threshold */ - - uint32_t UnicastPauseFrameDetect; /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0 - * unicast address and unique multicast address). - * This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */ - - uint32_t ReceiveFlowControl; /*!< Enables or disables the MAC to decode the received Pause frame and - * disable its transmitter for a specified time (Pause Time) - * This parameter can be a value of @ref ETH_Receive_Flow_Control */ - - uint32_t TransmitFlowControl; /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode) - * or the MAC back-pressure operation (Half-Duplex mode) - * This parameter can be a value of @ref ETH_Transmit_Flow_Control */ - - uint32_t VLANTagComparison; /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for - * comparison and filtering. - * This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */ - - uint32_t VLANTagIdentifier; /*!< Holds the VLAN tag identifier for receive frames */ -} ETH_MACInitTypeDef; - - -/** - * @brief ETH DMA Configuration Structure definition - */ - -typedef struct -{ - uint32_t DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames. - * This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */ - - uint32_t ReceiveStoreForward; /*!< Enables or disables the Receive store and forward mode. - * This parameter can be a value of @ref ETH_Receive_Store_Forward */ - - uint32_t FlushReceivedFrame; /*!< Enables or disables the flushing of received frames. - * This parameter can be a value of @ref ETH_Flush_Received_Frame */ - - uint32_t TransmitStoreForward; /*!< Enables or disables Transmit store and forward mode. - * This parameter can be a value of @ref ETH_Transmit_Store_Forward */ - - uint32_t TransmitThresholdControl; /*!< Selects or not the Transmit Threshold Control. - * This parameter can be a value of @ref ETH_Transmit_Threshold_Control */ - - uint32_t ForwardErrorFrames; /*!< Selects or not the forward to the DMA of erroneous frames. - * This parameter can be a value of @ref ETH_Forward_Error_Frames */ - - uint32_t ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error - * and length less than 64 bytes) including pad-bytes and CRC) - * This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */ - - uint32_t ReceiveThresholdControl; /*!< Selects the threshold level of the Receive FIFO. - * This parameter can be a value of @ref ETH_Receive_Threshold_Control */ - - uint32_t SecondFrameOperate; /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second - * frame of Transmit data even before obtaining the status for the first frame. - * This parameter can be a value of @ref ETH_Second_Frame_Operate */ - - uint32_t AddressAlignedBeats; /*!< Enables or disables the Address Aligned Beats. - * This parameter can be a value of @ref ETH_Address_Aligned_Beats */ - - uint32_t FixedBurst; /*!< Enables or disables the AHB Master interface fixed burst transfers. - * This parameter can be a value of @ref ETH_Fixed_Burst */ - - uint32_t RxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction. - * This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */ - - uint32_t TxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction. - * This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */ - - uint32_t EnhancedDescriptorFormat; /*!< Enables the enhanced descriptor format. - * This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */ - - uint32_t DescriptorSkipLength; /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode) - * This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ - - uint32_t DMAArbitration; /*!< Selects the DMA Tx/Rx arbitration. - * This parameter can be a value of @ref ETH_DMA_Arbitration */ -} ETH_DMAInitTypeDef; - - -/** - * @brief ETH DMA Descriptors data structure definition - */ - -typedef struct -{ - volatile uint32_t Status; /*!< Status */ - - uint32_t ControlBufferSize; /*!< Control and Buffer1, Buffer2 lengths */ - - uint32_t Buffer1Addr; /*!< Buffer1 address pointer */ - - uint32_t Buffer2NextDescAddr; /*!< Buffer2 or next descriptor address pointer */ - - /*!< Enhanced Ethernet DMA PTP Descriptors */ - uint32_t ExtendedStatus; /*!< Extended status for PTP receive descriptor */ - - uint32_t Reserved1; /*!< Reserved */ - - uint32_t TimeStampLow; /*!< Time Stamp Low value for transmit and receive */ - - uint32_t TimeStampHigh; /*!< Time Stamp High value for transmit and receive */ -} ETH_DMADescTypeDef; - - -/** - * @brief Received Frame Informations structure definition - */ -typedef struct -{ - ETH_DMADescTypeDef * FSRxDesc; /*!< First Segment Rx Desc */ - - ETH_DMADescTypeDef * LSRxDesc; /*!< Last Segment Rx Desc */ - - uint32_t SegCount; /*!< Segment count */ - - uint32_t length; /*!< Frame length */ - - uint32_t buffer; /*!< Frame buffer */ -} ETH_DMARxFrameInfos; - -#define ETH_TypeDef void -/** - * @brief ETH Handle Structure definition - */ - -typedef struct -{ - ETH_TypeDef * Instance; /*!< Register base address */ - - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - - uint32_t LinkStatus; /*!< Ethernet link status */ - - ETH_DMADescTypeDef * RxDesc; /*!< Rx descriptor to Get */ - - ETH_DMADescTypeDef * TxDesc; /*!< Tx descriptor to Set */ - - ETH_DMARxFrameInfos RxFrameInfos; /*!< last Rx frame infos */ - - volatile HAL_ETH_StateTypeDef State; /*!< ETH communication state */ - - HAL_LockTypeDef Lock; /*!< ETH Lock */ -} ETH_HandleTypeDef; -/* INTERNAL API FUNCTIONS. */ BaseType_t xNetworkInterfaceInitialise( void ); -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, - BaseType_t xReleaseAfterSend ); - -/* The following function is defined only when BufferAllocation_1.c is linked in the project. */ -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ); - -/* The following function is defined only when BufferAllocation_1.c is linked in the project. */ -BaseType_t xGetPhyLinkStatus( void ); - -/* *INDENT-OFF* */ -#ifdef __cplusplus - } /* extern "C" */ -#endif +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor,BaseType_t xReleaseAfterSend ); /* *INDENT-ON* */ +///** +// * @brief HAL State structures definition +// */ +// typedef enum +// { +// HAL_ETH_STATE_RESET = 0x00U, /*!< Peripheral not yet Initialized or disabled */ +// HAL_ETH_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */ +// HAL_ETH_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */ +// HAL_ETH_STATE_BUSY_TX = 0x12U, /*!< Data Transmission process is ongoing */ +// HAL_ETH_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */ +// HAL_ETH_STATE_BUSY_TX_RX = 0x32U, /*!< Data Transmission and Reception process is ongoing */ +// HAL_ETH_STATE_BUSY_WR = 0x42U, /*!< Write process is ongoing */ +// HAL_ETH_STATE_BUSY_RD = 0x82U, /*!< Read process is ongoing */ +// HAL_ETH_STATE_TIMEOUT = 0x03U, /*!< Timeout state */ +// HAL_ETH_STATE_ERROR = 0x04U /*!< Reception process is ongoing */ +// } HAL_ETH_StateTypeDef; +// +///** +// * @brief ETH Init Structure definition +// */ + +//typedef struct +//{ +// uint32_t AutoNegotiation; /*!< Selects or not the AutoNegotiation mode for the external PHY +// * The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps) +// * and the mode (half/full-duplex). +// * This parameter can be a value of @ref ETH_AutoNegotiation */ + +// uint32_t Speed; /*!< Sets the Ethernet speed: 10/100 Mbps. +// * This parameter can be a value of @ref ETH_Speed */ + +// uint32_t DuplexMode; /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode +// * This parameter can be a value of @ref ETH_Duplex_Mode */ + +// uint16_t PhyAddress; /*!< Ethernet PHY address. +// * This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ + +// uint8_t * MACAddr; /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */ + +// uint32_t RxMode; /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode. +// * This parameter can be a value of @ref ETH_Rx_Mode */ + +// uint32_t ChecksumMode; /*!< Selects if the checksum is check by hardware or by software. +// * This parameter can be a value of @ref ETH_Checksum_Mode */ + +// uint32_t MediaInterface; /*!< Selects the media-independent interface or the reduced media-independent interface. +// * This parameter can be a value of @ref ETH_Media_Interface */ +//} ETH_InitTypeDef; + + +///** +// * @brief ETH MAC Configuration Structure definition +// */ + +//typedef struct +//{ +// uint32_t Watchdog; /*!< Selects or not the Watchdog timer +// * When enabled, the MAC allows no more then 2048 bytes to be received. +// * When disabled, the MAC can receive up to 16384 bytes. +// * This parameter can be a value of @ref ETH_Watchdog */ + +// uint32_t Jabber; /*!< Selects or not Jabber timer +// * When enabled, the MAC allows no more then 2048 bytes to be sent. +// * When disabled, the MAC can send up to 16384 bytes. +// * This parameter can be a value of @ref ETH_Jabber */ + +// uint32_t InterFrameGap; /*!< Selects the minimum IFG between frames during transmission. +// * This parameter can be a value of @ref ETH_Inter_Frame_Gap */ + +// uint32_t CarrierSense; /*!< Selects or not the Carrier Sense. +// * This parameter can be a value of @ref ETH_Carrier_Sense */ + +// uint32_t ReceiveOwn; /*!< Selects or not the ReceiveOwn, +// * ReceiveOwn allows the reception of frames when the TX_EN signal is asserted +// * in Half-Duplex mode. +// * This parameter can be a value of @ref ETH_Receive_Own */ + +// uint32_t LoopbackMode; /*!< Selects or not the internal MAC MII Loopback mode. +// * This parameter can be a value of @ref ETH_Loop_Back_Mode */ + +// uint32_t ChecksumOffload; /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers. +// * This parameter can be a value of @ref ETH_Checksum_Offload */ + +// uint32_t RetryTransmission; /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL, +// * when a collision occurs (Half-Duplex mode). +// * This parameter can be a value of @ref ETH_Retry_Transmission */ + +// uint32_t AutomaticPadCRCStrip; /*!< Selects or not the Automatic MAC Pad/CRC Stripping. +// * This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */ + +// uint32_t BackOffLimit; /*!< Selects the BackOff limit value. +// * This parameter can be a value of @ref ETH_Back_Off_Limit */ + +// uint32_t DeferralCheck; /*!< Selects or not the deferral check function (Half-Duplex mode). +// * This parameter can be a value of @ref ETH_Deferral_Check */ + +// uint32_t ReceiveAll; /*!< Selects or not all frames reception by the MAC (No filtering). +// * This parameter can be a value of @ref ETH_Receive_All */ + +// uint32_t SourceAddrFilter; /*!< Selects the Source Address Filter mode. +// * This parameter can be a value of @ref ETH_Source_Addr_Filter */ + +// uint32_t PassControlFrames; /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames) +// * This parameter can be a value of @ref ETH_Pass_Control_Frames */ + +// uint32_t BroadcastFramesReception; /*!< Selects or not the reception of Broadcast Frames. +// * This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */ + +// uint32_t DestinationAddrFilter; /*!< Sets the destination filter mode for both unicast and multicast frames. +// * This parameter can be a value of @ref ETH_Destination_Addr_Filter */ + +// uint32_t PromiscuousMode; /*!< Selects or not the Promiscuous Mode +// * This parameter can be a value of @ref ETH_Promiscuous_Mode */ + +// uint32_t MulticastFramesFilter; /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter. +// * This parameter can be a value of @ref ETH_Multicast_Frames_Filter */ + +// uint32_t UnicastFramesFilter; /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter. +// * This parameter can be a value of @ref ETH_Unicast_Frames_Filter */ + +// uint32_t HashTableHigh; /*!< This field holds the higher 32 bits of Hash table. +// * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ + +// uint32_t HashTableLow; /*!< This field holds the lower 32 bits of Hash table. +// * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */ + +// uint32_t PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control frame. +// * This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFF */ + +// uint32_t ZeroQuantaPause; /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames. +// * This parameter can be a value of @ref ETH_Zero_Quanta_Pause */ + +// uint32_t PauseLowThreshold; /*!< This field configures the threshold of the PAUSE to be checked for +// * automatic retransmission of PAUSE Frame. +// * This parameter can be a value of @ref ETH_Pause_Low_Threshold */ + +// uint32_t UnicastPauseFrameDetect; /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0 +// * unicast address and unique multicast address). +// * This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */ + +// uint32_t ReceiveFlowControl; /*!< Enables or disables the MAC to decode the received Pause frame and +// * disable its transmitter for a specified time (Pause Time) +// * This parameter can be a value of @ref ETH_Receive_Flow_Control */ + +// uint32_t TransmitFlowControl; /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode) +// * or the MAC back-pressure operation (Half-Duplex mode) +// * This parameter can be a value of @ref ETH_Transmit_Flow_Control */ + +// uint32_t VLANTagComparison; /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for +// * comparison and filtering. +// * This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */ + +// uint32_t VLANTagIdentifier; /*!< Holds the VLAN tag identifier for receive frames */ +//} ETH_MACInitTypeDef; + + +///** +// * @brief ETH DMA Configuration Structure definition +// */ + +//typedef struct +//{ +// uint32_t DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames. +// * This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */ + +// uint32_t ReceiveStoreForward; /*!< Enables or disables the Receive store and forward mode. +// * This parameter can be a value of @ref ETH_Receive_Store_Forward */ + +// uint32_t FlushReceivedFrame; /*!< Enables or disables the flushing of received frames. +// * This parameter can be a value of @ref ETH_Flush_Received_Frame */ + +// uint32_t TransmitStoreForward; /*!< Enables or disables Transmit store and forward mode. +// * This parameter can be a value of @ref ETH_Transmit_Store_Forward */ + +// uint32_t TransmitThresholdControl; /*!< Selects or not the Transmit Threshold Control. +// * This parameter can be a value of @ref ETH_Transmit_Threshold_Control */ + +// uint32_t ForwardErrorFrames; /*!< Selects or not the forward to the DMA of erroneous frames. +// * This parameter can be a value of @ref ETH_Forward_Error_Frames */ + +// uint32_t ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error +// * and length less than 64 bytes) including pad-bytes and CRC) +// * This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */ + +// uint32_t ReceiveThresholdControl; /*!< Selects the threshold level of the Receive FIFO. +// * This parameter can be a value of @ref ETH_Receive_Threshold_Control */ + +// uint32_t SecondFrameOperate; /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second +// * frame of Transmit data even before obtaining the status for the first frame. +// * This parameter can be a value of @ref ETH_Second_Frame_Operate */ + +// uint32_t AddressAlignedBeats; /*!< Enables or disables the Address Aligned Beats. +// * This parameter can be a value of @ref ETH_Address_Aligned_Beats */ + +// uint32_t FixedBurst; /*!< Enables or disables the AHB Master interface fixed burst transfers. +// * This parameter can be a value of @ref ETH_Fixed_Burst */ + +// uint32_t RxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction. +// * This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */ + +// uint32_t TxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction. +// * This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */ + +// uint32_t EnhancedDescriptorFormat; /*!< Enables the enhanced descriptor format. +// * This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */ + +// uint32_t DescriptorSkipLength; /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode) +// * This parameter must be a number between Min_Data = 0 and Max_Data = 32 */ + +// uint32_t DMAArbitration; /*!< Selects the DMA Tx/Rx arbitration. +// * This parameter can be a value of @ref ETH_DMA_Arbitration */ +//} ETH_DMAInitTypeDef; + + +///** +// * @brief ETH DMA Descriptors data structure definition +// */ + +//typedef struct +//{ +// volatile uint32_t Status; /*!< Status */ + +// uint32_t ControlBufferSize; /*!< Control and Buffer1, Buffer2 lengths */ + +// uint32_t Buffer1Addr; /*!< Buffer1 address pointer */ + +// uint32_t Buffer2NextDescAddr; /*!< Buffer2 or next descriptor address pointer */ + +// /*!< Enhanced Ethernet DMA PTP Descriptors */ +// uint32_t ExtendedStatus; /*!< Extended status for PTP receive descriptor */ + +// uint32_t Reserved1; /*!< Reserved */ + +// uint32_t TimeStampLow; /*!< Time Stamp Low value for transmit and receive */ + +// uint32_t TimeStampHigh; /*!< Time Stamp High value for transmit and receive */ +//} ETH_DMADescTypeDef; + + +///** +// * @brief Received Frame Informations structure definition +// */ +//typedef struct +//{ +// ETH_DMADescTypeDef * FSRxDesc; /*!< First Segment Rx Desc */ + +// ETH_DMADescTypeDef * LSRxDesc; /*!< Last Segment Rx Desc */ + +// uint32_t SegCount; /*!< Segment count */ + +// uint32_t length; /*!< Frame length */ + +// uint32_t buffer; /*!< Frame buffer */ +//} ETH_DMARxFrameInfos; + +//#define ETH_TypeDef void +///** +// * @brief ETH Handle Structure definition +// */ + +//typedef struct +//{ +// ETH_TypeDef * Instance; /*!< Register base address */ + +// ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + +// uint32_t LinkStatus; /*!< Ethernet link status */ + +// ETH_DMADescTypeDef * RxDesc; /*!< Rx descriptor to Get */ + +// ETH_DMADescTypeDef * TxDesc; /*!< Tx descriptor to Set */ + +// ETH_DMARxFrameInfos RxFrameInfos; /*!< last Rx frame infos */ + +// volatile HAL_ETH_StateTypeDef State; /*!< ETH communication state */ + +// HAL_LockTypeDef Lock; /*!< ETH Lock */ +//} ETH_HandleTypeDef; +///* INTERNAL API FUNCTIONS. */ +//BaseType_t xNetworkInterfaceInitialise( void ); +//BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, +// BaseType_t xReleaseAfterSend ); + +///* The following function is defined only when BufferAllocation_1.c is linked in the project. */ +//void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ); + +///* The following function is defined only when BufferAllocation_1.c is linked in the project. */ +//BaseType_t xGetPhyLinkStatus( void ); + +///* *INDENT-OFF* */ +//#ifdef __cplusplus +// } /* extern "C" */ +//#endif +///* *INDENT-ON* */ + #endif /* NETWORK_INTERFACE_H */ diff --git a/FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c b/FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c index 4cd5c00..c0f7367 100644 --- a/FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c +++ b/FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c @@ -1,44 +1,1430 @@ +///* +// * FreeRTOS+TCP V3.1.0 +// * Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// * +// * SPDX-License-Identifier: MIT +// * +// * Permission is hereby granted, free of charge, to any person obtaining a copy of +// * this software and associated documentation files (the "Software"), to deal in +// * the Software without restriction, including without limitation the rights to +// * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// * the Software, and to permit persons to whom the Software is furnished to do so, +// * subject to the following conditions: +// * +// * The above copyright notice and this permission notice shall be included in all +// * copies or substantial portions of the Software. +// * +// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// * +// * http://aws.amazon.com/freertos +// * http://www.FreeRTOS.org +// */ + +///***************************************************************************** +//* Note: This file is Not! to be used as is. The purpose of this file is to provide +//* a template for writing a network interface. Each network interface will have to provide +//* concrete implementations of the functions in this file. +//* +//* See the following URL for an explanation of this file and its functions: +//* https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Porting.html +//* +//*****************************************************************************/ + +///* Standard includes. */ +//#include +//#include +//#include + +///* FreeRTOS includes. */ +//#include "FreeRTOS.h" +//#include "task.h" +//#include "queue.h" +//#include "semphr.h" + +///* FreeRTOS+TCP includes. */ +//#include "FreeRTOS_IP.h" +//#include "FreeRTOS_Sockets.h" +//#include "FreeRTOS_IP_Private.h" +//#include "FreeRTOS_DNS.h" +//#include "FreeRTOS_ARP.h" +//#include "NetworkBufferManagement.h" +//#include "NetworkInterface.h" +//#include "phyHandling.h" + +////#include "stm32fxx_hal_eth.h" + +///*#include "Driver_ETH.h" +//#include "Driver_ETH_MAC.h" +//#include "Driver_ETH_PHY.h"*/ +///* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet +// * driver will filter incoming packets and only pass the stack those packets it +// * considers need processing. */ +//#if ( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) +// #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer +//#else +// #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) +//#endif + + +//BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, +// BaseType_t xReleaseAfterSend ) +//{ +// /* FIX ME. */ +// return pdFALSE; +//} + +//void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +//{ +// /* FIX ME. */ +//} + +//BaseType_t xGetPhyLinkStatus( void ) +//{ +// /* FIX ME. */ +// return pdFALSE; +//} + + + + +///* ST includes. */ +//#if defined( GD32F10X_CL ) +// #include "gd32f10x_enet.h" +//#elif defined( STM32F7xx ) +// #include "stm32f7xx_hal.h" +// #define CACHE_LINE_SIZE 32u +//#elif defined( STM32F4xx ) +// #include "stm32f4xx_hal.h" +//#elif defined( STM32F2xx ) +// #include "stm32f2xx_hal.h" +//#elif defined( STM32F1xx ) +// #include "stm32f1xx_hal.h" +//#elif !defined( _lint ) /* Lint does not like an #error */ +// #error What part? +//#endif /* if defined( GD32F10X_CL ) */ + + +///* Interrupt events to process. Currently only the Rx event is processed +// * although code for other events is included to allow for possible future +// * expansion. */ +//#define EMAC_IF_RX_EVENT 1UL +//#define EMAC_IF_TX_EVENT 2UL +//#define EMAC_IF_ERR_EVENT 4UL +//#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) + +///* Calculate the maximum packet size that the DMA can receive. */ +//#define EMAC_DMA_BUFFER_SIZE ( ( uint32_t ) ( ETH_MAX_PACKET_SIZE - ipBUFFER_PADDING ) ) + +//#define ETH_DMA_ALL_INTS \ +// ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | \ +// ETH_DMA_IT_AIS | ETH_DMA_IT_ER | ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | \ +// ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | ETH_DMA_IT_TU | \ +// ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) + +//#ifndef NETWORK_BUFFER_HEADER_SIZE +// #define NETWORK_BUFFER_HEADER_SIZE ( ipBUFFER_PADDING ) +//#endif + +//#ifndef niEMAC_HANDLER_TASK_PRIORITY +// #define niEMAC_HANDLER_TASK_PRIORITY configMAX_PRIORITIES - 1 +//#endif + +//#if ( ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) || ( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) ) +// #warning Consider enabling checksum offloading +//#endif + +//#ifndef niDESCRIPTOR_WAIT_TIME_MS +// #define niDESCRIPTOR_WAIT_TIME_MS 250uL +//#endif + +///* +// * Most users will want a PHY that negotiates about +// * the connection properties: speed, dmix and duplex. +// * On some rare cases, you want to select what is being +// * advertised, properties like MDIX and duplex. +// */ + +//#if !defined( ipconfigETHERNET_AN_ENABLE ) +// /* Enable auto-negotiation */ +// #define ipconfigETHERNET_AN_ENABLE 1 +//#endif + +//#if !defined( ipconfigETHERNET_AUTO_CROSS_ENABLE ) +// #define ipconfigETHERNET_AUTO_CROSS_ENABLE 1 +//#endif + +//#if ( ipconfigETHERNET_AN_ENABLE == 0 ) + +///* +// * The following three defines are only used in case there +// * is no auto-negotiation. +// */ +// #if !defined( ipconfigETHERNET_CROSSED_LINK ) +// #define ipconfigETHERNET_CROSSED_LINK 1 +// #endif + +// #if !defined( ipconfigETHERNET_USE_100MB ) +// #define ipconfigETHERNET_USE_100MB 1 +// #endif + +// #if !defined( ipconfigETHERNET_USE_FULL_DUPLEX ) +// #define ipconfigETHERNET_USE_FULL_DUPLEX 1 +// #endif +//#endif /* ipconfigETHERNET_AN_ENABLE == 0 */ + +///* Default the size of the stack used by the EMAC deferred handler task to twice +// * the size of the stack used by the idle task - but allow this to be overridden in +// * FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ +//#ifndef configEMAC_TASK_STACK_SIZE +// #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) +//#endif + +///* Two choices must be made: RMII versus MII, +// * and the index of the PHY in use ( between 0 and 31 ). */ +//#ifndef ipconfigUSE_RMII +// #ifdef GD32F10X_CL +// #define ipconfigUSE_RMII 1 +// #warning Using RMII, make sure if this is correct +// #else +// #define ipconfigUSE_RMII 0 +// #warning Using MII, make sure if this is correct +// #endif /* GD32F10X_CL */ +//#endif /* ipconfigUSE_RMII */ + +//typedef enum +//{ +// eMACInit, /* Must initialise MAC. */ +// eMACPass, /* Initialisation was successful. */ +// eMACFailed, /* Initialisation failed. */ +//} eMAC_INIT_STATUS_TYPE; + +//static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; + +///*-----------------------------------------------------------*/ + +///* +// * A deferred interrupt handler task that processes +// */ +//static void prvEMACHandlerTask( void * pvParameters ); + +///* +// * Force a negotiation with the Switch or Router and wait for LS. +// */ +//static void prvEthernetUpdateConfig( BaseType_t xForce ); + +///* +// * See if there is a new packet and forward it to the IP-task. +// */ +//static BaseType_t prvNetworkInterfaceInput( void ); + +//#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) + +///* +// * For LLMNR, an extra MAC-address must be configured to +// * be able to receive the multicast messages. +// */ +// static void prvMACAddressConfig( ETH_HandleTypeDef * heth, +// uint32_t ulIndex, +// uint8_t * Addr ); +//#endif + +///* +// * Check if a given packet should be accepted. +// */ +//static BaseType_t xMayAcceptPacket( uint8_t * pucEthernetBuffer ); + +///* +// * Initialise the TX descriptors. +// */ +//static void prvDMATxDescListInit( void ); + +///* +// * Initialise the RX descriptors. +// */ +//static void prvDMARxDescListInit( void ); + +///* After packets have been sent, the network +// * buffers will be released. */ +//static void vClearTXBuffers( void ); + +///*-----------------------------------------------------------*/ + +//#if ( ipconfigUSE_LLMNR == 1 ) +// static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; +//#endif + +//static EthernetPhy_t xPhyObject; + +///* Ethernet handle. */ +//static ETH_HandleTypeDef xETH; + +///* xTXDescriptorSemaphore is a counting semaphore with +// * a maximum count of ETH_TXBUFNB, which is the number of +// * DMA TX descriptors. */ +//static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; + +///* +// * Note: it is advised to define both +// * +// * #define ipconfigZERO_COPY_RX_DRIVER 1 +// * #define ipconfigZERO_COPY_TX_DRIVER 1 +// * +// * The method using memcpy is slower and probably uses more RAM memory. +// * The possibility is left in the code just for comparison. +// * +// * It is advised to define ETH_TXBUFNB at least 4. Note that no +// * TX buffers are allocated in a zero-copy driver. +// */ +///* MAC buffers: ---------------------------------------------------------*/ + +///* Put the DMA descriptors in '.first_data'. +// * This is important for STM32F7, which has an L1 data cache. +// * The first 64KB of the SRAM is not cached. +// * See README.TXT in this folder. */ + +///* Ethernet Rx MA Descriptor */ +//__attribute__( ( aligned( 32 ) ) ) +//#if defined( STM32F7xx ) +// __attribute__( ( section( ".first_data" ) ) ) +//#endif +//ETH_DMADescTypeDef DMARxDscrTab[ ETH_RXBUFNB ]; + +//#if ( ipconfigZERO_COPY_RX_DRIVER == 0 ) +// /* Ethernet Receive Buffer */ +// __ALIGN_BEGIN uint8_t Rx_Buff[ ETH_RXBUFNB ][ ETH_RX_BUF_SIZE ] __ALIGN_END; +//#endif + +///* Ethernet Tx DMA Descriptor */ +//__attribute__( ( aligned( 32 ) ) ) +//#if defined( STM32F7xx ) +// __attribute__( ( section( ".first_data" ) ) ) +//#endif +//ETH_DMADescTypeDef DMATxDscrTab[ ETH_TXBUFNB ]; + +//#if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) +// /* Ethernet Transmit Buffer */ +// __ALIGN_BEGIN uint8_t Tx_Buff[ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END; +//#endif + +///* DMATxDescToClear points to the next TX DMA descriptor +// * that must be cleared by vClearTXBuffers(). */ +//static __IO ETH_DMADescTypeDef * DMATxDescToClear; + +///* Holds the handle of the task used as a deferred interrupt processor. The +// * handle is used so direct notifications can be sent to the task for all EMAC/DMA +// * related interrupts. */ +//static TaskHandle_t xEMACTaskHandle = NULL; + +///* For local use only: describe the PHY's properties: */ +//const PhyProperties_t xPHYProperties = +//{ +// #if ( ipconfigETHERNET_AN_ENABLE != 0 ) +// .ucSpeed = PHY_SPEED_AUTO, +// .ucDuplex = PHY_DUPLEX_AUTO, +// #else +// #if ( ipconfigETHERNET_USE_100MB != 0 ) +// .ucSpeed = PHY_SPEED_100, +// #else +// .ucSpeed = PHY_SPEED_10, +// #endif + +// #if ( ipconfigETHERNET_USE_FULL_DUPLEX != 0 ) +// .ucDuplex = PHY_DUPLEX_FULL, +// #else +// .ucDuplex = PHY_DUPLEX_HALF, +// #endif +// #endif /* if ( ipconfigETHERNET_AN_ENABLE != 0 ) */ + +// #if ( ipconfigETHERNET_AN_ENABLE != 0 ) && ( ipconfigETHERNET_AUTO_CROSS_ENABLE != 0 ) +// .ucMDI_X = PHY_MDIX_AUTO, +// #elif ( ipconfigETHERNET_CROSSED_LINK != 0 ) +// .ucMDI_X = PHY_MDIX_CROSSED, +// #else +// .ucMDI_X = PHY_MDIX_DIRECT, +// #endif +//}; + +///*-----------------------------------------------------------*/ + +//void HAL_ETH_RxCpltCallback( ETH_HandleTypeDef * heth ) +//{ +// BaseType_t xHigherPriorityTaskWoken = pdFALSE; + +// ( void ) heth; + +// /* Pass an RX-event and wakeup the prvEMACHandlerTask. */ +// if( xEMACTaskHandle != NULL ) +// { +// xTaskNotifyFromISR( xEMACTaskHandle, EMAC_IF_RX_EVENT, eSetBits, &( xHigherPriorityTaskWoken ) ); +// portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +// } +//} +///*-----------------------------------------------------------*/ + +//void HAL_ETH_TxCpltCallback( ETH_HandleTypeDef * heth ) +//{ +// BaseType_t xHigherPriorityTaskWoken = pdFALSE; + +// ( void ) heth; + +// /* Pass a TX-event and wakeup the prvEMACHandlerTask. */ +// if( xEMACTaskHandle != NULL ) +// { +// xTaskNotifyFromISR( xEMACTaskHandle, EMAC_IF_TX_EVENT, eSetBits, &( xHigherPriorityTaskWoken ) ); +// portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); +// } +//} +///*-----------------------------------------------------------*/ + +//static void vClearTXBuffers() +//{ +// __IO ETH_DMADescTypeDef * txLastDescriptor = xETH.TxDesc; +// size_t uxCount = ( ( UBaseType_t ) ETH_TXBUFNB ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); + +// #if ( ipconfigZERO_COPY_TX_DRIVER != 0 ) +// NetworkBufferDescriptor_t * pxNetworkBuffer; +// uint8_t * ucPayLoad; +// #endif + +// /* This function is called after a TX-completion interrupt. +// * It will release each Network Buffer used in xNetworkInterfaceOutput(). +// * 'uxCount' represents the number of descriptors given to DMA for transmission. +// * After sending a packet, the DMA will clear the 'ETH_DMATXDESC_OWN' bit. */ +// while( ( uxCount > 0 ) && ( ( DMATxDescToClear->Status & ETH_DMATXDESC_OWN ) == 0 ) ) +// { +// if( ( DMATxDescToClear == txLastDescriptor ) && ( uxCount != ETH_TXBUFNB ) ) +// { +// break; +// } + +// #if ( ipconfigZERO_COPY_TX_DRIVER != 0 ) +// { +// ucPayLoad = ( uint8_t * ) DMATxDescToClear->Buffer1Addr; + +// if( ucPayLoad != NULL ) +// { +// pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); + +// if( pxNetworkBuffer != NULL ) +// { +// vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); +// } + +// DMATxDescToClear->Buffer1Addr = ( uint32_t ) 0u; +// } +// } +// #endif /* ipconfigZERO_COPY_TX_DRIVER */ + +// DMATxDescToClear = ( ETH_DMADescTypeDef * ) ( DMATxDescToClear->Buffer2NextDescAddr ); + +// uxCount--; +// /* Tell the counting semaphore that one more TX descriptor is available. */ +// xSemaphoreGive( xTXDescriptorSemaphore ); +// } +//} +///*-----------------------------------------------------------*/ + +//BaseType_t xNetworkInterfaceInitialise( void ) +//{ +// HAL_StatusTypeDef hal_eth_init_status; +// BaseType_t xResult; + +// #if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) +// BaseType_t xMACEntry = ETH_MAC_ADDRESS1; /* ETH_MAC_ADDRESS0 reserved for the primary MAC-address. */ +// #endif + +// if( xMacInitStatus == eMACInit ) +// { +// xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ETH_TXBUFNB, ( UBaseType_t ) ETH_TXBUFNB ); + +// if( xTXDescriptorSemaphore == NULL ) +// { +// xMacInitStatus = eMACFailed; +// } +// else +// { +// /* Initialise ETH */ + +// xETH.Instance = ETH; +// xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; +// xETH.Init.Speed = ETH_SPEED_100M; +// xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; +// /* Value of PhyAddress doesn't matter, will be probed for. */ +// xETH.Init.PhyAddress = 0; + +// xETH.Init.MACAddr = ( uint8_t * ) FreeRTOS_GetMACAddress(); +// xETH.Init.RxMode = ETH_RXINTERRUPT_MODE; + +// #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) +// { +// /* using the ETH_CHECKSUM_BY_HARDWARE option: +// * both the IP and the protocol checksums will be calculated +// * by the peripheral. */ +// xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; +// } +// #else +// { +// xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE; +// } +// #endif + +// #if ( ipconfigUSE_RMII != 0 ) +// { +// xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; +// } +// #else +// { +// xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII; +// } +// #endif /* ipconfigUSE_RMII */ + +// hal_eth_init_status = HAL_ETH_Init( &xETH ); + +// /* Only for inspection by debugger. */ +// ( void ) hal_eth_init_status; + +// /* Set the TxDesc and RxDesc pointers. */ +// xETH.TxDesc = DMATxDscrTab; +// xETH.RxDesc = DMARxDscrTab; + +// /* Make sure that all unused fields are cleared. */ +// memset( &DMATxDscrTab, '\0', sizeof( DMATxDscrTab ) ); +// memset( &DMARxDscrTab, '\0', sizeof( DMARxDscrTab ) ); + +// /* Initialize Tx Descriptors list: Chain Mode */ +// DMATxDescToClear = DMATxDscrTab; + +// /* Initialise TX-descriptors. */ +// prvDMATxDescListInit(); + +// /* Initialise RX-descriptors. */ +// prvDMARxDescListInit(); + +// #if ( ipconfigUSE_MDNS == 1 ) +// { +// /* Program the MDNS address. */ +// prvMACAddressConfig( &xETH, xMACEntry, ( uint8_t * ) xMDNS_MACAddressIPv4 ); +// xMACEntry += 8; +// } +// #endif +// #if ( ipconfigUSE_LLMNR == 1 ) +// { +// /* Program the LLMNR address. */ +// prvMACAddressConfig( &xETH, xMACEntry, ( uint8_t * ) xLLMNR_MACAddress ); +// xMACEntry += 8; +// } +// #endif + +// /* Force a negotiation with the Switch or Router and wait for LS. */ +// prvEthernetUpdateConfig( pdTRUE ); + +// /* The deferred interrupt handler task is created at the highest +// * possible priority to ensure the interrupt handler can return directly +// * to it. The task's handle is stored in xEMACTaskHandle so interrupts can +// * notify the task when there is something to process. */ +// if( xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, niEMAC_HANDLER_TASK_PRIORITY, &xEMACTaskHandle ) == pdPASS ) +// { +// /* The xTXDescriptorSemaphore and the task are created successfully. */ +// xMacInitStatus = eMACPass; +// } +// else +// { +// xMacInitStatus = eMACFailed; +// } +// } +// } /* if( xMacInitStatus == eMACInit ) */ + +// if( xMacInitStatus != eMACPass ) +// { +// /* EMAC initialisation failed, return pdFAIL. */ +// xResult = pdFAIL; +// } +// else +// { +// if( xPhyObject.ulLinkStatusMask != 0U ) +// { +// xETH.Instance->DMAIER |= ETH_DMA_ALL_INTS; +// xResult = pdPASS; +// FreeRTOS_printf( ( "Link Status is high\n" ) ); +// } +// else +// { +// /* For now pdFAIL will be returned. But prvEMACHandlerTask() is running +// * and it will keep on checking the PHY and set 'ulLinkStatusMask' when necessary. */ +// xResult = pdFAIL; +// } +// } + +// /* When returning non-zero, the stack will become active and +// * start DHCP (in configured) */ +// return xResult; +//} +///*-----------------------------------------------------------*/ + +//static void prvDMATxDescListInit() +//{ +// ETH_DMADescTypeDef * pxDMADescriptor; +// BaseType_t xIndex; + +// /* Get the pointer on the first member of the descriptor list */ +// pxDMADescriptor = DMATxDscrTab; + +// /* Fill each DMA descriptor with the right values */ +// for( xIndex = 0; xIndex < ETH_TXBUFNB; xIndex++, pxDMADescriptor++ ) +// { +// /* Set Second Address Chained bit */ +// pxDMADescriptor->Status = ETH_DMATXDESC_TCH; + +// #if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) +// { +// /* Set Buffer1 address pointer */ +// pxDMADescriptor->Buffer1Addr = ( uint32_t ) ( Tx_Buff[ xIndex ] ); +// } +// #endif + +// if( xETH.Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE ) +// { +// /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ +// pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; +// } +// else +// { +// pxDMADescriptor->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL ); +// } + +// /* Initialize the next descriptor with the Next Descriptor Polling Enable */ +// if( xIndex < ETH_TXBUFNB - 1 ) +// { +// /* Set next descriptor address register with next descriptor base address */ +// pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); +// } +// else +// { +// /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ +// pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMATxDscrTab; +// } +// } + +// /* Set Transmit Descriptor List Address Register */ +// xETH.Instance->DMATDLAR = ( uint32_t ) DMATxDscrTab; +//} +///*-----------------------------------------------------------*/ + +//static void prvDMARxDescListInit() +//{ +// ETH_DMADescTypeDef * pxDMADescriptor; +// BaseType_t xIndex; + +// /* +// * RX-descriptors. +// */ + +// /* Get the pointer on the first member of the descriptor list */ +// pxDMADescriptor = DMARxDscrTab; + +// /* Fill each DMA descriptor with the right values */ +// for( xIndex = 0; xIndex < ETH_RXBUFNB; xIndex++, pxDMADescriptor++ ) +// { +// /* Set Buffer1 size and Second Address Chained bit */ +// pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | EMAC_DMA_BUFFER_SIZE; + +// #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) +// { +// /* Set Buffer1 address pointer */ +// NetworkBufferDescriptor_t * pxBuffer; + +// pxBuffer = pxGetNetworkBufferWithDescriptor( EMAC_DMA_BUFFER_SIZE, 100ul ); + +// /* If the assert below fails, make sure that there are at least 'ETH_RXBUFNB' +// * Network Buffers available during start-up ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) */ +// configASSERT( pxBuffer != NULL ); + +// if( pxBuffer != NULL ) +// { +// pxDMADescriptor->Buffer1Addr = ( uint32_t ) pxBuffer->pucEthernetBuffer; +// pxDMADescriptor->Status = ETH_DMARXDESC_OWN; +// } +// } +// #else /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ +// { +// /* Set Buffer1 address pointer */ +// pxDMADescriptor->Buffer1Addr = ( uint32_t ) ( Rx_Buff[ xIndex ] ); +// /* Set Own bit of the Rx descriptor Status */ +// pxDMADescriptor->Status = ETH_DMARXDESC_OWN; +// } +// #endif /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ + +// /* Initialize the next descriptor with the Next Descriptor Polling Enable */ +// if( xIndex < ETH_RXBUFNB - 1 ) +// { +// /* Set next descriptor address register with next descriptor base address */ +// pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); +// } +// else +// { +// /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ +// pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMARxDscrTab; +// } +// } + +// /* Set Receive Descriptor List Address Register */ +// xETH.Instance->DMARDLAR = ( uint32_t ) DMARxDscrTab; +//} +///*-----------------------------------------------------------*/ + +//#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) +// static void prvMACAddressConfig( ETH_HandleTypeDef * heth, +// uint32_t ulIndex, +// uint8_t * Addr ) +// { +// uint32_t ulTempReg; + +// ( void ) heth; + +// /* Calculate the selected MAC address high register. */ +// ulTempReg = 0x80000000ul | ( ( uint32_t ) Addr[ 5 ] << 8 ) | ( uint32_t ) Addr[ 4 ]; + +// /* Load the selected MAC address high register. */ +// ( *( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + ulIndex ) ) ) = ulTempReg; + +// /* Calculate the selected MAC address low register. */ +// ulTempReg = ( ( uint32_t ) Addr[ 3 ] << 24 ) | ( ( uint32_t ) Addr[ 2 ] << 16 ) | ( ( uint32_t ) Addr[ 1 ] << 8 ) | Addr[ 0 ]; + +// /* Load the selected MAC address low register */ +// ( *( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg; +// } +//#endif /* if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) */ +///*-----------------------------------------------------------*/ + +//BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, +// BaseType_t bReleaseAfterSend ) +//{ +// BaseType_t xReturn = pdFAIL; +// uint32_t ulTransmitSize = 0; +// __IO ETH_DMADescTypeDef * pxDmaTxDesc; +///* Do not wait too long for a free TX DMA buffer. */ +// const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); + +// /* Open a do {} while ( 0 ) loop to be able to call break. */ +// do +// { +// #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) +// { +// ProtocolPacket_t * pxPacket; + +// /* If the peripheral must calculate the checksum, it wants +// * the protocol checksum to have a value of zero. */ +// pxPacket = ( ProtocolPacket_t * ) ( pxDescriptor->pucEthernetBuffer ); + +// if( pxPacket->xICMPPacket.xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) +// { +// pxPacket->xICMPPacket.xICMPHeader.usChecksum = ( uint16_t ) 0u; +// } +// } +// #endif /* ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM */ + +// if( xPhyObject.ulLinkStatusMask != 0 ) +// { +// if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) +// { +// /* Time-out waiting for a free TX descriptor. */ +// break; +// } + +// /* This function does the actual transmission of the packet. The packet is +// * contained in 'pxDescriptor' that is passed to the function. */ +// pxDmaTxDesc = xETH.TxDesc; + +// /* Is this buffer available? */ +// configASSERT( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) == 0 ); + +// { +// /* Is this buffer available? */ +// /* Get bytes in current buffer. */ +// ulTransmitSize = pxDescriptor->xDataLength; + +// if( ulTransmitSize > EMAC_DMA_BUFFER_SIZE ) +// { +// ulTransmitSize = EMAC_DMA_BUFFER_SIZE; +// } + +// #if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) +// { +// /* Copy the bytes. */ +// memcpy( ( void * ) pxDmaTxDesc->Buffer1Addr, pxDescriptor->pucEthernetBuffer, ulTransmitSize ); +// } +// #else +// { +// configASSERT( bReleaseAfterSend != 0 ); + +// /* Move the buffer. */ +// pxDmaTxDesc->Buffer1Addr = ( uint32_t ) pxDescriptor->pucEthernetBuffer; +// /* The Network Buffer has been passed to DMA, no need to release it. */ +// bReleaseAfterSend = pdFALSE_UNSIGNED; +// } +// #endif /* ipconfigZERO_COPY_TX_DRIVER */ + +// /* Ask to set the IPv4 checksum. +// * Also need an Interrupt on Completion so that 'vClearTXBuffers()' will be called.. */ +// #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) +// { +// pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL | ETH_DMATXDESC_IC; +// } +// #else +// { +// pxDmaTxDesc->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CIC ); +// pxDmaTxDesc->Status |= ETH_DMATXDESC_IC; +// } +// #endif + + +// /* Prepare transmit descriptors to give to DMA. */ + +// /* Set LAST and FIRST segment */ +// pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; +// /* Set frame size */ +// pxDmaTxDesc->ControlBufferSize = ( ulTransmitSize & ETH_DMATXDESC_TBS1 ); + +// #if ( NETWORK_BUFFERS_CACHED != 0 ) +// { +// BaseType_t xlength = CACHE_LINE_SIZE * ( ( ulTransmitSize + NETWORK_BUFFER_HEADER_SIZE + CACHE_LINE_SIZE - 1 ) / CACHE_LINE_SIZE ); +// uint32_t * pulBuffer = ( uint32_t ) ( pxDescriptor->pucEthernetBuffer - NETWORK_BUFFER_HEADER_SIZE ); +// cache_clean_invalidate_by_addr( pulBuffer, xlength ); +// } +// #endif + +// /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ +// pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; + +// /* Point to next descriptor */ +// xETH.TxDesc = ( ETH_DMADescTypeDef * ) ( xETH.TxDesc->Buffer2NextDescAddr ); +// /* Ensure completion of memory access */ +// __DSB(); +// /* Resume DMA transmission*/ +// xETH.Instance->DMATPDR = 0; +// iptraceNETWORK_INTERFACE_TRANSMIT(); +// xReturn = pdPASS; +// } +// } +// else +// { +// /* The PHY has no Link Status, packet shall be dropped. */ +// } +// } while( 0 ); + +// /* The buffer has been sent so can be released. */ +// if( bReleaseAfterSend != pdFALSE ) +// { +// vReleaseNetworkBufferAndDescriptor( pxDescriptor ); +// } + +// return xReturn; +//} +///*-----------------------------------------------------------*/ + +//static BaseType_t xMayAcceptPacket( uint8_t * pucEthernetBuffer ) +//{ +// const ProtocolPacket_t * pxProtPacket = ( const ProtocolPacket_t * ) pucEthernetBuffer; + +// switch( pxProtPacket->xTCPPacket.xEthernetHeader.usFrameType ) +// { +// case ipARP_FRAME_TYPE: +// /* Check it later. */ +// return pdTRUE; + +// case ipIPv4_FRAME_TYPE: +// /* Check it here. */ +// break; + +// default: +// /* Refuse the packet. */ +// return pdFALSE; +// } + +// #if ( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) +// { +// const IPHeader_t * pxIPHeader = &( pxProtPacket->xTCPPacket.xIPHeader ); +// uint32_t ulDestinationIPAddress; + +// /* Ensure that the incoming packet is not fragmented (only outgoing packets +// * can be fragmented) as these are the only handled IP frames currently. */ +// if( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_OFFSET_BIT_MASK ) != 0U ) +// { +// return pdFALSE; +// } + +// /* HT: Might want to make the following configurable because +// * most IP messages have a standard length of 20 bytes */ + +// /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes +// * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ +// if( ( pxIPHeader->ucVersionHeaderLength < 0x45 ) || ( pxIPHeader->ucVersionHeaderLength > 0x4F ) ) +// { +// return pdFALSE; +// } + +// ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; + +// /* Is the packet for this node? */ +// if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && +// /* Is it a broadcast address x.x.x.255 ? */ +// ( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xff ) != 0xff ) && +// #if ( ipconfigUSE_LLMNR == 1 ) +// ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && +// #endif +// ( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) ) +// { +// FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) ); +// return pdFALSE; +// } + +// if( pxIPHeader->ucProtocol == ipPROTOCOL_UDP ) +// { +// #if ( ipconfigUSE_LLMNR == 1 ) || ( ipconfigUSE_MDNS == 1 ) || ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_DNS == 1 ) +// uint16_t usSourcePort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usSourcePort ); +// uint16_t usDestinationPort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ); +// #endif + +// if( ( xPortHasUDPSocket( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ) == pdFALSE ) +// #if ipconfigUSE_LLMNR == 1 +// && ( usDestinationPort != ipLLMNR_PORT ) && +// ( usSourcePort != ipLLMNR_PORT ) +// #endif +// #if ipconfigUSE_MDNS == 1 +// && ( usDestinationPort != ipMDNS_PORT ) && +// ( usSourcePort != ipMDNS_PORT ) +// #endif +// #if ipconfigUSE_NBNS == 1 +// && ( usDestinationPort != ipNBNS_PORT ) && +// ( usSourcePort != ipNBNS_PORT ) +// #endif +// #if ipconfigUSE_DNS == 1 +// && ( usSourcePort != ipDNS_PORT ) +// #endif +// ) +// { +// /* Drop this packet, not for this device. */ +// /* FreeRTOS_printf( ( "Drop: UDP port %d -> %d\n", usSourcePort, usDestinationPort ) ); */ +// return pdFALSE; +// } +// } +// } +// #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ +// return pdTRUE; +//} +///*-----------------------------------------------------------*/ + +//static void prvPassEthMessages( NetworkBufferDescriptor_t * pxDescriptor ) +//{ +// IPStackEvent_t xRxEvent; + +// xRxEvent.eEventType = eNetworkRxEvent; +// xRxEvent.pvData = ( void * ) pxDescriptor; + +// if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS ) +// { +// /* The buffer could not be sent to the stack so must be released again. +// * This is a deferred handler task, not a real interrupt, so it is ok to +// * use the task level function here. */ +// #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) +// { +// do +// { +// NetworkBufferDescriptor_t * pxNext = pxDescriptor->pxNextBuffer; +// vReleaseNetworkBufferAndDescriptor( pxDescriptor ); +// pxDescriptor = pxNext; +// } while( pxDescriptor != NULL ); +// } +// #else +// { +// vReleaseNetworkBufferAndDescriptor( pxDescriptor ); +// } +// #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ +// iptraceETHERNET_RX_EVENT_LOST(); +// FreeRTOS_printf( ( "prvPassEthMessages: Can not queue return packet!\n" ) ); +// } +// else +// { +// iptraceNETWORK_INTERFACE_RECEIVE(); +// } +//} + +//static BaseType_t prvNetworkInterfaceInput( void ) +//{ +// #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) +// NetworkBufferDescriptor_t * pxFirstDescriptor = NULL; +// NetworkBufferDescriptor_t * pxLastDescriptor = NULL; +// #endif +// BaseType_t xReceivedLength = 0; +// __IO ETH_DMADescTypeDef * pxDMARxDescriptor; +// const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( niDESCRIPTOR_WAIT_TIME_MS ); +// uint8_t * pucBuffer; + +// pxDMARxDescriptor = xETH.RxDesc; + +// while( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0u ) +// { +// NetworkBufferDescriptor_t * pxCurDescriptor; +// NetworkBufferDescriptor_t * pxNewDescriptor = NULL; +// BaseType_t xAccepted = pdTRUE; + +// /* Get the Frame Length of the received packet: subtract 4 bytes of the CRC */ +// xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; + +// pucBuffer = ( uint8_t * ) pxDMARxDescriptor->Buffer1Addr; + +// /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ +// /* Chained Mode */ +// /* Selects the next DMA Rx descriptor list for next buffer to read */ +// xETH.RxDesc = ( ETH_DMADescTypeDef * ) pxDMARxDescriptor->Buffer2NextDescAddr; + +// /* In order to make the code easier and faster, only packets in a single buffer +// * will be accepted. This can be done by making the buffers large enough to +// * hold a complete Ethernet packet, minus ipBUFFER_PADDING. +// * Therefore, two sanity checks: */ +// configASSERT( xReceivedLength <= EMAC_DMA_BUFFER_SIZE ); + +// if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT ) +// { +// /* Not an Ethernet frame-type or a checksum error. */ +// xAccepted = pdFALSE; +// } +// else +// { +// /* See if this packet must be handled. */ +// xAccepted = xMayAcceptPacket( pucBuffer ); +// } + +// if( xAccepted != pdFALSE ) +// { +// /* The packet will be accepted, but check first if a new Network Buffer can +// * be obtained. If not, the packet will still be dropped. */ +// pxNewDescriptor = pxGetNetworkBufferWithDescriptor( EMAC_DMA_BUFFER_SIZE, xDescriptorWaitTime ); + +// if( pxNewDescriptor == NULL ) +// { +// /* A new descriptor can not be allocated now. This packet will be dropped. */ +// xAccepted = pdFALSE; +// } +// } + +// #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) +// { +// /* Find out which Network Buffer was originally passed to the descriptor. */ +// pxCurDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); +// configASSERT( pxCurDescriptor != NULL ); +// } +// #else +// { +// /* In this mode, the two descriptors are the same. */ +// pxCurDescriptor = pxNewDescriptor; + +// if( pxNewDescriptor != NULL ) +// { +// /* The packet is accepted and a new Network Buffer was created, +// * copy data to the Network Buffer. */ +// memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength ); +// } +// } +// #endif /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ + +// if( xAccepted != pdFALSE ) +// { +// pxCurDescriptor->xDataLength = xReceivedLength; +// #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) +// { +// pxCurDescriptor->pxNextBuffer = NULL; + +// if( pxFirstDescriptor == NULL ) +// { +// /* Becomes the first message */ +// pxFirstDescriptor = pxCurDescriptor; +// } +// else if( pxLastDescriptor != NULL ) +// { +// /* Add to the tail */ +// pxLastDescriptor->pxNextBuffer = pxCurDescriptor; +// } + +// pxLastDescriptor = pxCurDescriptor; +// } +// #else /* if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) */ +// { +// prvPassEthMessages( pxCurDescriptor ); +// } +// #endif /* if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) */ +// } + +// /* Release descriptors to DMA */ +// #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) +// { +// /* Set Buffer1 address pointer */ +// if( pxNewDescriptor != NULL ) +// { +// pxDMARxDescriptor->Buffer1Addr = ( uint32_t ) pxNewDescriptor->pucEthernetBuffer; +// } +// else +// { +// /* The packet was dropped and the same Network +// * Buffer will be used to receive a new packet. */ +// } +// } +// #endif /* ipconfigZERO_COPY_RX_DRIVER */ + +// /* Set Buffer1 size and Second Address Chained bit */ +// pxDMARxDescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | EMAC_DMA_BUFFER_SIZE; +// pxDMARxDescriptor->Status = ETH_DMARXDESC_OWN; + +// /* Ensure completion of memory access */ +// __DSB(); + +// /* When Rx Buffer unavailable flag is set clear it and resume +// * reception. */ +// if( ( xETH.Instance->DMASR & ETH_DMASR_RBUS ) != 0 ) +// { +// /* Clear RBUS ETHERNET DMA flag. */ +// xETH.Instance->DMASR = ETH_DMASR_RBUS; + +// /* Resume DMA reception. */ +// xETH.Instance->DMARPDR = 0; +// } + +// pxDMARxDescriptor = xETH.RxDesc; +// } + +// #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) +// { +// if( pxFirstDescriptor != NULL ) +// { +// prvPassEthMessages( pxFirstDescriptor ); +// } +// } +// #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ + +// return( xReceivedLength > 0 ); +//} +///*-----------------------------------------------------------*/ + + +//BaseType_t xSTM32_PhyRead( BaseType_t xAddress, +// BaseType_t xRegister, +// uint32_t * pulValue ) +//{ +// uint16_t usPrevAddress = xETH.Init.PhyAddress; +// BaseType_t xResult; +// HAL_StatusTypeDef xHALResult; + +// xETH.Init.PhyAddress = xAddress; +// xHALResult = HAL_ETH_ReadPHYRegister( &xETH, ( uint16_t ) xRegister, pulValue ); +// xETH.Init.PhyAddress = usPrevAddress; + +// if( xHALResult == HAL_OK ) +// { +// xResult = 0; +// } +// else +// { +// xResult = -1; +// } + +// return xResult; +//} +///*-----------------------------------------------------------*/ + +//BaseType_t xSTM32_PhyWrite( BaseType_t xAddress, +// BaseType_t xRegister, +// uint32_t ulValue ) +//{ +// uint16_t usPrevAddress = xETH.Init.PhyAddress; +// BaseType_t xResult; +// HAL_StatusTypeDef xHALResult; + +// xETH.Init.PhyAddress = xAddress; +// xHALResult = HAL_ETH_WritePHYRegister( &xETH, ( uint16_t ) xRegister, ulValue ); +// xETH.Init.PhyAddress = usPrevAddress; + +// if( xHALResult == HAL_OK ) +// { +// xResult = 0; +// } +// else +// { +// xResult = -1; +// } + +// return xResult; +//} +///*-----------------------------------------------------------*/ + +//void vMACBProbePhy( void ) +//{ +// vPhyInitialise( &xPhyObject, xSTM32_PhyRead, xSTM32_PhyWrite ); +// xPhyDiscover( &xPhyObject ); +// xPhyConfigure( &xPhyObject, &xPHYProperties ); +//} +///*-----------------------------------------------------------*/ + +//static void prvEthernetUpdateConfig( BaseType_t xForce ) +//{ +// FreeRTOS_printf( ( "prvEthernetUpdateConfig: LS mask %02lX Force %d\n", +// xPhyObject.ulLinkStatusMask, +// ( int ) xForce ) ); + +// if( ( xForce != pdFALSE ) || ( xPhyObject.ulLinkStatusMask != 0 ) ) +// { +// /* Restart the auto-negotiation. */ +// if( xETH.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE ) +// { +// xPhyStartAutoNegotiation( &xPhyObject, xPhyGetMask( &xPhyObject ) ); + +// /* Configure the MAC with the Duplex Mode fixed by the +// * auto-negotiation process. */ +// if( xPhyObject.xPhyProperties.ucDuplex == PHY_DUPLEX_FULL ) +// { +// xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; +// } +// else +// { +// xETH.Init.DuplexMode = ETH_MODE_HALFDUPLEX; +// } + +// /* Configure the MAC with the speed fixed by the +// * auto-negotiation process. */ +// if( xPhyObject.xPhyProperties.ucSpeed == PHY_SPEED_10 ) +// { +// xETH.Init.Speed = ETH_SPEED_10M; +// } +// else +// { +// xETH.Init.Speed = ETH_SPEED_100M; +// } +// } +// else /* AutoNegotiation Disable */ +// { +// /* Check parameters */ +// assert_param( IS_ETH_SPEED( xETH.Init.Speed ) ); +// assert_param( IS_ETH_DUPLEX_MODE( xETH.Init.DuplexMode ) ); + +// if( xETH.Init.DuplexMode == ETH_MODE_FULLDUPLEX ) +// { +// xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_HALF; +// } +// else +// { +// xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_FULL; +// } + +// if( xETH.Init.Speed == ETH_SPEED_10M ) +// { +// xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_10; +// } +// else +// { +// xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_100; +// } + +// xPhyObject.xPhyPreferences.ucMDI_X = PHY_MDIX_AUTO; + +// /* Use predefined (fixed) configuration. */ +// xPhyFixedValue( &xPhyObject, xPhyGetMask( &xPhyObject ) ); +// } + +// /* ETHERNET MAC Re-Configuration */ +// HAL_ETH_ConfigMAC( &xETH, ( ETH_MACInitTypeDef * ) NULL ); + +// /* Restart MAC interface */ +// HAL_ETH_Start( &xETH ); +// } +// else +// { +// /* Stop MAC interface */ +// HAL_ETH_Stop( &xETH ); +// } +//} +///*-----------------------------------------------------------*/ + +//BaseType_t xGetPhyLinkStatus( void ) +//{ +// BaseType_t xReturn; + +// if( xPhyObject.ulLinkStatusMask != 0 ) +// { +// xReturn = pdPASS; +// } +// else +// { +// xReturn = pdFAIL; +// } + +// return xReturn; +//} +///*-----------------------------------------------------------*/ + +///* Uncomment this in case BufferAllocation_1.c is used. */ + +//void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +//{ +// static +// #if defined( STM32F7xx ) +// __attribute__( ( section( ".first_data" ) ) ) +// #endif +// uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * ETH_MAX_PACKET_SIZE ] __attribute__( ( aligned( 32 ) ) ); +// uint8_t * ucRAMBuffer = ucNetworkPackets; +// uint32_t ul; + +// for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) +// { +// pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; +// *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); +// ucRAMBuffer += ETH_MAX_PACKET_SIZE; +// } +//} +///*-----------------------------------------------------------*/ + +//static void prvEMACHandlerTask( void * pvParameters ) +//{ +// UBaseType_t uxCurrentCount; +// BaseType_t xResult; +// const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); +// uint32_t ulISREvents = 0U; + +// /* Remove compiler warnings about unused parameters. */ +// ( void ) pvParameters; + +// for( ; ; ) +// { +// xResult = 0; + +// #if ( ipconfigHAS_PRINTF != 0 ) +// { +// /* Call a function that monitors resources: the amount of free network +// * buffers and the amount of free space on the heap. See FreeRTOS_IP.c +// * for more detailed comments. */ +// vPrintResourceStats(); +// } +// #endif /* ( ipconfigHAS_PRINTF != 0 ) */ + +// if( xTXDescriptorSemaphore != NULL ) +// { +// static UBaseType_t uxLowestSemCount = ( UBaseType_t ) ETH_TXBUFNB - 1; + +// uxCurrentCount = uxSemaphoreGetCount( xTXDescriptorSemaphore ); + +// if( uxLowestSemCount > uxCurrentCount ) +// { +// uxLowestSemCount = uxCurrentCount; +// FreeRTOS_printf( ( "TX DMA buffers: lowest %lu\n", uxLowestSemCount ) ); +// } +// } + +// /* Wait for a new event or a time-out. */ +// xTaskNotifyWait( 0U, /* ulBitsToClearOnEntry */ +// EMAC_IF_ALL_EVENT, /* ulBitsToClearOnExit */ +// &( ulISREvents ), /* pulNotificationValue */ +// ulMaxBlockTime ); + +// if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) +// { +// xResult = prvNetworkInterfaceInput(); +// } + +// if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) +// { +// /* Code to release TX buffers in case zero-copy is used. */ +// /* Check if DMA packets have been delivered. */ +// vClearTXBuffers(); +// } + +// if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) +// { +// /* Future extension: logging about errors that occurred. */ +// } + +// if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 ) +// { +// /* Something has changed to a Link Status, need re-check. */ +// prvEthernetUpdateConfig( pdFALSE ); +// } +// } +//} +///*-----------------------------------------------------------*/ + +//void ETH_IRQHandler( void ) +//{ +// HAL_ETH_IRQHandler( &xETH ); +//} /* - * FreeRTOS+TCP V3.1.0 - * Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * http://aws.amazon.com/freertos - * http://www.FreeRTOS.org + * Some constants, hardware definitions and comments taken from ST's HAL driver + * library, COPYRIGHT(c) 2015 STMicroelectronics. */ -/***************************************************************************** -* Note: This file is Not! to be used as is. The purpose of this file is to provide -* a template for writing a network interface. Each network interface will have to provide -* concrete implementations of the functions in this file. -* -* See the following URL for an explanation of this file and its functions: -* https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Ethernet_Porting.html -* -*****************************************************************************/ +/* + * FreeRTOS+TCP Labs Build 160919 (C) 2016 Real Time Engineers ltd. + * Authors include Hein Tibosch and Richard Barry + * + ******************************************************************************* + ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** + *** *** + *** *** + *** FREERTOS+TCP IS STILL IN THE LAB (mainly because the FTP and HTTP *** + *** demos have a dependency on FreeRTOS+FAT, which is only in the Labs *** + *** download): *** + *** *** + *** FreeRTOS+TCP is functional and has been used in commercial products *** + *** for some time. Be aware however that we are still refining its *** + *** design, the source code does not yet quite conform to the strict *** + *** coding and style standards mandated by Real Time Engineers ltd., and *** + *** the documentation and testing is not necessarily complete. *** + *** *** + *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** + *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** + *** the sole discretion of Real Time Engineers Ltd., be offered versions *** + *** under a license other than that described below. *** + *** *** + *** *** + ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** + ******************************************************************************* + * + * FreeRTOS+TCP can be used under two different free open source licenses. The + * license that applies is dependent on the processor on which FreeRTOS+TCP is + * executed, as follows: + * + * If FreeRTOS+TCP is executed on one of the processors listed under the Special + * License Arrangements heading of the FreeRTOS+TCP license information web + * page, then it can be used under the terms of the FreeRTOS Open Source + * License. If FreeRTOS+TCP is used on any other processor, then it can be used + * under the terms of the GNU General Public License V2. Links to the relevant + * licenses follow: + * + * The FreeRTOS+TCP License Information Page: http://www.FreeRTOS.org/tcp_license + * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license + * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt + * + * FreeRTOS+TCP is distributed in the hope that it will be useful. You cannot + * use FreeRTOS+TCP unless you agree that you use the software 'as is'. + * FreeRTOS+TCP is provided WITHOUT ANY WARRANTY; without even the implied + * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they + * implied, expressed, or statutory. + * + * 1 tab == 4 spaces! + * + * http://www.FreeRTOS.org + * http://www.FreeRTOS.org/plus + * http://www.FreeRTOS.org/labs + * + */ /* Standard includes. */ #include #include #include +#include /* FreeRTOS includes. */ #include "FreeRTOS.h" @@ -50,1311 +1436,480 @@ #include "FreeRTOS_IP.h" #include "FreeRTOS_Sockets.h" #include "FreeRTOS_IP_Private.h" -#include "FreeRTOS_DNS.h" -#include "FreeRTOS_ARP.h" #include "NetworkBufferManagement.h" #include "NetworkInterface.h" -#include "phyHandling.h" -//#include "stm32fxx_hal_eth.h" - -/*#include "Driver_ETH.h" +//#include "Driver_ETH.h" #include "Driver_ETH_MAC.h" -#include "Driver_ETH_PHY.h"*/ -/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet - * driver will filter incoming packets and only pass the stack those packets it - * considers need processing. */ -#if ( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 ) - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eProcessBuffer -#else - #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer ) eConsiderFrameForProcessing( ( pucEthernetBuffer ) ) -#endif +#include "Driver_ETH_PHY.h" +#include "gd32f10x_enet.h" +static void receiveHandlerTask( void *pvParameters ); +static TaskHandle_t receiveHandler = NULL; -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, - BaseType_t xReleaseAfterSend ) +static ARM_ETH_MAC_ADDR own_mac_address ;//device mac adress stores here. MSB first +static ARM_DRIVER_ETH_MAC *mac; +static ARM_ETH_MAC_CAPABILITIES capabilities; +//#define Driver_ETH_MAC0 ARM_Driver_ETH_MAC_(0) +//extern ARM_DRIVER_ETH_MAC Driver_ETH_MAC0; + +/** + \fn ARM_DRIVER_VERSION ARM_ETH_MAC_GetVersion (void) + \brief Get driver version. + \return \ref ARM_DRIVER_VERSION +*/ +ARM_DRIVER_VERSION ARM_ETH_MAC_GetVersion (void) { - /* FIX ME. */ - return pdFALSE; + ARM_DRIVER_VERSION eth_mac_driver_version = {1,1}; + return eth_mac_driver_version; } -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) +/** + \fn ARM_ETH_MAC_CAPABILITIES ARM_ETH_MAC_GetCapabilities (void) + \brief Get driver capabilities. + \return \ref ARM_ETH_MAC_CAPABILITIES +*/ +ARM_ETH_MAC_CAPABILITIES ARM_ETH_MAC_GetCapabilities (void) { - /* FIX ME. */ + ARM_ETH_MAC_CAPABILITIES eth_mac_capabilities = { + 1, ///< 1 = IPv4 header checksum verified on receive + 1, ///< 1 = IPv6 checksum verification supported on receive + 1, ///< 1 = UDP payload checksum verified on receive + 1, ///< 1 = TCP payload checksum verified on receive + 1, ///< 1 = ICMP payload checksum verified on receive + 1, ///< 1 = IPv4 header checksum generated on transmit + 1, ///< 1 = IPv6 checksum generation supported on transmit + 1, ///< 1 = UDP payload checksum generated on transmit + 1, ///< 1 = TCP payload checksum generated on transmit + 1, ///< 1 = ICMP payload checksum generated on transmit + 1, ///< 0, 1, 2, 3, Ethernet Media Interface type + 1, ///< 1 = driver provides initial valid MAC address + 1, ///< 1 = callback event \ref ARM_ETH_MAC_EVENT_RX_FRAME generated + 1, ///< 1 = callback event \ref ARM_ETH_MAC_EVENT_TX_FRAME generated + 1, ///< 1 = wakeup event \ref ARM_ETH_MAC_EVENT_WAKEUP generated + 1, ///< 1 = Precision Timer supported + 0 ///< Reserved (must be zero) + }; + return eth_mac_capabilities; } -BaseType_t xGetPhyLinkStatus( void ) +/** + \fn int32_t ARM_ETH_MAC_Initialize (ARM_ETH_MAC_SignalEvent_t cb_event) + \brief Initialize Ethernet MAC Device. + \param[in] cb_event Pointer to \ref ARM_ETH_MAC_SignalEvent + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_Initialize (ARM_ETH_MAC_SignalEvent_t cb_event) { - /* FIX ME. */ - return pdFALSE; + enet_init(ENET_AUTO_NEGOTIATION, ENET_AUTOCHECKSUM_DROP_FAILFRAMES, ENET_RECEIVEALL); + return pdTRUE; } - - - -/* ST includes. */ -#if defined( GD32F10X_CL ) - #include "gd32f10x_enet.h" -#elif defined( STM32F7xx ) - #include "stm32f7xx_hal.h" - #define CACHE_LINE_SIZE 32u -#elif defined( STM32F4xx ) - #include "stm32f4xx_hal.h" -#elif defined( STM32F2xx ) - #include "stm32f2xx_hal.h" -#elif defined( STM32F1xx ) - #include "stm32f1xx_hal.h" -#elif !defined( _lint ) /* Lint does not like an #error */ - #error What part? -#endif /* if defined( GD32F10X_CL ) */ - - -/* Interrupt events to process. Currently only the Rx event is processed - * although code for other events is included to allow for possible future - * expansion. */ -#define EMAC_IF_RX_EVENT 1UL -#define EMAC_IF_TX_EVENT 2UL -#define EMAC_IF_ERR_EVENT 4UL -#define EMAC_IF_ALL_EVENT ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT ) - -/* Calculate the maximum packet size that the DMA can receive. */ -#define EMAC_DMA_BUFFER_SIZE ( ( uint32_t ) ( ETH_MAX_PACKET_SIZE - ipBUFFER_PADDING ) ) - -#define ETH_DMA_ALL_INTS \ - ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | \ - ETH_DMA_IT_AIS | ETH_DMA_IT_ER | ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | \ - ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R | ETH_DMA_IT_TU | \ - ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T ) - -#ifndef NETWORK_BUFFER_HEADER_SIZE - #define NETWORK_BUFFER_HEADER_SIZE ( ipBUFFER_PADDING ) -#endif - -#ifndef niEMAC_HANDLER_TASK_PRIORITY - #define niEMAC_HANDLER_TASK_PRIORITY configMAX_PRIORITIES - 1 -#endif - -#if ( ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM == 0 ) || ( ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM == 0 ) ) - #warning Consider enabling checksum offloading -#endif - -#ifndef niDESCRIPTOR_WAIT_TIME_MS - #define niDESCRIPTOR_WAIT_TIME_MS 250uL -#endif - -/* - * Most users will want a PHY that negotiates about - * the connection properties: speed, dmix and duplex. - * On some rare cases, you want to select what is being - * advertised, properties like MDIX and duplex. - */ - -#if !defined( ipconfigETHERNET_AN_ENABLE ) - /* Enable auto-negotiation */ - #define ipconfigETHERNET_AN_ENABLE 1 -#endif - -#if !defined( ipconfigETHERNET_AUTO_CROSS_ENABLE ) - #define ipconfigETHERNET_AUTO_CROSS_ENABLE 1 -#endif - -#if ( ipconfigETHERNET_AN_ENABLE == 0 ) - -/* - * The following three defines are only used in case there - * is no auto-negotiation. - */ - #if !defined( ipconfigETHERNET_CROSSED_LINK ) - #define ipconfigETHERNET_CROSSED_LINK 1 - #endif - - #if !defined( ipconfigETHERNET_USE_100MB ) - #define ipconfigETHERNET_USE_100MB 1 - #endif - - #if !defined( ipconfigETHERNET_USE_FULL_DUPLEX ) - #define ipconfigETHERNET_USE_FULL_DUPLEX 1 - #endif -#endif /* ipconfigETHERNET_AN_ENABLE == 0 */ - -/* Default the size of the stack used by the EMAC deferred handler task to twice - * the size of the stack used by the idle task - but allow this to be overridden in - * FreeRTOSConfig.h as configMINIMAL_STACK_SIZE is a user definable constant. */ -#ifndef configEMAC_TASK_STACK_SIZE - #define configEMAC_TASK_STACK_SIZE ( 2 * configMINIMAL_STACK_SIZE ) -#endif - -/* Two choices must be made: RMII versus MII, - * and the index of the PHY in use ( between 0 and 31 ). */ -#ifndef ipconfigUSE_RMII - #ifdef GD32F10X_CL - #define ipconfigUSE_RMII 1 - #warning Using RMII, make sure if this is correct - #else - #define ipconfigUSE_RMII 0 - #warning Using MII, make sure if this is correct - #endif /* GD32F10X_CL */ -#endif /* ipconfigUSE_RMII */ - -typedef enum +/** + \fn int32_t ARM_ETH_MAC_Uninitialize (void) + \brief De-initialize Ethernet MAC Device. + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_Uninitialize (void) { - eMACInit, /* Must initialise MAC. */ - eMACPass, /* Initialisation was successful. */ - eMACFailed, /* Initialisation failed. */ -} eMAC_INIT_STATUS_TYPE; - -static eMAC_INIT_STATUS_TYPE xMacInitStatus = eMACInit; - -/*-----------------------------------------------------------*/ - -/* - * A deferred interrupt handler task that processes - */ -static void prvEMACHandlerTask( void * pvParameters ); - -/* - * Force a negotiation with the Switch or Router and wait for LS. - */ -static void prvEthernetUpdateConfig( BaseType_t xForce ); - -/* - * See if there is a new packet and forward it to the IP-task. - */ -static BaseType_t prvNetworkInterfaceInput( void ); - -#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) - -/* - * For LLMNR, an extra MAC-address must be configured to - * be able to receive the multicast messages. - */ - static void prvMACAddressConfig( ETH_HandleTypeDef * heth, - uint32_t ulIndex, - uint8_t * Addr ); -#endif - -/* - * Check if a given packet should be accepted. - */ -static BaseType_t xMayAcceptPacket( uint8_t * pucEthernetBuffer ); - -/* - * Initialise the TX descriptors. - */ -static void prvDMATxDescListInit( void ); - -/* - * Initialise the RX descriptors. - */ -static void prvDMARxDescListInit( void ); - -/* After packets have been sent, the network - * buffers will be released. */ -static void vClearTXBuffers( void ); - -/*-----------------------------------------------------------*/ - -#if ( ipconfigUSE_LLMNR == 1 ) - static const uint8_t xLLMNR_MACAddress[] = { 0x01, 0x00, 0x5E, 0x00, 0x00, 0xFC }; -#endif - -static EthernetPhy_t xPhyObject; - -/* Ethernet handle. */ -static ETH_HandleTypeDef xETH; - -/* xTXDescriptorSemaphore is a counting semaphore with - * a maximum count of ETH_TXBUFNB, which is the number of - * DMA TX descriptors. */ -static SemaphoreHandle_t xTXDescriptorSemaphore = NULL; - -/* - * Note: it is advised to define both - * - * #define ipconfigZERO_COPY_RX_DRIVER 1 - * #define ipconfigZERO_COPY_TX_DRIVER 1 - * - * The method using memcpy is slower and probably uses more RAM memory. - * The possibility is left in the code just for comparison. - * - * It is advised to define ETH_TXBUFNB at least 4. Note that no - * TX buffers are allocated in a zero-copy driver. - */ -/* MAC buffers: ---------------------------------------------------------*/ - -/* Put the DMA descriptors in '.first_data'. - * This is important for STM32F7, which has an L1 data cache. - * The first 64KB of the SRAM is not cached. - * See README.TXT in this folder. */ - -/* Ethernet Rx MA Descriptor */ -__attribute__( ( aligned( 32 ) ) ) -#if defined( STM32F7xx ) - __attribute__( ( section( ".first_data" ) ) ) -#endif -ETH_DMADescTypeDef DMARxDscrTab[ ETH_RXBUFNB ]; - -#if ( ipconfigZERO_COPY_RX_DRIVER == 0 ) - /* Ethernet Receive Buffer */ - __ALIGN_BEGIN uint8_t Rx_Buff[ ETH_RXBUFNB ][ ETH_RX_BUF_SIZE ] __ALIGN_END; -#endif - -/* Ethernet Tx DMA Descriptor */ -__attribute__( ( aligned( 32 ) ) ) -#if defined( STM32F7xx ) - __attribute__( ( section( ".first_data" ) ) ) -#endif -ETH_DMADescTypeDef DMATxDscrTab[ ETH_TXBUFNB ]; - -#if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) - /* Ethernet Transmit Buffer */ - __ALIGN_BEGIN uint8_t Tx_Buff[ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END; -#endif - -/* DMATxDescToClear points to the next TX DMA descriptor - * that must be cleared by vClearTXBuffers(). */ -static __IO ETH_DMADescTypeDef * DMATxDescToClear; - -/* Holds the handle of the task used as a deferred interrupt processor. The - * handle is used so direct notifications can be sent to the task for all EMAC/DMA - * related interrupts. */ -static TaskHandle_t xEMACTaskHandle = NULL; - -/* For local use only: describe the PHY's properties: */ -const PhyProperties_t xPHYProperties = -{ - #if ( ipconfigETHERNET_AN_ENABLE != 0 ) - .ucSpeed = PHY_SPEED_AUTO, - .ucDuplex = PHY_DUPLEX_AUTO, - #else - #if ( ipconfigETHERNET_USE_100MB != 0 ) - .ucSpeed = PHY_SPEED_100, - #else - .ucSpeed = PHY_SPEED_10, - #endif - - #if ( ipconfigETHERNET_USE_FULL_DUPLEX != 0 ) - .ucDuplex = PHY_DUPLEX_FULL, - #else - .ucDuplex = PHY_DUPLEX_HALF, - #endif - #endif /* if ( ipconfigETHERNET_AN_ENABLE != 0 ) */ - - #if ( ipconfigETHERNET_AN_ENABLE != 0 ) && ( ipconfigETHERNET_AUTO_CROSS_ENABLE != 0 ) - .ucMDI_X = PHY_MDIX_AUTO, - #elif ( ipconfigETHERNET_CROSSED_LINK != 0 ) - .ucMDI_X = PHY_MDIX_CROSSED, - #else - .ucMDI_X = PHY_MDIX_DIRECT, - #endif -}; - -/*-----------------------------------------------------------*/ - -void HAL_ETH_RxCpltCallback( ETH_HandleTypeDef * heth ) -{ - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - ( void ) heth; - - /* Pass an RX-event and wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - xTaskNotifyFromISR( xEMACTaskHandle, EMAC_IF_RX_EVENT, eSetBits, &( xHigherPriorityTaskWoken ) ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } + enet_deinit(); + return pdTRUE; } -/*-----------------------------------------------------------*/ -void HAL_ETH_TxCpltCallback( ETH_HandleTypeDef * heth ) -{ - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - - ( void ) heth; - - /* Pass a TX-event and wakeup the prvEMACHandlerTask. */ - if( xEMACTaskHandle != NULL ) - { - xTaskNotifyFromISR( xEMACTaskHandle, EMAC_IF_TX_EVENT, eSetBits, &( xHigherPriorityTaskWoken ) ); - portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); - } +/** + \fn int32_t ARM_ETH_MAC_PowerControl (ARM_POWER_STATE state) + \brief Control Ethernet MAC Device Power. + \param[in] state Power state + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_PowerControl (ARM_POWER_STATE state) +{ + return pdTRUE; } -/*-----------------------------------------------------------*/ - -static void vClearTXBuffers() +/** + \fn int32_t ARM_ETH_MAC_GetMacAddress (ARM_ETH_MAC_ADDR *ptr_addr) + \brief Get Ethernet MAC Address. + \param[in] ptr_addr Pointer to address + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_GetMacAddress (ARM_ETH_MAC_ADDR *ptr_addr) { - __IO ETH_DMADescTypeDef * txLastDescriptor = xETH.TxDesc; - size_t uxCount = ( ( UBaseType_t ) ETH_TXBUFNB ) - uxSemaphoreGetCount( xTXDescriptorSemaphore ); - - #if ( ipconfigZERO_COPY_TX_DRIVER != 0 ) - NetworkBufferDescriptor_t * pxNetworkBuffer; - uint8_t * ucPayLoad; - #endif - - /* This function is called after a TX-completion interrupt. - * It will release each Network Buffer used in xNetworkInterfaceOutput(). - * 'uxCount' represents the number of descriptors given to DMA for transmission. - * After sending a packet, the DMA will clear the 'ETH_DMATXDESC_OWN' bit. */ - while( ( uxCount > 0 ) && ( ( DMATxDescToClear->Status & ETH_DMATXDESC_OWN ) == 0 ) ) - { - if( ( DMATxDescToClear == txLastDescriptor ) && ( uxCount != ETH_TXBUFNB ) ) - { - break; - } - - #if ( ipconfigZERO_COPY_TX_DRIVER != 0 ) - { - ucPayLoad = ( uint8_t * ) DMATxDescToClear->Buffer1Addr; - - if( ucPayLoad != NULL ) - { - pxNetworkBuffer = pxPacketBuffer_to_NetworkBuffer( ucPayLoad ); - - if( pxNetworkBuffer != NULL ) - { - vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer ); - } - - DMATxDescToClear->Buffer1Addr = ( uint32_t ) 0u; - } - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - DMATxDescToClear = ( ETH_DMADescTypeDef * ) ( DMATxDescToClear->Buffer2NextDescAddr ); - - uxCount--; - /* Tell the counting semaphore that one more TX descriptor is available. */ - xSemaphoreGive( xTXDescriptorSemaphore ); - } + enet_mac_address_get(ENET_MAC_ADDRESS0, (uint8_t*)&ptr_addr->b[0]); + enet_mac_address_get(ENET_MAC_ADDRESS1, (uint8_t*)&ptr_addr->b[1]); + enet_mac_address_get(ENET_MAC_ADDRESS2, (uint8_t*)&ptr_addr->b[2]); + enet_mac_address_get(ENET_MAC_ADDRESS3, (uint8_t*)&ptr_addr->b[3]); + + return pdTRUE; } -/*-----------------------------------------------------------*/ +/** + \fn int32_t ARM_ETH_MAC_SetMacAddress (const ARM_ETH_MAC_ADDR *ptr_addr) + \brief Set Ethernet MAC Address. + \param[in] ptr_addr Pointer to address + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_SetMacAddress (const ARM_ETH_MAC_ADDR *ptr_addr) +{ + enet_mac_address_set(ENET_MAC_ADDRESS0, (uint8_t*)&ptr_addr->b[0]); + enet_mac_address_set(ENET_MAC_ADDRESS1, (uint8_t*)&ptr_addr->b[1]); + enet_mac_address_set(ENET_MAC_ADDRESS2, (uint8_t*)&ptr_addr->b[2]); + enet_mac_address_set(ENET_MAC_ADDRESS3, (uint8_t*)&ptr_addr->b[3]); + + return pdTRUE; +} + +/** + \fn int32_t ARM_ETH_MAC_SetAddressFilter (const ARM_ETH_MAC_ADDR *ptr_addr, + uint32_t num_addr) + \brief Configure Address Filter. + \param[in] ptr_addr Pointer to addresses + \param[in] num_addr Number of addresses to configure + \return \ref execution_status +*/ +int32_t ARM_ETH_MAC_SetAddressFilter (const ARM_ETH_MAC_ADDR *ptr_addr, uint32_t num_addr) +{ + //enet_address_filter_config(ENET_ADDRESS_FILTER_DA + return pdTRUE; +} +/** + \fn int32_t ARM_ETH_MAC_SendFrame (const uint8_t *frame, uint32_t len, uint32_t flags) + \brief Send Ethernet frame. + \param[in] frame Pointer to frame buffer with data to send + \param[in] len Frame buffer length in bytes + \param[in] flags Frame transmit flags (see ARM_ETH_MAC_TX_FRAME_...) + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_ReadFrame (uint8_t *frame, uint32_t len) + \brief Read data of received Ethernet frame. + \param[in] frame Pointer to frame buffer for data to read into + \param[in] len Frame buffer length in bytes + \return number of data bytes read or execution status + - value >= 0: number of data bytes read + - value < 0: error occurred, value is execution status as defined with \ref execution_status +*/ +/** + \fn uint32_t ARM_ETH_MAC_GetRxFrameSize (void) + \brief Get size of received Ethernet frame. + \return number of bytes in received frame +*/ +/** + \fn int32_t ARM_ETH_MAC_GetRxFrameTime (ARM_ETH_MAC_TIME *time) + \brief Get time of received Ethernet frame. + \param[in] time Pointer to time structure for data to read into + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_GetTxFrameTime (ARM_ETH_MAC_TIME *time) + \brief Get time of transmitted Ethernet frame. + \param[in] time Pointer to time structure for data to read into + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_Control (uint32_t control, uint32_t arg) + \brief Control Ethernet Interface. + \param[in] control Operation + \param[in] arg Argument of operation (optional) + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_ControlTimer (uint32_t control, ARM_ETH_MAC_TIME *time) + \brief Control Precision Timer. + \param[in] control Operation + \param[in] time Pointer to time structure + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_PHY_Read (uint8_t phy_addr, uint8_t reg_addr, uint16_t *data) + \brief Read Ethernet PHY Register through Management Interface. + \param[in] phy_addr 5-bit device address + \param[in] reg_addr 5-bit register address + \param[out] data Pointer where the result is written to + \return \ref execution_status +*/ +/** + \fn int32_t ARM_ETH_MAC_PHY_Write (uint8_t phy_addr, uint8_t reg_addr, uint16_t data) + \brief Write Ethernet PHY Register through Management Interface. + \param[in] phy_addr 5-bit device address + \param[in] reg_addr 5-bit register address + \param[in] data 16-bit data to write + \return \ref execution_status +*/ + +/** + \fn void ARM_ETH_MAC_SignalEvent (uint32_t event) + \brief Callback function that signals a Ethernet Event. + \param[in] event event notification mask + \return none +*/ +ARM_DRIVER_ETH_MAC Driver_ETH_MAC0 = {ARM_ETH_MAC_GetVersion, + ARM_ETH_MAC_GetCapabilities, + ARM_ETH_MAC_Initialize, + ARM_ETH_MAC_Uninitialize, + ARM_ETH_MAC_PowerControl, + ARM_ETH_MAC_GetMacAddress, + ARM_ETH_MAC_SetMacAddress, + ARM_ETH_MAC_SetAddressFilter, + ARM_ETH_MAC_SendFrame, + ARM_ETH_MAC_ReadFrame, + ARM_ETH_MAC_GetRxFrameSize, + ARM_ETH_MAC_GetRxFrameTime, + ARM_ETH_MAC_GetTxFrameTime, + ARM_ETH_MAC_ControlTimer, + ARM_ETH_MAC_Control, + ARM_ETH_MAC_PHY_Read, + ARM_ETH_MAC_PHY_Write}; + + + + +extern ARM_DRIVER_ETH_PHY ARM_Driver_ETH_PHY_(0); +#define Driver_ETH_PHY0 ARM_Driver_ETH_PHY_(0) + +/*callback function for ARM_ETH_MAC_SignalEvent_t*/ +void ethernet_mac_notify (uint32_t event) { + switch (event) { + case ARM_ETH_MAC_EVENT_RX_FRAME: + /*received frame,call receive fuction*/ + //led1_toggle(); + xTaskNotifyGive( receiveHandler ); + break; + + case ARM_ETH_MAC_EVENT_TX_FRAME: + /* deliver finished */ + break; + + case ARM_ETH_MAC_EVENT_WAKEUP: + break; + + case ARM_ETH_MAC_EVENT_TIMER_ALARM: + /* do nothing */ + break; + } +} + +/* init the mac */ +int32_t macIntialise(void) +{ + own_mac_address.b[0] = configMAC_ADDR0; + own_mac_address.b[1] = configMAC_ADDR1; + own_mac_address.b[2] = configMAC_ADDR2; + own_mac_address.b[3] = configMAC_ADDR3; + own_mac_address.b[4] = configMAC_ADDR4; + own_mac_address.b[5] = configMAC_ADDR5; + + + + mac = &Driver_ETH_MAC0; + capabilities = mac->GetCapabilities (); + + + + if(mac->Initialize (ethernet_mac_notify) == ARM_DRIVER_OK && mac->PowerControl (ARM_POWER_FULL) == ARM_DRIVER_OK){ + + if (capabilities.mac_address == 0) { + // populate own_mac_address with the address to use.-----the fact situation + mac->SetMacAddress(&own_mac_address); + } + else { + mac->GetMacAddress(&own_mac_address); + } + + return ARM_DRIVER_OK; + } + else{ + return ARM_DRIVER_ERROR; + } +} + +/* init the phy */ + int32_t phyIntialise(void){ + int32_t state = ARM_DRIVER_OK; + + /* link the mac and phy through MAC0.PHY_Read() and MAC0.PHY_write */ + if(Driver_ETH_PHY0.Initialize(Driver_ETH_MAC0.PHY_Read,Driver_ETH_MAC0.PHY_Write)!= ARM_DRIVER_OK){ + state = ARM_DRIVER_ERROR; + return state; + } + + /* power on */ + if(Driver_ETH_PHY0.PowerControl(ARM_POWER_FULL)!=ARM_DRIVER_OK){ + state = ARM_DRIVER_ERROR; + return state; + } + + /* set RMII interface */ + if(Driver_ETH_PHY0.SetInterface (capabilities.media_interface)!=ARM_DRIVER_OK){ + state = ARM_DRIVER_ERROR; + return state; + } + + /* set mode */ + if(Driver_ETH_PHY0.SetMode (ARM_ETH_PHY_AUTO_NEGOTIATE)!=ARM_DRIVER_OK){ + state = ARM_DRIVER_ERROR; + return state; + } + + return state; +} + +/*init the mac and phy*/ BaseType_t xNetworkInterfaceInitialise( void ) { - HAL_StatusTypeDef hal_eth_init_status; - BaseType_t xResult; - - #if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) - BaseType_t xMACEntry = ETH_MAC_ADDRESS1; /* ETH_MAC_ADDRESS0 reserved for the primary MAC-address. */ - #endif - - if( xMacInitStatus == eMACInit ) - { - xTXDescriptorSemaphore = xSemaphoreCreateCounting( ( UBaseType_t ) ETH_TXBUFNB, ( UBaseType_t ) ETH_TXBUFNB ); - - if( xTXDescriptorSemaphore == NULL ) - { - xMacInitStatus = eMACFailed; - } - else - { - /* Initialise ETH */ - - xETH.Instance = ETH; - xETH.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; - xETH.Init.Speed = ETH_SPEED_100M; - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - /* Value of PhyAddress doesn't matter, will be probed for. */ - xETH.Init.PhyAddress = 0; - - xETH.Init.MACAddr = ( uint8_t * ) FreeRTOS_GetMACAddress(); - xETH.Init.RxMode = ETH_RXINTERRUPT_MODE; - - #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - /* using the ETH_CHECKSUM_BY_HARDWARE option: - * both the IP and the protocol checksums will be calculated - * by the peripheral. */ - xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; - } - #else - { - xETH.Init.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE; - } - #endif - - #if ( ipconfigUSE_RMII != 0 ) - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; - } - #else - { - xETH.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII; - } - #endif /* ipconfigUSE_RMII */ - - hal_eth_init_status = HAL_ETH_Init( &xETH ); - - /* Only for inspection by debugger. */ - ( void ) hal_eth_init_status; - - /* Set the TxDesc and RxDesc pointers. */ - xETH.TxDesc = DMATxDscrTab; - xETH.RxDesc = DMARxDscrTab; - - /* Make sure that all unused fields are cleared. */ - memset( &DMATxDscrTab, '\0', sizeof( DMATxDscrTab ) ); - memset( &DMARxDscrTab, '\0', sizeof( DMARxDscrTab ) ); - - /* Initialize Tx Descriptors list: Chain Mode */ - DMATxDescToClear = DMATxDscrTab; - - /* Initialise TX-descriptors. */ - prvDMATxDescListInit(); - - /* Initialise RX-descriptors. */ - prvDMARxDescListInit(); - - #if ( ipconfigUSE_MDNS == 1 ) - { - /* Program the MDNS address. */ - prvMACAddressConfig( &xETH, xMACEntry, ( uint8_t * ) xMDNS_MACAddressIPv4 ); - xMACEntry += 8; - } - #endif - #if ( ipconfigUSE_LLMNR == 1 ) - { - /* Program the LLMNR address. */ - prvMACAddressConfig( &xETH, xMACEntry, ( uint8_t * ) xLLMNR_MACAddress ); - xMACEntry += 8; - } - #endif - - /* Force a negotiation with the Switch or Router and wait for LS. */ - prvEthernetUpdateConfig( pdTRUE ); - - /* The deferred interrupt handler task is created at the highest - * possible priority to ensure the interrupt handler can return directly - * to it. The task's handle is stored in xEMACTaskHandle so interrupts can - * notify the task when there is something to process. */ - if( xTaskCreate( prvEMACHandlerTask, "EMAC", configEMAC_TASK_STACK_SIZE, NULL, niEMAC_HANDLER_TASK_PRIORITY, &xEMACTaskHandle ) == pdPASS ) - { - /* The xTXDescriptorSemaphore and the task are created successfully. */ - xMacInitStatus = eMACPass; - } - else - { - xMacInitStatus = eMACFailed; - } - } - } /* if( xMacInitStatus == eMACInit ) */ - - if( xMacInitStatus != eMACPass ) - { - /* EMAC initialisation failed, return pdFAIL. */ - xResult = pdFAIL; - } - else - { - if( xPhyObject.ulLinkStatusMask != 0U ) - { - xETH.Instance->DMAIER |= ETH_DMA_ALL_INTS; - xResult = pdPASS; - FreeRTOS_printf( ( "Link Status is high\n" ) ); - } - else - { - /* For now pdFAIL will be returned. But prvEMACHandlerTask() is running - * and it will keep on checking the PHY and set 'ulLinkStatusMask' when necessary. */ - xResult = pdFAIL; - } - } - - /* When returning non-zero, the stack will become active and - * start DHCP (in configured) */ - return xResult; + static ARM_ETH_LINK_INFO info; + BaseType_t state = pdFALSE; + if(state == pdFALSE){ + state = xTaskCreate( receiveHandlerTask, "receiveHandlerTask", 1000, NULL, 1, &receiveHandler ); + } + + if(macIntialise() == ARM_DRIVER_OK && phyIntialise() ==ARM_DRIVER_OK){ + ARM_ETH_LINK_STATE link = Driver_ETH_PHY0.GetLinkState (); + + while(link != ARM_ETH_LINK_UP){ + link = Driver_ETH_PHY0.GetLinkState (); + } + + info = Driver_ETH_PHY0.GetLinkInfo (); + mac->Control(ARM_ETH_MAC_CONFIGURE, + info.speed << ARM_ETH_MAC_SPEED_Pos | + info.duplex << ARM_ETH_MAC_DUPLEX_Pos | + ARM_ETH_MAC_ADDRESS_BROADCAST); + mac->Control(ARM_ETH_MAC_CONTROL_TX, 1); + mac->Control(ARM_ETH_MAC_CONTROL_RX, 1); + return pdPASS; + } + else{ + //error + return pdFALSE; + } } /*-----------------------------------------------------------*/ -static void prvDMATxDescListInit() -{ - ETH_DMADescTypeDef * pxDMADescriptor; - BaseType_t xIndex; - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMATxDscrTab; - - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_TXBUFNB; xIndex++, pxDMADescriptor++ ) - { - /* Set Second Address Chained bit */ - pxDMADescriptor->Status = ETH_DMATXDESC_TCH; - - #if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t ) ( Tx_Buff[ xIndex ] ); - } - #endif - - if( xETH.Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE ) - { - /* Set the DMA Tx descriptors checksum insertion for TCP, UDP, and ICMP */ - pxDMADescriptor->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - } - else - { - pxDMADescriptor->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL ); - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_TXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMATxDscrTab; - } - } - - /* Set Transmit Descriptor List Address Register */ - xETH.Instance->DMATDLAR = ( uint32_t ) DMATxDscrTab; +/* send tcp/ip buffer to mac buffer */ +static void sendData(uint8_t *pucEthernetBuffer,size_t xDataLength){ + if(mac->SendFrame(pucEthernetBuffer,xDataLength,ARM_ETH_MAC_TX_FRAME_EVENT|ARM_ETH_MAC_TX_FRAME_TIMESTAMP) == ARM_DRIVER_OK){ + //success + } + else{ + //error + } } -/*-----------------------------------------------------------*/ -static void prvDMARxDescListInit() -{ - ETH_DMADescTypeDef * pxDMADescriptor; - BaseType_t xIndex; - /* - * RX-descriptors. - */ +/* send frame */ +#if ( ipconfigZERO_COPY_TX_DRIVER == 0) +/*the Simple network interfaces ,just use Ethernet peripheral driver library functions to copy +data from the FreeRTOS+TCP buffer into the peripheral driver's own buffer.*/ +BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor,BaseType_t xReleaseAfterSend ){ + /* Simple network interfaces (as opposed to more efficient zero copy network + interfaces) just use Ethernet peripheral driver library functions to copy + data from the FreeRTOS+TCP buffer into the peripheral driver's own buffer. + This example assumes SendData() is a peripheral driver library function that + takes a pointer to the start of the data to be sent and the length of the + data to be sent as two separate parameters. The start of the data is located + by pxDescriptor->pucEthernetBuffer. The length of the data is located + by pxDescriptor->xDataLength. */ + sendData( pxDescriptor->pucEthernetBuffer, pxDescriptor->xDataLength ); - /* Get the pointer on the first member of the descriptor list */ - pxDMADescriptor = DMARxDscrTab; + /* Call the standard trace macro to log the send event. */ + iptraceNETWORK_INTERFACE_TRANSMIT(); - /* Fill each DMA descriptor with the right values */ - for( xIndex = 0; xIndex < ETH_RXBUFNB; xIndex++, pxDMADescriptor++ ) - { - /* Set Buffer1 size and Second Address Chained bit */ - pxDMADescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | EMAC_DMA_BUFFER_SIZE; - - #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - NetworkBufferDescriptor_t * pxBuffer; - - pxBuffer = pxGetNetworkBufferWithDescriptor( EMAC_DMA_BUFFER_SIZE, 100ul ); - - /* If the assert below fails, make sure that there are at least 'ETH_RXBUFNB' - * Network Buffers available during start-up ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ) */ - configASSERT( pxBuffer != NULL ); - - if( pxBuffer != NULL ) - { - pxDMADescriptor->Buffer1Addr = ( uint32_t ) pxBuffer->pucEthernetBuffer; - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - } - #else /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ - { - /* Set Buffer1 address pointer */ - pxDMADescriptor->Buffer1Addr = ( uint32_t ) ( Rx_Buff[ xIndex ] ); - /* Set Own bit of the Rx descriptor Status */ - pxDMADescriptor->Status = ETH_DMARXDESC_OWN; - } - #endif /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if( xIndex < ETH_RXBUFNB - 1 ) - { - /* Set next descriptor address register with next descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) ( pxDMADescriptor + 1 ); - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - pxDMADescriptor->Buffer2NextDescAddr = ( uint32_t ) DMARxDscrTab; - } - } - - /* Set Receive Descriptor List Address Register */ - xETH.Instance->DMARDLAR = ( uint32_t ) DMARxDscrTab; -} -/*-----------------------------------------------------------*/ - -#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) - static void prvMACAddressConfig( ETH_HandleTypeDef * heth, - uint32_t ulIndex, - uint8_t * Addr ) - { - uint32_t ulTempReg; - - ( void ) heth; - - /* Calculate the selected MAC address high register. */ - ulTempReg = 0x80000000ul | ( ( uint32_t ) Addr[ 5 ] << 8 ) | ( uint32_t ) Addr[ 4 ]; - - /* Load the selected MAC address high register. */ - ( *( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_HBASE + ulIndex ) ) ) = ulTempReg; - - /* Calculate the selected MAC address low register. */ - ulTempReg = ( ( uint32_t ) Addr[ 3 ] << 24 ) | ( ( uint32_t ) Addr[ 2 ] << 16 ) | ( ( uint32_t ) Addr[ 1 ] << 8 ) | Addr[ 0 ]; - - /* Load the selected MAC address low register */ - ( *( __IO uint32_t * ) ( ( uint32_t ) ( ETH_MAC_ADDR_LBASE + ulIndex ) ) ) = ulTempReg; - } -#endif /* if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_MDNS != 0 ) */ -/*-----------------------------------------------------------*/ - -BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxDescriptor, - BaseType_t bReleaseAfterSend ) -{ - BaseType_t xReturn = pdFAIL; - uint32_t ulTransmitSize = 0; - __IO ETH_DMADescTypeDef * pxDmaTxDesc; -/* Do not wait too long for a free TX DMA buffer. */ - const TickType_t xBlockTimeTicks = pdMS_TO_TICKS( 50u ); - - /* Open a do {} while ( 0 ) loop to be able to call break. */ - do - { - #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - ProtocolPacket_t * pxPacket; - - /* If the peripheral must calculate the checksum, it wants - * the protocol checksum to have a value of zero. */ - pxPacket = ( ProtocolPacket_t * ) ( pxDescriptor->pucEthernetBuffer ); - - if( pxPacket->xICMPPacket.xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) - { - pxPacket->xICMPPacket.xICMPHeader.usChecksum = ( uint16_t ) 0u; - } - } - #endif /* ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM */ - - if( xPhyObject.ulLinkStatusMask != 0 ) - { - if( xSemaphoreTake( xTXDescriptorSemaphore, xBlockTimeTicks ) != pdPASS ) - { - /* Time-out waiting for a free TX descriptor. */ - break; - } - - /* This function does the actual transmission of the packet. The packet is - * contained in 'pxDescriptor' that is passed to the function. */ - pxDmaTxDesc = xETH.TxDesc; - - /* Is this buffer available? */ - configASSERT( ( pxDmaTxDesc->Status & ETH_DMATXDESC_OWN ) == 0 ); - - { - /* Is this buffer available? */ - /* Get bytes in current buffer. */ - ulTransmitSize = pxDescriptor->xDataLength; - - if( ulTransmitSize > EMAC_DMA_BUFFER_SIZE ) - { - ulTransmitSize = EMAC_DMA_BUFFER_SIZE; - } - - #if ( ipconfigZERO_COPY_TX_DRIVER == 0 ) - { - /* Copy the bytes. */ - memcpy( ( void * ) pxDmaTxDesc->Buffer1Addr, pxDescriptor->pucEthernetBuffer, ulTransmitSize ); - } - #else - { - configASSERT( bReleaseAfterSend != 0 ); - - /* Move the buffer. */ - pxDmaTxDesc->Buffer1Addr = ( uint32_t ) pxDescriptor->pucEthernetBuffer; - /* The Network Buffer has been passed to DMA, no need to release it. */ - bReleaseAfterSend = pdFALSE_UNSIGNED; - } - #endif /* ipconfigZERO_COPY_TX_DRIVER */ - - /* Ask to set the IPv4 checksum. - * Also need an Interrupt on Completion so that 'vClearTXBuffers()' will be called.. */ - #if ( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM != 0 ) - { - pxDmaTxDesc->Status |= ETH_DMATXDESC_CIC_TCPUDPICMP_FULL | ETH_DMATXDESC_IC; - } - #else - { - pxDmaTxDesc->Status &= ~( ( uint32_t ) ETH_DMATXDESC_CIC ); - pxDmaTxDesc->Status |= ETH_DMATXDESC_IC; - } - #endif - - - /* Prepare transmit descriptors to give to DMA. */ - - /* Set LAST and FIRST segment */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - /* Set frame size */ - pxDmaTxDesc->ControlBufferSize = ( ulTransmitSize & ETH_DMATXDESC_TBS1 ); - - #if ( NETWORK_BUFFERS_CACHED != 0 ) - { - BaseType_t xlength = CACHE_LINE_SIZE * ( ( ulTransmitSize + NETWORK_BUFFER_HEADER_SIZE + CACHE_LINE_SIZE - 1 ) / CACHE_LINE_SIZE ); - uint32_t * pulBuffer = ( uint32_t ) ( pxDescriptor->pucEthernetBuffer - NETWORK_BUFFER_HEADER_SIZE ); - cache_clean_invalidate_by_addr( pulBuffer, xlength ); - } - #endif - - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - pxDmaTxDesc->Status |= ETH_DMATXDESC_OWN; - - /* Point to next descriptor */ - xETH.TxDesc = ( ETH_DMADescTypeDef * ) ( xETH.TxDesc->Buffer2NextDescAddr ); - /* Ensure completion of memory access */ - __DSB(); - /* Resume DMA transmission*/ - xETH.Instance->DMATPDR = 0; - iptraceNETWORK_INTERFACE_TRANSMIT(); - xReturn = pdPASS; - } - } - else - { - /* The PHY has no Link Status, packet shall be dropped. */ - } - } while( 0 ); - - /* The buffer has been sent so can be released. */ - if( bReleaseAfterSend != pdFALSE ) + if( xReleaseAfterSend != pdFALSE ) { + /* It is assumed SendData() copies the data out of the FreeRTOS+TCP Ethernet + buffer. The Ethernet buffer is therefore no longer needed, and must be + freed for re-use. */ vReleaseNetworkBufferAndDescriptor( pxDescriptor ); } - return xReturn; -} -/*-----------------------------------------------------------*/ - -static BaseType_t xMayAcceptPacket( uint8_t * pucEthernetBuffer ) -{ - const ProtocolPacket_t * pxProtPacket = ( const ProtocolPacket_t * ) pucEthernetBuffer; - - switch( pxProtPacket->xTCPPacket.xEthernetHeader.usFrameType ) - { - case ipARP_FRAME_TYPE: - /* Check it later. */ - return pdTRUE; - - case ipIPv4_FRAME_TYPE: - /* Check it here. */ - break; - - default: - /* Refuse the packet. */ - return pdFALSE; - } - - #if ( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 1 ) - { - const IPHeader_t * pxIPHeader = &( pxProtPacket->xTCPPacket.xIPHeader ); - uint32_t ulDestinationIPAddress; - - /* Ensure that the incoming packet is not fragmented (only outgoing packets - * can be fragmented) as these are the only handled IP frames currently. */ - if( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_OFFSET_BIT_MASK ) != 0U ) - { - return pdFALSE; - } - - /* HT: Might want to make the following configurable because - * most IP messages have a standard length of 20 bytes */ - - /* 0x45 means: IPv4 with an IP header of 5 x 4 = 20 bytes - * 0x47 means: IPv4 with an IP header of 7 x 4 = 28 bytes */ - if( ( pxIPHeader->ucVersionHeaderLength < 0x45 ) || ( pxIPHeader->ucVersionHeaderLength > 0x4F ) ) - { - return pdFALSE; - } - - ulDestinationIPAddress = pxIPHeader->ulDestinationIPAddress; - - /* Is the packet for this node? */ - if( ( ulDestinationIPAddress != *ipLOCAL_IP_ADDRESS_POINTER ) && - /* Is it a broadcast address x.x.x.255 ? */ - ( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xff ) != 0xff ) && - #if ( ipconfigUSE_LLMNR == 1 ) - ( ulDestinationIPAddress != ipLLMNR_IP_ADDR ) && - #endif - ( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) ) - { - FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) ); - return pdFALSE; - } - - if( pxIPHeader->ucProtocol == ipPROTOCOL_UDP ) - { - #if ( ipconfigUSE_LLMNR == 1 ) || ( ipconfigUSE_MDNS == 1 ) || ( ipconfigUSE_NBNS == 1 ) || ( ipconfigUSE_DNS == 1 ) - uint16_t usSourcePort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usSourcePort ); - uint16_t usDestinationPort = FreeRTOS_ntohs( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ); - #endif - - if( ( xPortHasUDPSocket( pxProtPacket->xUDPPacket.xUDPHeader.usDestinationPort ) == pdFALSE ) - #if ipconfigUSE_LLMNR == 1 - && ( usDestinationPort != ipLLMNR_PORT ) && - ( usSourcePort != ipLLMNR_PORT ) - #endif - #if ipconfigUSE_MDNS == 1 - && ( usDestinationPort != ipMDNS_PORT ) && - ( usSourcePort != ipMDNS_PORT ) - #endif - #if ipconfigUSE_NBNS == 1 - && ( usDestinationPort != ipNBNS_PORT ) && - ( usSourcePort != ipNBNS_PORT ) - #endif - #if ipconfigUSE_DNS == 1 - && ( usSourcePort != ipDNS_PORT ) - #endif - ) - { - /* Drop this packet, not for this device. */ - /* FreeRTOS_printf( ( "Drop: UDP port %d -> %d\n", usSourcePort, usDestinationPort ) ); */ - return pdFALSE; - } - } - } - #endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */ return pdTRUE; } +#else +/*zero copy method here*/ + +#endif /*-----------------------------------------------------------*/ -static void prvPassEthMessages( NetworkBufferDescriptor_t * pxDescriptor ) -{ - IPStackEvent_t xRxEvent; +/*receive data func , will be notify after ARM_ETH_MAC_EVENT_RX_FRAME event*/ +#if (ipconfigZERO_COPY_RX_DRIVER==0) +static void receiveHandlerTask( void *pvParameters ){ + NetworkBufferDescriptor_t *receiveBufferDescriptor; + size_t xBytesReceived; + /* Used to indicate that xSendEventStructToIPTask() is being called becauseof an Ethernet receive event. */ + IPStackEvent_t xRxEvent; + + while(1){ + /* Wait for the Ethernet MAC interrupt to indicate that another packet + has been received. The task notification is used in a similar way to a + counting semaphore to count Rx events, but is a lot more efficient than + a semaphore. */ + ulTaskNotifyTake( pdFALSE, portMAX_DELAY ); + + /* See how much data was received. Here it is assumed ReceiveSize() is + a peripheral driver function that returns the number of bytes in the + received Ethernet frame. */ + xBytesReceived = mac->GetRxFrameSize(); + + if( xBytesReceived > 0 ){ + /* Allocate a network buffer descriptor that points to a buffer + large enough to hold the received frame. As this is the simple + rather than efficient example the received data will just be copied + into this buffer. */ + receiveBufferDescriptor = pxGetNetworkBufferWithDescriptor( xBytesReceived, 0 ); + if( receiveBufferDescriptor != NULL ){ + /* pxBufferDescriptor->pucEthernetBuffer now points to an Ethernet + buffer large enough to hold the received data. Copy the + received data into pcNetworkBuffer->pucEthernetBuffer. Here it + is assumed ReceiveData() is a peripheral driver function that + copies the received data into a buffer passed in as the function's + parameter. Remember! While is is a simple robust technique - + it is not efficient. An example that uses a zero copy technique + is provided further down this page. */ + mac->ReadFrame(receiveBufferDescriptor->pucEthernetBuffer,xBytesReceived); + receiveBufferDescriptor->xDataLength = xBytesReceived; + + /* See if the data contained in the received Ethernet frame needs + to be processed. NOTE! It is preferable to do this in + the interrupt service routine itself, which would remove the need + to unblock this task for packets that don't need processing. */ + if( eConsiderFrameForProcessing( receiveBufferDescriptor->pucEthernetBuffer )== eProcessBuffer ){ + /* The event about to be sent to the TCP/IP is an Rx event. */ + xRxEvent.eEventType = eNetworkRxEvent; - xRxEvent.eEventType = eNetworkRxEvent; - xRxEvent.pvData = ( void * ) pxDescriptor; + /* pvData is used to point to the network buffer descriptor that + now references the received data. */ + xRxEvent.pvData = ( void * ) receiveBufferDescriptor; + + /* Send the data to the TCP/IP stack. */ + if( xSendEventStructToIPTask( &xRxEvent, 0 ) == pdFALSE ){ + /* The buffer could not be sent to the IP task so the buffer must be released. */ + vReleaseNetworkBufferAndDescriptor( receiveBufferDescriptor ); - if( xSendEventStructToIPTask( &xRxEvent, ( TickType_t ) 1000 ) != pdPASS ) - { - /* The buffer could not be sent to the stack so must be released again. - * This is a deferred handler task, not a real interrupt, so it is ok to - * use the task level function here. */ - #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - do - { - NetworkBufferDescriptor_t * pxNext = pxDescriptor->pxNextBuffer; - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - pxDescriptor = pxNext; - } while( pxDescriptor != NULL ); - } - #else - { - vReleaseNetworkBufferAndDescriptor( pxDescriptor ); - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - iptraceETHERNET_RX_EVENT_LOST(); - FreeRTOS_printf( ( "prvPassEthMessages: Can not queue return packet!\n" ) ); - } - else - { - iptraceNETWORK_INTERFACE_RECEIVE(); - } + /* Make a call to the standard trace macro to log the occurrence. */ + iptraceETHERNET_RX_EVENT_LOST(); + }else{ + /* The message was successfully sent to the TCP/IP stack. + Call the standard trace macro to log the occurrence. */ + iptraceNETWORK_INTERFACE_RECEIVE(); + } + }else{ + /* The Ethernet frame can be dropped, but the Ethernet buffer + must be released. */ + vReleaseNetworkBufferAndDescriptor( receiveBufferDescriptor ); + } + + }else{ + /* The event was lost because a network buffer was not available. + Call the standard trace macro to log the occurrence. */ + iptraceETHERNET_RX_EVENT_LOST(); + } + } + } } +#else +/*zero copy method here*/ -static BaseType_t prvNetworkInterfaceInput( void ) -{ - #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - NetworkBufferDescriptor_t * pxFirstDescriptor = NULL; - NetworkBufferDescriptor_t * pxLastDescriptor = NULL; - #endif - BaseType_t xReceivedLength = 0; - __IO ETH_DMADescTypeDef * pxDMARxDescriptor; - const TickType_t xDescriptorWaitTime = pdMS_TO_TICKS( niDESCRIPTOR_WAIT_TIME_MS ); - uint8_t * pucBuffer; +#endif + - pxDMARxDescriptor = xETH.RxDesc; - - while( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_OWN ) == 0u ) - { - NetworkBufferDescriptor_t * pxCurDescriptor; - NetworkBufferDescriptor_t * pxNewDescriptor = NULL; - BaseType_t xAccepted = pdTRUE; - - /* Get the Frame Length of the received packet: subtract 4 bytes of the CRC */ - xReceivedLength = ( ( pxDMARxDescriptor->Status & ETH_DMARXDESC_FL ) >> ETH_DMARXDESC_FRAMELENGTHSHIFT ) - 4; - - pucBuffer = ( uint8_t * ) pxDMARxDescriptor->Buffer1Addr; - - /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ - /* Chained Mode */ - /* Selects the next DMA Rx descriptor list for next buffer to read */ - xETH.RxDesc = ( ETH_DMADescTypeDef * ) pxDMARxDescriptor->Buffer2NextDescAddr; - - /* In order to make the code easier and faster, only packets in a single buffer - * will be accepted. This can be done by making the buffers large enough to - * hold a complete Ethernet packet, minus ipBUFFER_PADDING. - * Therefore, two sanity checks: */ - configASSERT( xReceivedLength <= EMAC_DMA_BUFFER_SIZE ); - - if( ( pxDMARxDescriptor->Status & ( ETH_DMARXDESC_CE | ETH_DMARXDESC_IPV4HCE | ETH_DMARXDESC_FT ) ) != ETH_DMARXDESC_FT ) - { - /* Not an Ethernet frame-type or a checksum error. */ - xAccepted = pdFALSE; - } - else - { - /* See if this packet must be handled. */ - xAccepted = xMayAcceptPacket( pucBuffer ); - } - - if( xAccepted != pdFALSE ) - { - /* The packet will be accepted, but check first if a new Network Buffer can - * be obtained. If not, the packet will still be dropped. */ - pxNewDescriptor = pxGetNetworkBufferWithDescriptor( EMAC_DMA_BUFFER_SIZE, xDescriptorWaitTime ); - - if( pxNewDescriptor == NULL ) - { - /* A new descriptor can not be allocated now. This packet will be dropped. */ - xAccepted = pdFALSE; - } - } - - #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Find out which Network Buffer was originally passed to the descriptor. */ - pxCurDescriptor = pxPacketBuffer_to_NetworkBuffer( pucBuffer ); - configASSERT( pxCurDescriptor != NULL ); - } - #else - { - /* In this mode, the two descriptors are the same. */ - pxCurDescriptor = pxNewDescriptor; - - if( pxNewDescriptor != NULL ) - { - /* The packet is accepted and a new Network Buffer was created, - * copy data to the Network Buffer. */ - memcpy( pxNewDescriptor->pucEthernetBuffer, pucBuffer, xReceivedLength ); - } - } - #endif /* if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) */ - - if( xAccepted != pdFALSE ) - { - pxCurDescriptor->xDataLength = xReceivedLength; - #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - pxCurDescriptor->pxNextBuffer = NULL; - - if( pxFirstDescriptor == NULL ) - { - /* Becomes the first message */ - pxFirstDescriptor = pxCurDescriptor; - } - else if( pxLastDescriptor != NULL ) - { - /* Add to the tail */ - pxLastDescriptor->pxNextBuffer = pxCurDescriptor; - } - - pxLastDescriptor = pxCurDescriptor; - } - #else /* if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) */ - { - prvPassEthMessages( pxCurDescriptor ); - } - #endif /* if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) */ - } - - /* Release descriptors to DMA */ - #if ( ipconfigZERO_COPY_RX_DRIVER != 0 ) - { - /* Set Buffer1 address pointer */ - if( pxNewDescriptor != NULL ) - { - pxDMARxDescriptor->Buffer1Addr = ( uint32_t ) pxNewDescriptor->pucEthernetBuffer; - } - else - { - /* The packet was dropped and the same Network - * Buffer will be used to receive a new packet. */ - } - } - #endif /* ipconfigZERO_COPY_RX_DRIVER */ - - /* Set Buffer1 size and Second Address Chained bit */ - pxDMARxDescriptor->ControlBufferSize = ETH_DMARXDESC_RCH | EMAC_DMA_BUFFER_SIZE; - pxDMARxDescriptor->Status = ETH_DMARXDESC_OWN; - - /* Ensure completion of memory access */ - __DSB(); - - /* When Rx Buffer unavailable flag is set clear it and resume - * reception. */ - if( ( xETH.Instance->DMASR & ETH_DMASR_RBUS ) != 0 ) - { - /* Clear RBUS ETHERNET DMA flag. */ - xETH.Instance->DMASR = ETH_DMASR_RBUS; - - /* Resume DMA reception. */ - xETH.Instance->DMARPDR = 0; - } - - pxDMARxDescriptor = xETH.RxDesc; - } - - #if ( ipconfigUSE_LINKED_RX_MESSAGES != 0 ) - { - if( pxFirstDescriptor != NULL ) - { - prvPassEthMessages( pxFirstDescriptor ); - } - } - #endif /* ipconfigUSE_LINKED_RX_MESSAGES */ - - return( xReceivedLength > 0 ); -} -/*-----------------------------------------------------------*/ - - -BaseType_t xSTM32_PhyRead( BaseType_t xAddress, - BaseType_t xRegister, - uint32_t * pulValue ) -{ - uint16_t usPrevAddress = xETH.Init.PhyAddress; - BaseType_t xResult; - HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_ReadPHYRegister( &xETH, ( uint16_t ) xRegister, pulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -BaseType_t xSTM32_PhyWrite( BaseType_t xAddress, - BaseType_t xRegister, - uint32_t ulValue ) -{ - uint16_t usPrevAddress = xETH.Init.PhyAddress; - BaseType_t xResult; - HAL_StatusTypeDef xHALResult; - - xETH.Init.PhyAddress = xAddress; - xHALResult = HAL_ETH_WritePHYRegister( &xETH, ( uint16_t ) xRegister, ulValue ); - xETH.Init.PhyAddress = usPrevAddress; - - if( xHALResult == HAL_OK ) - { - xResult = 0; - } - else - { - xResult = -1; - } - - return xResult; -} -/*-----------------------------------------------------------*/ - -void vMACBProbePhy( void ) -{ - vPhyInitialise( &xPhyObject, xSTM32_PhyRead, xSTM32_PhyWrite ); - xPhyDiscover( &xPhyObject ); - xPhyConfigure( &xPhyObject, &xPHYProperties ); -} -/*-----------------------------------------------------------*/ - -static void prvEthernetUpdateConfig( BaseType_t xForce ) -{ - FreeRTOS_printf( ( "prvEthernetUpdateConfig: LS mask %02lX Force %d\n", - xPhyObject.ulLinkStatusMask, - ( int ) xForce ) ); - - if( ( xForce != pdFALSE ) || ( xPhyObject.ulLinkStatusMask != 0 ) ) - { - /* Restart the auto-negotiation. */ - if( xETH.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE ) - { - xPhyStartAutoNegotiation( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - - /* Configure the MAC with the Duplex Mode fixed by the - * auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucDuplex == PHY_DUPLEX_FULL ) - { - xETH.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - } - else - { - xETH.Init.DuplexMode = ETH_MODE_HALFDUPLEX; - } - - /* Configure the MAC with the speed fixed by the - * auto-negotiation process. */ - if( xPhyObject.xPhyProperties.ucSpeed == PHY_SPEED_10 ) - { - xETH.Init.Speed = ETH_SPEED_10M; - } - else - { - xETH.Init.Speed = ETH_SPEED_100M; - } - } - else /* AutoNegotiation Disable */ - { - /* Check parameters */ - assert_param( IS_ETH_SPEED( xETH.Init.Speed ) ); - assert_param( IS_ETH_DUPLEX_MODE( xETH.Init.DuplexMode ) ); - - if( xETH.Init.DuplexMode == ETH_MODE_FULLDUPLEX ) - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_HALF; - } - else - { - xPhyObject.xPhyPreferences.ucDuplex = PHY_DUPLEX_FULL; - } - - if( xETH.Init.Speed == ETH_SPEED_10M ) - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_10; - } - else - { - xPhyObject.xPhyPreferences.ucSpeed = PHY_SPEED_100; - } - - xPhyObject.xPhyPreferences.ucMDI_X = PHY_MDIX_AUTO; - - /* Use predefined (fixed) configuration. */ - xPhyFixedValue( &xPhyObject, xPhyGetMask( &xPhyObject ) ); - } - - /* ETHERNET MAC Re-Configuration */ - HAL_ETH_ConfigMAC( &xETH, ( ETH_MACInitTypeDef * ) NULL ); - - /* Restart MAC interface */ - HAL_ETH_Start( &xETH ); - } - else - { - /* Stop MAC interface */ - HAL_ETH_Stop( &xETH ); - } -} -/*-----------------------------------------------------------*/ - -BaseType_t xGetPhyLinkStatus( void ) -{ - BaseType_t xReturn; - - if( xPhyObject.ulLinkStatusMask != 0 ) - { - xReturn = pdPASS; - } - else - { - xReturn = pdFAIL; - } - - return xReturn; -} -/*-----------------------------------------------------------*/ - -/* Uncomment this in case BufferAllocation_1.c is used. */ - -void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] ) -{ - static - #if defined( STM32F7xx ) - __attribute__( ( section( ".first_data" ) ) ) - #endif - uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * ETH_MAX_PACKET_SIZE ] __attribute__( ( aligned( 32 ) ) ); - uint8_t * ucRAMBuffer = ucNetworkPackets; - uint32_t ul; - - for( ul = 0; ul < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; ul++ ) - { - pxNetworkBuffers[ ul ].pucEthernetBuffer = ucRAMBuffer + ipBUFFER_PADDING; - *( ( unsigned * ) ucRAMBuffer ) = ( unsigned ) ( &( pxNetworkBuffers[ ul ] ) ); - ucRAMBuffer += ETH_MAX_PACKET_SIZE; - } -} -/*-----------------------------------------------------------*/ - -static void prvEMACHandlerTask( void * pvParameters ) -{ - UBaseType_t uxCurrentCount; - BaseType_t xResult; - const TickType_t ulMaxBlockTime = pdMS_TO_TICKS( 100UL ); - uint32_t ulISREvents = 0U; - - /* Remove compiler warnings about unused parameters. */ - ( void ) pvParameters; - - for( ; ; ) - { - xResult = 0; - - #if ( ipconfigHAS_PRINTF != 0 ) - { - /* Call a function that monitors resources: the amount of free network - * buffers and the amount of free space on the heap. See FreeRTOS_IP.c - * for more detailed comments. */ - vPrintResourceStats(); - } - #endif /* ( ipconfigHAS_PRINTF != 0 ) */ - - if( xTXDescriptorSemaphore != NULL ) - { - static UBaseType_t uxLowestSemCount = ( UBaseType_t ) ETH_TXBUFNB - 1; - - uxCurrentCount = uxSemaphoreGetCount( xTXDescriptorSemaphore ); - - if( uxLowestSemCount > uxCurrentCount ) - { - uxLowestSemCount = uxCurrentCount; - FreeRTOS_printf( ( "TX DMA buffers: lowest %lu\n", uxLowestSemCount ) ); - } - } - - /* Wait for a new event or a time-out. */ - xTaskNotifyWait( 0U, /* ulBitsToClearOnEntry */ - EMAC_IF_ALL_EVENT, /* ulBitsToClearOnExit */ - &( ulISREvents ), /* pulNotificationValue */ - ulMaxBlockTime ); - - if( ( ulISREvents & EMAC_IF_RX_EVENT ) != 0 ) - { - xResult = prvNetworkInterfaceInput(); - } - - if( ( ulISREvents & EMAC_IF_TX_EVENT ) != 0 ) - { - /* Code to release TX buffers in case zero-copy is used. */ - /* Check if DMA packets have been delivered. */ - vClearTXBuffers(); - } - - if( ( ulISREvents & EMAC_IF_ERR_EVENT ) != 0 ) - { - /* Future extension: logging about errors that occurred. */ - } - - if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 ) - { - /* Something has changed to a Link Status, need re-check. */ - prvEthernetUpdateConfig( pdFALSE ); - } - } -} -/*-----------------------------------------------------------*/ - -void ETH_IRQHandler( void ) -{ - HAL_ETH_IRQHandler( &xETH ); -} diff --git a/Test_project_for_GD32107C-EVAL.uvguix.right b/Test_project_for_GD32107C-EVAL.uvguix.right index 9cd613d..292cbf8 100644 --- a/Test_project_for_GD32107C-EVAL.uvguix.right +++ b/Test_project_for_GD32107C-EVAL.uvguix.right @@ -70,7 +70,7 @@ 466 Source Browser 500 - 166 + 300 @@ -110,8 +110,8 @@ 0 - 1973 - 0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000D0000000C0000000100000065443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C44656D6F5461736B735C53696D706C655443504563686F5365727665722E63000000001553696D706C655443504563686F5365727665722E6300000000CACAD500FFFFFFFF4C443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C6D61696E2E6300000000066D61696E2E6300000000FFDC7800FFFFFFFF63443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C4672656552544F535F49502E63000000000D4672656552544F535F49502E6300000000F7B88600FFFFFFFF78443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C696E636C7564655C4672656552544F534950436F6E66696744656661756C74732E68000000001A4672656552544F534950436F6E66696744656661756C74732E6800000000D9ADC200FFFFFFFF69443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C4672656552544F535F49505F5574696C732E6300000000134672656552544F535F49505F5574696C732E6300000000BCA8E100FFFFFFFF6B443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C696E636C7564655C4672656552544F535F49502E68000000000D4672656552544F535F49502E68000000009CC1B600FFFFFFFF70443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C696E636C7564655C4672656552544F534950436F6E6669672E6800000000124672656552544F534950436F6E6669672E6800000000F7B88600FFFFFFFF5F443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C5254455C52544F535C4672656552544F53436F6E6669672E6800000000104672656552544F53436F6E6669672E6800000000D9ADC200FFFFFFFF55433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C41524D5C434D5349532D4672656552544F535C31302E352E315C536F757263655C6576656E745F67726F7570732E63000000000E6576656E745F67726F7570732E6300000000A5C2D700FFFFFFFF71443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C5254455C4465766963655C474433324631303756435C737461727475705F67643332663130785F636C2E730000000015737461727475705F67643332663130785F636C2E7300000000B3A6BE00FFFFFFFF62433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C41524D5C434D5349532D4672656552544F535C31302E352E315C536F757263655C706F727461626C655C4743435C41524D5F434D335C706F72742E630000000006706F72742E6300000000EAD6A300FFFFFFFF68443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C4672656552544F535F536F636B6574732E6300000000124672656552544F535F536F636B6574732E6300000000F6FA7D00FFFFFFFF8F443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C706F727461626C655C4E6574776F726B496E746572666163655C626F6172645F66616D696C795C4E6574776F726B496E746572666163652E6300000000124E6574776F726B496E746572666163652E6300000000B5E99D00FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000009301000081000000000A000022040000 + 1579 + 0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000B0000000A000000010000008F443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C706F727461626C655C4E6574776F726B496E746572666163655C626F6172645F66616D696C795C4E6574776F726B496E746572666163652E6300000000124E6574776F726B496E746572666163652E6300000000B5E99D00FFFFFFFF5B433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C41524D5C434D5349535C352E392E305C434D5349535C4472697665725C496E636C7564655C4472697665725F4554485F4D41432E6800000000104472697665725F4554485F4D41432E6800000000BECEA100FFFFFFFF6B443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C5254455C4465766963655C474433324631303756435C67643332663130785F656E65742E63000000000F67643332663130785F656E65742E6300000000BECEA100FFFFFFFF73433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C476967614465766963655C47443332463130785F4446505C322E302E335C4465766963655C4669726D776172655C5065726970686572616C735C696E635C67643332663130785F656E65742E68000000000F67643332663130785F656E65742E6800000000F0A0A100FFFFFFFF70443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C4672656552544F535C736F757263655C696E636C7564655C4E6574776F726B496E746572666163652E6800000000124E6574776F726B496E746572666163652E6800000000BCA8E100FFFFFFFF5A433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C41524D5C434D5349535C352E392E305C434D5349535C4472697665725C496E636C7564655C4472697665725F436F6D6D6F6E2E68000000000F4472697665725F436F6D6D6F6E2E68000000009CC1B600FFFFFFFF5D433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C476967614465766963655C47443332463130785F4446505C322E302E335C4465766963655C496E636C7564655C67643332663130782E68000000000A67643332663130782E6800000000D9ADC200FFFFFFFF4E433A5C55736572735C557365725C417070446174615C4C6F63616C5C41726D5C5061636B735C41524D5C434D5349532D4672656552544F535C31302E352E315C536F757263655C7461736B732E6300000000077461736B732E6300000000A5C2D700FFFFFFFF71443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C5254455C4465766963655C474433324631303756435C737461727475705F67643332663130785F636C2E730000000015737461727475705F67643332663130785F636C2E7300000000B3A6BE00FFFFFFFF4C443A5C55736572735C72696768745C446F63756D656E74735C4B65696C5C50726F6A656374735C546573745F70726F6A6563745F666F725F47443332313037432D4556414C5C6D61696E2E6300000000066D61696E2E6300000000EAD6A300FFFFFFFF29433A5C4B65696C5F76355C41524D5C41524D434C414E475C696E636C7564655C737464626F6F6C2E680000000009737464626F6F6C2E6800000000EAD6A300FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000008B01000081000000000A00007E030000 @@ -120,7 +120,7 @@ -1 -1 - 0 + 1 0 0 0 @@ -130,11 +130,11 @@ 0 16 - 440100005F0000006A0700001D010000 + 000000005F000000870100005C030000 16 - 44010000810000006A0700003F010000 + 0000000081000000870100007E030000 @@ -150,11 +150,11 @@ 0 16 - 03000000830000008C010000DD030000 + 03000000830000008401000039030000 16 - EF000000110100002F0200001E020000 + E6030000A70100007505000048050000 @@ -170,11 +170,11 @@ 0 16 - 03000000830000008C010000DD030000 + 03000000830000008401000039030000 16 - EF000000110100006A02000009040000 + E6030000A70100007505000048050000 @@ -450,11 +450,11 @@ 0 16 - 03000000830000008C010000DD030000 + 03000000830000008401000039030000 16 - EF000000110100006A02000009040000 + E6030000A70100007505000048050000 @@ -470,11 +470,11 @@ 0 16 - 03000000830000008C010000DD030000 + 03000000830000008401000039030000 16 - EF000000110100006A02000009040000 + E6030000A70100007505000048050000 @@ -490,11 +490,11 @@ 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF00000011010000A4040000CF010000 + 1E010000F20400001E0B000013060000 @@ -526,15 +526,15 @@ 0 32767 0 - 4096 + 32768 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF00000011010000A4040000CF010000 + 1E010000F20400001E0B000013060000 @@ -1150,11 +1150,11 @@ 0 16 - 03000000830000008C010000DD030000 + 03000000830000008401000039030000 16 - EF000000110100006A02000009040000 + E6030000A70100007505000048050000 @@ -1166,15 +1166,15 @@ 0 32767 0 - 4096 + 32768 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF00000011010000A4040000CF010000 + 1E010000F20400001E0B000013060000 @@ -1186,15 +1186,15 @@ 0 32767 0 - 4096 + 32768 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF000000110100006A02000009040000 + 1E010000F20400001E0B000013060000 @@ -1246,15 +1246,15 @@ 0 32767 0 - 4096 + 32768 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF000000110100006A02000009040000 + 1E010000F20400001E0B000013060000 @@ -1266,15 +1266,15 @@ 0 32767 0 - 4096 + 32768 0 16 - 0300000028040000FD09000002050000 + 0300000084030000FD09000002050000 16 - EF000000110100006A02000009040000 + 1E010000F20400001E0B000013060000 @@ -1798,15 +1798,15 @@ - 3348 - 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFF440100001D0100006A07000021010000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E65002000000000000044010000810000006A0700003F010000440100005F0000006A0700001D0100000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF260600005F0000002A060000D7020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000002A060000810000006A070000F90200002A0600005F0000006A070000D702000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF8F0100005F0000009301000000040000010000000200001004000000010000000CFEFFFF01080000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000000000000810000008F01000022040000000000005F0000008F010000000400000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF00000000B60200006A070000BA02000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB0900000180008000000000000000000000DC0200006A070000BB03000000000000BA0200006A0700009903000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFB5030000BA020000B90300009903000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF0000000000040000000A00000404000001000000010000100400000001000000AEFDFFFF69020000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF01000077940000018000800000010000000000000026040000000A0000470500000000000004040000000A0000250500000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF32416C6C205265666572656E636573206F6620276970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B2701000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + 3369 + 000000000B000000000000000010000001000000FFFFFFFFFFFFFFFF870100005F0000008B0100005C03000001000000020000100400000001000000000000000000000000000000000000000000000001000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000FFFF02000B004354616262656450616E6500100000010000000000000081000000870100007E030000000000005F000000870100005C0300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000020000000000000FFFFFFFFFFFFFFFF440100001D0100006A07000021010000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D6010000458900000180002000000000000044010000810000006A0700003F010000440100005F0000006A0700001D0100000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF260600005F0000002A060000D7020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000002A060000810000006A070000F90200002A0600005F0000006A070000D702000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000080000000000000FFFFFFFFFFFFFFFF00000000B60200006A070000BA02000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB0900000180008000000000000000000000DC0200006A070000BB03000000000000BA0200006A0700009903000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFB5030000BA020000B90300009903000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF000000005C030000000A0000600300000100000001000010040000000100000039FCFFFFF400000000000000000000000000000001000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF01000077940000018000800000010000000000000082030000000A0000470500000000000060030000000A0000250500000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF1F416C6C205265666572656E636573206F662027656E65745F6465696E69742701000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 59392 File - 3041 - 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B960000000000000013001E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B0438313932216D61696E53494D504C455F5544505F434C49454E545F5345525645525F504F525400157072764D697363496E697469616C69736174696F6E19544553545F52554E4E45525F52756E54657374735F7461736B1E764170706C69636174696F6E49504E6574776F726B4576656E74486F6F6B1B544553545F52554E4E45525F5441534B5F535441434B5F53495A450C636F6E6669674153534552540F636F6E6669674D41435F41444452301B784170706C69636174696F6E47657452616E646F6D4E756D6265721963727970746F5348413235365F4449474553545F42595445531723696E636C7564652022696F745F63727970746F2E682206784576656E74174E6574776F726B4275666665724D616E6167656D656E7424636F6E6669674D41585F53595343414C4C5F494E544552525550545F5052494F524954590B646566696E6974696F6E7317784E6574776F726B496E746572666163654F757470757408784E6574776F726B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000000180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65F1010000 + 3025 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001241524D5F4452495645525F4554485F4D4143960000000000000014000F4765744361706162696C69746965731241524D5F4452495645525F4554485F4D41430F4472697665725F4554485F4D4143302E42617365547970655F7420784E6574776F726B496E74657266616365496E697469616C6973652820766F6964202905737461746517656E65745F64657363726970746F72735F7374727563741448414C5F4554485F5374617465547970654465661B23646566696E65204554485F5479706544656620202020766F69640B4554485F54797065446566000478455448114554485F48616E646C655479706544656611784765745068794C696E6B53746174757325764E6574776F726B496E74657266616365416C6C6F6361746552414D546F4275666665727317784E6574776F726B496E746572666163654F757470757404656E756D1E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B0438313932216D61696E53494D504C455F5544505F434C49454E545F5345525645525F504F5254157072764D697363496E697469616C69736174696F6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65F1010000 1423 @@ -1822,7 +1822,7 @@ Build 976 - 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C642F010000 + 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0000000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C642F010000 583 @@ -1838,7 +1838,7 @@ Debug 2373 - 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720000000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7200000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756747010000 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756747010000 898 @@ -1871,11 +1871,11 @@ 0 16 - 440100005F000000D40700001F010000 + 440100005F000000D40700003E010000 16 - 4401000081000000D407000041010000 + 4401000081000000D407000060010000 @@ -2031,7 +2031,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -2291,7 +2291,7 @@ 0 16 - 4401000080000000D40700001F010000 + 4401000080000000D40700003E010000 16 @@ -2311,7 +2311,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -2391,7 +2391,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -2411,7 +2411,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -2431,7 +2431,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -2451,7 +2451,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -3031,7 +3031,7 @@ 0 16 - 4701000083000000D1070000FC000000 + 4701000083000000D10700001B010000 16 @@ -3539,15 +3539,15 @@ - 3415 - 000000000C000000000000000020000001000000FFFFFFFFFFFFFFFF440100001F010000D4070000230100000100000001000010040000000100000076FEFFFF4E020000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E6500200000010000004401000081000000D407000041010000440100005F000000D40700001F0100000000000040280056080000000B446973617373656D626C7901000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF260600005F0000002A060000D7020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000002A060000810000006A070000F90200002A0600005F0000006A070000D702000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF400100005F0000004401000042040000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000000000000810000004001000064040000000000005F00000040010000420400000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73000000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7300000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657300000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273010000007394000001000000FFFFFFFFFFFFFFFF04000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000001000000FFFFFFFFFFFFFFFF0000000042040000D40700004604000001000000010000100400000001000000000000000000000000000000000000000000000001000000C60000000000000001000000000000000000000001000000FFFFFFFF0005000046040000040500002505000000000000020000000400000000000000000000000000000000000000000000000000000001000000C600000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF00000000D70200006A070000DB020000000000000100000004000000010000000000000000000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF010000779400000180008000000000000000000000FD0200006A070000BB03000000000000DB0200006A070000990300000000000040820046060000000C4275696C64204F757470757400000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0642726F777365000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000040000001000000FFFFFFFFFFFFFFFFD40700005F000000D807000025050000010000000200001004000000010000006AFAFFFF1B03000000000000000000000000000001000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800040000001000000D807000081000000000A000047050000D80700005F000000000A00002505000000000000404100560F0000001343616C6C20537461636B202B204C6F63616C73010000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031010000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203101000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFF0500000000000000000000000000000000000000000000000000000001000000FFFFFFFF8F07000001000000FFFFFFFF8F070000000000000000000000000000 + 3436 + 000000000C000000000000000020000001000000FFFFFFFFFFFFFFFF440100003E010000D4070000420100000100000001000010040000000100000029FEFFFF01020000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E6500200000010000004401000081000000D407000060010000440100005F000000D40700003E0100000000000040280056080000000B446973617373656D626C7901000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF260600005F0000002A060000D7020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000002A060000810000006A070000F90200002A0600005F0000006A070000D702000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF400100005F0000004401000042040000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000000000000810000004001000064040000000000005F00000040010000420400000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73000000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7300000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657300000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273010000007394000001000000FFFFFFFFFFFFFFFF04000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000001000000FFFFFFFFFFFFFFFF0000000042040000D40700004604000001000000010000100400000001000000000000000000000000000000000000000000000001000000C60000000000000001000000000000000000000001000000FFFFFFFF0005000046040000040500002505000000000000020000000400000000000000000000000000000000000000000000000000000001000000C600000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF00000000D70200006A070000DB020000000000000100000004000000010000000000000000000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF010000779400000180008000000000000000000000FD0200006A070000BB03000000000000DB0200006A070000990300000000000040820046060000000C4275696C64204F757470757400000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF23416C6C205265666572656E636573206F6620274765744361706162696C69746965732700000000CF01000001000000FFFFFFFFFFFFFFFF0642726F777365000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000040000001000000FFFFFFFFFFFFFFFFD40700005F000000D807000025050000010000000200001004000000010000006AFAFFFF1B03000000000000000000000000000001000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800040000001000000D807000081000000000A000047050000D80700005F000000000A00002505000000000000404100560F0000001343616C6C20537461636B202B204C6F63616C73010000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031010000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203101000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000001000000FFFFFFFF8F07000001000000FFFFFFFF8F070000000000000000000000000000 59392 File - 3041 - 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B960000000000000013001E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B0438313932216D61696E53494D504C455F5544505F434C49454E545F5345525645525F504F525400157072764D697363496E697469616C69736174696F6E19544553545F52554E4E45525F52756E54657374735F7461736B1E764170706C69636174696F6E49504E6574776F726B4576656E74486F6F6B1B544553545F52554E4E45525F5441534B5F535441434B5F53495A450C636F6E6669674153534552540F636F6E6669674D41435F41444452301B784170706C69636174696F6E47657452616E646F6D4E756D6265721963727970746F5348413235365F4449474553545F42595445531723696E636C7564652022696F745F63727970746F2E682206784576656E74174E6574776F726B4275666665724D616E6167656D656E7424636F6E6669674D41585F53595343414C4C5F494E544552525550545F5052494F524954590B646566696E6974696F6E7317784E6574776F726B496E746572666163654F757470757408784E6574776F726B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000100150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65D5030000 + 3035 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000000460000000000000000000000000000000001000000010000000180FE880000000000004500000000000000000000000000000000010000000100000001800B810000000000001300000000000000000000000000000000010000000100000001800C810000000000001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000001241524D5F4452495645525F4554485F4D4143960000000000000014001241524D5F4452495645525F4554485F4D41430F4472697665725F4554485F4D4143302E42617365547970655F7420784E6574776F726B496E74657266616365496E697469616C6973652820766F6964202905737461746517656E65745F64657363726970746F72735F7374727563741448414C5F4554485F5374617465547970654465661B23646566696E65204554485F5479706544656620202020766F69640B4554485F54797065446566000478455448114554485F48616E646C655479706544656611784765745068794C696E6B53746174757325764E6574776F726B496E74657266616365416C6C6F6361746552414D546F4275666665727317784E6574776F726B496E746572666163654F757470757404656E756D1E6970636F6E6669675553455F4E4554574F524B5F4556454E545F484F4F4B0438313932216D61696E53494D504C455F5544505F434C49454E545F5345525645525F504F5254157072764D697363496E697469616C69736174696F6E19544553545F52554E4E45525F52756E54657374735F7461736B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000300150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65D5030000 1423 @@ -3563,7 +3563,7 @@ Build 955 - 00200000000000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000000002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050FFFFFFFF00960000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64E1010000 + 00200000000000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0000000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000000002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050FFFFFFFF00960000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64E1010000 583 @@ -3579,7 +3579,7 @@ Debug 2362 - 00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020001002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F0100000200010032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000002000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000002000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756787020000 + 00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000004002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020001002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720000000000000000010000000000000001000000000000000000000001000000000013800F0100000200010032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000002000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7200000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000002000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756787020000 898 @@ -3603,84 +3603,75 @@ 0 100 - 12 + 10 - .\DemoTasks\SimpleTCPEchoServer.c - 0 - 140 - 150 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + 25 + 1479 + 1451 1 0 - .\main.c - 0 - 212 - 222 + C:\Users\User\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Driver\Include\Driver_ETH_MAC.h + 1 + 280 + 280 1 0 - .\FreeRTOS\source\FreeRTOS_IP.c - 0 - 823 - 838 - 1 - - 0 - - - FreeRTOS\source\include\FreeRTOSIPConfigDefaults.h - 42 - 313 - 348 - 1 - - 0 - - - .\FreeRTOS\source\FreeRTOS_IP_Utils.c - 0 - 419 - 429 - 1 - - 0 - - - FreeRTOS\source\include\FreeRTOS_IP.h - 36 - 286 + RTE/Device/GD32F107VC/gd32f10x_enet.c + 1 + 307 322 1 0 - FreeRTOS\source\include\FreeRTOSIPConfig.h - 38 - 1 - 42 - 1 - - 0 - - - RTE/RTOS/FreeRTOSConfig.h - 57 - 151 - 53 - 1 - - 0 - - - C:/Users/User/AppData/Local/Arm/Packs/ARM/CMSIS-FreeRTOS/10.5.1/Source/event_groups.c + C:\Users\User\AppData\Local\Arm\Packs\GigaDevice\GD32F10x_DFP\2.0.3\Device\Firmware\Peripherals\inc\gd32f10x_enet.h 0 - 188 - 198 + 40 + 41 + 1 + + 0 + + + FreeRTOS\source\include\NetworkInterface.h + 21 + 33 + 59 + 1 + + 0 + + + C:\Users\User\AppData\Local\Arm\Packs\ARM\CMSIS\5.9.0\CMSIS\Driver\Include\Driver_Common.h + 2 + 16 + 66 + 1 + + 0 + + + C:\Users\User\AppData\Local\Arm\Packs\GigaDevice\GD32F10x_DFP\2.0.3\Device\Include\gd32f10x.h + 0 + 299 + 315 + 1 + + 0 + + + C:/Users/User/AppData/Local/Arm/Packs/ARM/CMSIS-FreeRTOS/10.5.1/Source/tasks.c + 0 + 1210 + 1216 1 0 @@ -3695,28 +3686,19 @@ 0 - C:/Users/User/AppData/Local/Arm/Packs/ARM/CMSIS-FreeRTOS/10.5.1/Source/portable/GCC/ARM_CM3/port.c + .\main.c 0 - 269 - 294 + 535 + 572 1 0 - .\FreeRTOS\source\FreeRTOS_Sockets.c - 1 - 264 - 274 - 1 - - 0 - - - .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c - 0 - 38 - 75 + C:\Keil_v5\ARM\ARMCLANG\include\stdbool.h + 22 + 1 + 15 1 0 diff --git a/Test_project_for_GD32107C-EVAL.uvoptx b/Test_project_for_GD32107C-EVAL.uvoptx index 1e41805..6124c5f 100644 --- a/Test_project_for_GD32107C-EVAL.uvoptx +++ b/Test_project_for_GD32107C-EVAL.uvoptx @@ -157,54 +157,70 @@ 0 0 - 476 + 1495 1 -
0
+
134235448
0 0 0 0 0 - 0 - C:/Users/User/AppData/Local/Arm/Packs/ARM/CMSIS-FreeRTOS/10.5.1/Source/event_groups.c + 1 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c - + \\Test_project_for_GD32107C_EVAL\FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c\1495
1 0 - 75 + 1493 1 -
0
+
134235428
0 0 0 0 0 - 0 + 1 .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c - + \\Test_project_for_GD32107C_EVAL\FreeRTOS/source/portable/NetworkInterface/board_family/NetworkInterface.c\1493
2 0 - 64 + 243 1 -
0
+
134261588
0 0 0 0 0 - 0 - .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + 1 + .\main.c - + \\Test_project_for_GD32107C_EVAL\main.c\243
3 0 + 2568 + 1 +
2
+ 0 + 0 + 0 + 0 + 0 + 1 + C:/Users/User/AppData/Local/Arm/Packs/ARM/CMSIS-FreeRTOS/10.5.1/Source/tasks.c + + \\Test_project_for_GD32107C_EVAL\tasks.c\2568 +
+ + 4 + 0 57 1
0
@@ -219,9 +235,121 @@
- 4 + 5 0 - 243 + 64 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 6 + 0 + 70 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 7 + 0 + 80 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 8 + 0 + 86 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 9 + 0 + 91 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 10 + 0 + 1502 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 11 + 0 + 1503 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c + + +
+ + 12 + 0 + 1 1
0
0 @@ -235,9 +363,89 @@
- 5 + 13 0 - 221 + 57 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + + +
+ + 14 + 0 + 64 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + + +
+ + 15 + 0 + 70 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + + +
+ + 16 + 0 + 80 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + + +
+ + 17 + 0 + 86 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\main.c + + +
+ + 18 + 0 + 91 1
0
0 @@ -262,6 +470,11 @@ 1 xBoundTCPSocketsList + + 2 + 1 + mac + @@ -379,7 +592,7 @@ FreeRTOS - 1 + 0 0 0 0 @@ -399,7 +612,7 @@ 2 6 1 - 1 + 0 0 0 .\FreeRTOS\source\FreeRTOS_IP.c @@ -666,8 +879,8 @@ 0 0 0 - .\FreeRTOS\source\portable\BufferManagement\BufferAllocation_1.c - BufferAllocation_1.c + .\FreeRTOS\source\portable\BufferManagement\BufferAllocation_2.c + BufferAllocation_2.c 0 0 @@ -683,7 +896,7 @@ ::CMSIS Driver - 0 + 1 0 0 1 @@ -699,7 +912,7 @@ ::Device - 0 + 1 0 0 1 diff --git a/Test_project_for_GD32107C-EVAL.uvprojx b/Test_project_for_GD32107C-EVAL.uvprojx index ce94176..257c5f2 100644 --- a/Test_project_for_GD32107C-EVAL.uvprojx +++ b/Test_project_for_GD32107C-EVAL.uvprojx @@ -526,9 +526,9 @@ .\FreeRTOS\source\portable\NetworkInterface\board_family\NetworkInterface.c - BufferAllocation_1.c + BufferAllocation_2.c 1 - .\FreeRTOS\source\portable\BufferManagement\BufferAllocation_1.c + .\FreeRTOS\source\portable\BufferManagement\BufferAllocation_2.c @@ -972,6 +972,12 @@ + + + + + + @@ -1060,6 +1066,14 @@ + + RTE\Device\GD32F107VC\gd32f10x_dma.c + + + + + + RTE\Device\GD32F107VC\gd32f10x_enet.c