-
Notifications
You must be signed in to change notification settings - Fork 161
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
STM32Hxx porting fixes and suggestions #960
Merged
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3e48c7d
typos and wrong function name fixes
miguelfreitas 84dcdef
compilation warning fixes
miguelfreitas 9c29975
port notes updates and suggestions on how to avoid clashing with orig…
miguelfreitas 389ff69
implement hacks described in readme.md to avoid conflict with origina…
miguelfreitas e0871ca
spacing/identation fixes (uncrustify)
miguelfreitas 172733b
revert cube IDE auto generated code related changes
tony-josi-aws c64bef1
Merge branch 'main' into miguel_main
tony-josi-aws 6d6ef3c
revert cube IDE auto generated code related changes
tony-josi-aws 7fb47c9
fix formatting
tony-josi-aws 4cfdf89
remove trailing whitespaces
tony-josi-aws 245d587
Merge branch 'main' into main
tony-josi-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not very clear on the benefits of using the CubeIDE generated code for Ethernet driver and its initialization in this case. We are always defaulting to the ethernet driver present in the
source/portable/NetworkInterface/STM32Hxx
folder, even if the CubeIDE generates a different version. Also, there are couple of things that user needs to manually update in the project as you have listed in thereadme.md
to make it work with the autogenerated code, which I think defeats the purpose of the CubeIDE tool.I believe there are a lot of users that doesn't rely on CubeIDE generated code (atleast for ethernet peripheral), removing
ETH_IRQHandler
from theNetworkInterface.c
will break their code, unless they manually update it.The only benefit that I see we get from the CubeIDE generated code are the two auto generated functions:
HAL_ETH_MspInit()
andHAL_ETH_MspDeInit()
, which can be helpful in initializing/deinitializing the hardware (especially for the official ST development boards supported by the Cube IDE), but, again has to be manually tweaked for custom boards that runs on STM32Hxx. I think users can always refer the autogenerated version of these functions and implement their own version part of the application itself.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.
No problem, @tony-josi-aws. I'm just sharing back the fixes plus the suggestions of how I have been able to integrate the lib to the project here. I didn't have any merge expectations specially on these hacks.
I totally agree with your comments, keeping
ETH_IRQHandler
atNetworkInterface.c
seems pretty reasonable if one is able to remove that function from original driver to avoid conflict. This is not the case if these driver files keep getting overwritten by Cube IDE whenever I change a setting (so the conflict keeps coming back).So in case of Cube IDE generated code I had to use such hacks to be able to disable parts of their code while keeping the project maintainable. I haven't thought of any other way... Unless maybe I could try to totally disable ETH from Cube IDE (which would also remove the define 'HAL_ETH_MODULE_ENABLED'). I don't know.
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.
@miguelfreitas, yes, I usually disable code generation for ethernet from the Cube IDE and rely on the NetworkInterface.c. While disabling Cube IDE generated code for ethernet we have to manually define (uncomment)
HAL_ETH_MODULE_ENABLED
inCore\Inc\stm32h7xx_hal_conf.h
.STM32Hxx network interface was not fully updated to support the IPv6 related functionalities which got recently added to the main branch. The PRs: #970 and #965 (970 is an alternative approach for changes made in 965) should fix that. While updating those changes some of the build related fixes that you had made in your PR are already added in those PRs, which was required while testing. Will you be interested in updating your PR with respect to the latest changes or prefer us to do it on your behalf.
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.
Hi @tony-josi-aws, thanks for this new info. I'd prefer you to to proceed with updating this or the other PR with the latest changes as you prefer since I'll be away on vacations for the next two weeks. 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.
Sure @miguelfreitas, I will update the 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.
@miguelfreitas, merging this PR. Thanks for contibuting to FreeRTOS+TCP.