-
Notifications
You must be signed in to change notification settings - Fork 3k
Add ethernet support on NUCLEO_H743ZI board #11274
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
Conversation
*(.ethusbram) | ||
|
||
} >RAM_D2 AT> FLASH | ||
} |
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.
Maybe correct this ?
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.
done
@@ -475,6 +817,8 @@ void mbed_default_mac_address(char *mac) | |||
uint32_t word0 = *(uint32_t *)0x1FFF7A10; | |||
#elif defined (TARGET_STM32F7) | |||
uint32_t word0 = *(uint32_t *)0x1FF0F420; | |||
#elif defined (TARGET_STM32H7) | |||
uint32_t word0 = *(uint32_t *)0x1FF0F420; |
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.
Value to check
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.
Replaced with correct value (0x1FF1E800)
This port is based on : * CurryGuy ethernet branch : https://github.com/CurryGuy/mbed-os/tree/feature-stm32h7-emac * STM32 Cube example : Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS example Signed-off-by: Vincent Veron <[email protected]>
…am_heap Signed-off-by: Vincent Veron <[email protected]>
Signed-off-by: Vincent Veron <[email protected]>
targets/targets.json
Outdated
@@ -3221,9 +3222,13 @@ | |||
"macros_add": [ | |||
"STM32H743xx", | |||
"EXTRA_IDLE_STACK_REQUIRED", | |||
"MBED_TICKLESS" | |||
"MBED_TICKLESS", | |||
"ETH_IP_VERSION_V2" |
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.
cant find this used anywhere in this PR?
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.
This is used in features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp file. Used to differentiate H7 specific parts.
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.
Because github doesn't expand all files by default :-)
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.
I've missed that file ! I can see now. Wouldn't the config be better for this or ?
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.
You prefer to add this compilation switch in an other file ? Which one do you have in mind ? (features\netsocket\emac-drivers\TARGET_STM_EMAC\mbed_lib.json for example ?)
I need this switch to be activated for only H7 platform for now. Then, if this new hal is deployed on other platform, we will need to activate it also for those new platforms.
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.
This location seems correct to me - the target descriptor passing information to its drivers about which mode to select. (As long as the option is describing something concrete about the target, that is conceptually not locked to any particular driver implementation - so we mean this target has "V2 hardware" or "V2 HAL").
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.
you may move the stm32xx_emac_config.h file to the family specific folder and add this option there. this way you could tune the IP version per family (and later the thread stack size if needed)
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.
Code updated with @LMESTM solution. Effectively, user is not supposed to change this setting so the .json file can be misunderstanding.
Thanks all for comments and propositions !
@VVESTM, thank you for your changes. |
@ARMmbed/team-st-mcd @MarceloSalazar @facchinm |
This allows to specify which hal version to use for each family. It can also be used to modify the thread stack size. Signed-off-by: Vincent Veron <[email protected]>
CI started |
makes UDPSOCKET_ECHOTEST_BURST_NONBLOCK and UDPSOCKET_ECHOTEST_BURST failed. In the trace, we see only UDPSOCKET_ECHOTEST_BURST_NONBLOCK failed. For UDPSOCKET_ECHOTEST_BURST, we have : Packets sent: 22, packets received 0, loss ratio 1.00 >>> 'UDPSOCKET_ECHOTEST': 1 passed, 0 failed Reproduced on NUCLEO_H743ZI (with PR ARMmbed#11274) and also with K64F board : mbed test -t IAR -m K64F -v -n tests*netsocket*udp* Signed-off-by: Vincent Veron <[email protected]>
restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
This pull request adds ethernet support on STM32 H7 platform.
It is based on the STM32 emac driver. As the H7 HAL is slightly different, I have added ETH_IP_VERSION_V2 switch. This has to be included in targets.json.
Work is based on @CurryGuy job and STM32 cube examples.
Tests done with this command (on IAR, ARM and GCC_ARM toolchains) :
mbed test -t IAR -m NUCLEO_H743ZI -v -n testsnetsocket
Pull request type
Reviewers
@jeromecoutant @LMESTM