-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32F7: Add bootloader support (new trial) #5972
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
The mbed_sdk_init can be called either during cold boot or during application boot after bootloader has been executed. In case the bootloader has already enabled the cache, is is needed to not enable it again.
As I understood this was related to cache settings as pinpointed in the PR earlier, and confirmed by few other users (their applications broke). Therefore I would like to understand what broke it (here you can see the confirmation it was just one commit #5912 (comment) ), you should be able to reproduce this. 4 lines changes regarding Cache? that from the commit looks like it can affect an app? |
Yes I know it is related to this cache settings but I have no clue why this causes sync issue on your side. I have no problem when I run the tests. No clue either how to solve it. I just want to see if the few lines I have modified change something in your tests. |
Hi @bcostm The interesting thing is: it even works now without commit 6e71398 I guess I will have to try harder to reproduce the error on my side ;) |
Ok some new info: When I checkout 7ff1cf5, which is the commit before the revert PR from @0xc0170, build and flash - it is working as long as I do not unpower the board. If I plug out the USB power and replug, then the board is hanging - so error appears only if cold booted ... If only flashing via copy .bin on mass storage device, the problem does not appear. So this means the error happens somewhere between power up and st-link getting ready I guess. Now I just checked this PR again ... If I apply all patches but the last one (6e71398), then the same - works as long I do not unpower the board. If I then apply patch 6e71398, everything works again. So it seems that last commit really fixes the problem ;) |
@MikeDK appreciate the extensive testing for this one! |
@bcostm yes, with the latest commit, the board is also starting up correctly when unplugged from power and replugged again. I work under Linux (Debian Stretch) 🥇 |
OK because I am on Windows and I can't test it on Linux. @0xc0170 if I am not wrong the ci-test which had the sync issue are ran on Linux right ? |
I believe on both. I could see aborted on linux, but also windows with IAR had issues (what I am not certain is the sequence it has happened if linux was first and started having those issues). |
Maybe I can test this also on Windows ... I'll have to check with my coworkers - most of them use Windows |
@studavekar Pinging you just to let you know about the PR. |
Interesting if its host OS causing this bug. would be good to know more about what about OS causing this bug ST-link ? |
Can you please launch the ci-morph tests to see how it is now ? |
/morph build |
Build : SUCCESSBuild number : 1035 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 715 |
Test : SUCCESSBuild number : 842 |
/morph uvisor-test |
/morph export-build |
Exporter Build : SUCCESSBuild number : 720 |
/morph uvisor-test |
1 similar comment
/morph uvisor-test |
Looks like things are still stable. Going to merge this in first thing tomorrow to keep a controlled eye on it. Interesting that the only code change that I could tell was the positioning of code in mbed_overrides.c |
OK. I don't know exactly what causes the error previously. For the story, I looked in ST CubeF7 examples and found that the cache initialization was done BEFORE the clock setting. This is why I changed it also. But I also remind the remark from @LMESTM in the previous PR:
|
@bcostm Interesting. I'm not sure mbed_start_application would be a good place to put the cache-handling code, since it sounds like the function is called after all peripherals are setup (at least, that's the impression I get). Care to take this comversation to a new issue? I suspect we might have more M7 issues down the line, and it would be good to continue discussion in an issue instead of a completed PR :) |
OK I'll open a new issue on this subject to follow-up this. |
Exporter Build : FAILUREBuild number : 775 |
Description
Status
IN DEVELOPMENT
Waiting ci-test result to see if sync issue is still present or not.