Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions source/portable/NetworkInterface/STM32/NetworkInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@

#if ipconfigIS_DISABLED( ipconfigPORT_SUPPRESS_WARNING )

#if defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE )
#warning "As of F7 V1.17.1 && F4 V1.28.0, a bug exists in the ETH HAL Driver where ETH_RX_BUF_SIZE is used instead of RxBuffLen, so ETH_RX_BUF_SIZE must == niEMAC_DATA_BUFFER_SIZE"
#if defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) && defined( STM32F4 )
#warning "As of F4 V1.28.0, a bug exists in the ETH HAL Driver where ETH_RX_BUF_SIZE is used instead of RxBuffLen, so ETH_RX_BUF_SIZE must == niEMAC_DATA_BUFFER_SIZE"
#endif

#if ipconfigIS_DISABLED( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM )
Expand Down Expand Up @@ -982,7 +982,7 @@ static BaseType_t prvEthConfigInit( ETH_HandleTypeDef * pxEthHandle,
pxEthHandle->Init.RxBuffLen = niEMAC_DATA_BUFFER_SIZE;
/* configASSERT( pxEthHandle->Init.RxBuffLen <= ETH_MAX_PACKET_SIZE ); */
configASSERT( pxEthHandle->Init.RxBuffLen % 4U == 0 );
#if ( defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) )
#if ( defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) && defined( STM32F4 ) )
configASSERT( pxEthHandle->Init.RxBuffLen == ETH_RX_BUF_SIZE );
#endif

Expand Down Expand Up @@ -1785,8 +1785,6 @@ static BaseType_t prvAcceptPacket( const NetworkBufferDescriptor_t * const pxDes

void ETH_IRQHandler( void )
{
traceISR_ENTER();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

traceISR_ENTER is part of the trace macros that got added to FreeRTOS kernel with FreeRTOS/FreeRTOS-Kernel#659

The change is part of the Kernel V11.0.0 and above.

I would suggest keeping it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I see

#ifndef traceISR_ENTER
    #define traceISR_ENTER()
#endif

What if I upgrade my +TCP and keep on using an older kernel?

 void ETH_IRQHandler( void )
 {
+
+    #if defined( traceISR_ENTER )
+        /* The following macro is defined in FreeRTOS.h
+         * in kernels "V11.2.0" or higher. */
+        traceISR_ENTER();
+    #endif

     ETH_HandleTypeDef * pxEthHandle = &xEthHandle;

Hi @ldehenni, thanks for you PR.

What about the above code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HTRamsey , are you OK with this PR?

@tony-josi-aws , shall we add a default declaration like:

+    #if defined( traceISR_ENTER )
+        /* The following macro is defined in FreeRTOS.h
+         * in kernels "V11.2.0" or higher. */
+        traceISR_ENTER();
+    #endif

Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me


ETH_HandleTypeDef * pxEthHandle = &xEthHandle;

xSwitchRequired = pdFALSE;
Expand Down