VisualGDB MSBuild way does not generate bin files

Sysprogs forums Forums VisualGDB VisualGDB MSBuild way does not generate bin files

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11644
    guntiss
    Participant

    I’m using VisualGDB for STM32 embedded projects, and need to generate bin file. I am using MSBuild as build system. Although in the project settings “Embedded Project” -> “Generate .bin file” is set to Yes, the bin file is not generated in the file system. MCU debugging/programming goes without issues.

    What I am missing here, how to generate bin file?

    #11647
    support
    Keymaster

    Hi,

    Please try rebuilding the project. The .bin file should be generated in the same directory as the regular ELF file (with no extension).

    If nothing helps, please try enabling diagnostic MSBuild output via Tools->Options->Projects and Solutions -> Build and Run and check for the details on the “GenerateBinFile” target.

    #11761
    guntiss
    Participant

    Thanks a lot for great support. Yes diagnostics enabled to see that bin file is generated in the solution directory not project directory. It happened that I had totally different directories for project and solution.

    #11770
    support
    Keymaster

    Good to know it works. If you encounter further problems, feel free to open another topic.

    #22716
    Yuriy
    Participant

    Hi!

    I also have a problem with .bin file. Can I disable generating of this file? There are no option “Embedded Project” -> “Generate .bin file” in current VisualGDB version.

    I enabled diagnostic MSBuild output via Tools->Options->Projects and Solutions -> Build and Run:

    Target Performance Summary:
            0 ms  _SelectedFiles                             1 calls
            0 ms  _SplitProjectReferencesByFileExistence     1 calls
            0 ms  SelectClCompile                            1 calls
            0 ms  Build                                      1 calls
    ............
          547 ms  Link                                       1 calls
          603 ms  ClCompile                                  1 calls
         3403 ms  GenerateBinFile                            1 calls

    I know, this happens because we are using external FLASH at address 0x60000000 and can’t specify offset for .bin file.
    As result we got .bin file with size 1 611 264 460 bytes.

    On my SSD generating of bin file takes 3 seconds, but on standard HDD it takes tens of seconds!

    In other projects generating of .bin file works fast enough. Have you a good solution for this problem?

    #22721
    support
    Keymaster

    Hi,

    Yes, please try marking the sections for the external FLASH memory with the NOLOAD attribute in the linker script. This will prevent the objcopy tool from trying to place them in the same contiguous binary file as the regular FLASH sections.

    #22724
    Yuriy
    Participant

    Hi! Marking these sections as NOLOAD solved problem, now .bin file has correct size. Thanks

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