-
Notifications
You must be signed in to change notification settings - Fork 202
STM32 network interface bug fixes #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
It is not defined anywhere in TCP or FreeRTOS.
* The bug has been fixed in the F7 driver: STMicroelectronics/stm32f7xx-hal-driver@2770385 * After verification the drivers shipped with FreeRTOS-Plus-TCP contain the fix already. * The bug is still present for the F4 drivers. * Updated the warning accordingly. * Enforced assert only when compiling for STM32F4.
|
||
void ETH_IRQHandler( void ) | ||
{ | ||
traceISR_ENTER(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Thanks for taking time to contribute to FreeRTOS+TCP. |
STM32 network interface bug fixes
Description
All modifications are isolated to the STM32 networkinterface.c file.
A documented bug in the STM32 HAL drivers has since been fixed for the F7 port (STMicroelectronics/stm32f7xx-hal-driver@2770385).
I removed warnings and asserts related to said target (F7), but kept enforcing them for F4.
In the network driver traceISR_ENTER() is called but isn't defined anywhere, not in TCP or in FreeRTOS.
I have removed it, but defining an empty macro in the appropriate file would also work.
As it wasn't respecting the
iptraceXXX
I sepcifically didn't add it to the ip default macros.Test Steps
Compiling for STM32F7
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.