ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.66k stars 2.97k forks source link

STM32F7 bootloader does not work #5718

Closed tery123 closed 6 years ago

tery123 commented 6 years ago

Description


Question

According to https://os.mbed.com/questions/79720/STM32F7-bootloader-help/ STM32F746ZG will entry Infinite_Loop I just only know trace a project in a time. I only to know the code will stop in Infinite_Loop. And I also don't know this issue publish over here is appropriate not?

0xc0170 commented 6 years ago

Just use https://github.com/armmbed/mbed-os-example-bootloader, and regular blinky to update rather than use bootloader-blinky (it should be deprecated, I'll fix that).

@ARMmbed/team-st-mcd Please review

tery123 commented 6 years ago

@0xc0170 I am author of question article https://os.mbed.com/questions/79720/STM32F7-bootloader-help/ . And use https://github.com/armmbed/mbed-os-example-bootloader like what you say. It looks like not work, and still entry Infinite_Loop. But I change bootloader code to below, it work.

#include "mbed.h"
DigitalOut myled(LED1);
int main() {
    myled = 1;  
        wait(1.0);
     mbed_start_application(POST_APPLICATION_ADDR);
}

But I change to below, It fail again, the object of myled is always on and application is not start.

#include "mbed.h"
DigitalOut myled(LED1);
int main() {
    myled = 1;  
    wait(1.0);
    myled = 0;  
    wait(1.0);
    myled = 1;  
    wait(1.0);
    myled = 0;  
    wait(1.0);
    myled = 1;  
    wait(1.0);
     mbed_start_application(POST_APPLICATION_ADDR);
}

If look like have initial issue.

bcostm commented 6 years ago

As of today the bootloader has not been activated on the NUCLEO_F746ZG. This could explain your problem.

tery123 commented 6 years ago

@bcostm I got that and thank you. I will go next phase first.

bcostm commented 6 years ago

FYI I am actually adding the bootloader on this board (NUCLEO_F746ZG) and testing it with the mbed-os-example-bootloader.

Update: I have modified the linker scripts and added bootloader_supported as true in targets.json in my local branch and I observe the same thing as you. When the bootloader jumps to the application code (blinky led) the LED does not blink. The program seems stuck somewhere. Difficult to debug... Same thing with GCC_ARM and ARM compilers.

raghidmardini commented 6 years ago

@bcostm @tery123 I am seeing the same behavior on NUCLEO_F767ZI. Any updates regarding this issue? Thanks!

bcostm commented 6 years ago

Hi We're working on it. We should send a fix soon.

jeromecoutant commented 6 years ago

As #5821 is now merges, I think we can close the issue ? Thx

bcostm commented 6 years ago

@0xc0170 can you please reopen it as my PR has been reverted...

bcostm commented 6 years ago

ST_TO_BE_CLOSED