| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Hi @ttimasdf This way you will get feedback from expert and this will allow to correct in the original repo. |
Sorry, something went wrong.
|
Sure. All I know was that this part of the code belongs to HAL library, didn't realize the project is also on Github |
Sorry, something went wrong.
|
Why would you call SystemInit before __libc_init_array ? |
Sorry, something went wrong.
SystemInit just clears some registers and do not rely on any static objects, so called before __libc_init_array is quite safe. And do a search in official repository you could find that they do it de facto on most of the other boards.. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This PR fixes the necessary initialization procedures which should be run before user code is called.
premain() function in main.cpp is essential for the HAL library to initize properly, more specifically it called HAL_Init which setup the systick interrupt handler which is necessary for writing a hello world.....
The issue #869 has already mentioned this bug but didn't find a solution to it. After some trials and errors and comparasion between assemblies for different products, the patch here is likely solving it.
If possible, is there's any chance we talk about this a bit further because I don't know why this workaround works in fact...
Validation
Demostration:
Detail step-by-step is To-Be-Filled. The following code is a modified blinking LED use loop based manual_delay() and HAL provided delay() altogether. The original delay() would stuck if HAL_Init is not called beforehand, the same as described in #869.
Code formatting
Closing issues
Fixes #869