Bootloader not working

Sysprogs forums Forums VisualGDB Bootloader not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27882
    sunitha
    Participant

    Hello,

    I followed the tutorial to create my own Bootloader and Application for STM32F4XX. It built single binary that inlcudes both Bootloader and Apllicaiton. But after flashing into the board its not working.

    I have seen the contents of Bootloader.bootldr-o with the help of objdump.exe, only initial part of file has some data, but after that all zeros are present.

    Can you please suggest possible solutions for the same.

    #27884
    support
    Keymaster

    Hi,

    It’s hard to say why a specific project would not be working on a specific board. Most likely, some setting of the project file doesn’t match some board parameters. Please double-check that you have followed ALL steps of the tutorial (including the ‘reset after programming’ flag in Debug Settings).

    It if doesn’t help, please consider hardcoding a breakpoint at the beginning of the bootloader by adding the following code to main() or even to RESET_Handler:

    asm("bkpt 255");

    Once the breakpoint triggers, you will normally only see the disassembly, as the bootloader symbols will not be loaded. You can switch to using the bootloader symbols using the symbol-file command as described in step 33 of this tutorial (please make sure you read the entire tutorial and understand how different parts go together before trying to do advanced troubleshooting).

    EDIT: we have rechecked the bootloader tutorial with the latest ARM toolchain and it indeed was not working out-of-the-box, as the .data section in the .bootldr-o file was not renamed as expected. We have updated the tutorial to work with the new toolchain. You can find the exact changes we made here (only the bootloader.props file needs to be updated).

    • This reply was modified 4 years, 8 months ago by support.
    #27887
    sunitha
    Participant

    I have built the project using MSBuild settings. Bootloader.bootldr-o consists of all zeros except some data at start of the file. (read the file with objdump.exe)

    #27889
    support
    Keymaster

    This is to be expected, as the bootloader contents is always padded so that the actual program always starts at the same address (where the bootloader expects it).

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.