Unable to build valid ST-Link external loader

Sysprogs forums Forums VisualGDB Unable to build valid ST-Link external loader

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26401
    CharterWim
    Participant

    Hello folks,

    I’m working with VisualGdb Embedded edition version 5.4R12

    I am currently programming a STM32F767IG with a 16MB qspi NOR-Flash module (W25Q128)

    I’ve got the external flash running perfectly when initialized from code. Now I’m trying to move on to the point that I can write software and assets to it from Visual Studio, the STM32 ST-LINK Utility and preferably STM32CubeProgrammer as well.

    I’ve read and followed all VisualGdb and ST tutorials to make the External Loader required for this, to no avail. I created my project using GNU make to make sure I get .elf files. I made copied of the requires Dev_inf.h, Dev_inf.c and loader_src.c and filled the parameters according to my hardware. Besides that, I’ve kept everything as the VisualGDB project creator sets it up.

    After the build I rename the .elf file to .stldr and copy it to the both external loader folders for ST-Link and STM32CubeProgrammer. ST-Link starts up, but does not list my loader in the external loader list. Neither by the filename I gave it, nor the name I filled out in Dev_Inf.c

    STM32CubeProgrammer shows its splash screen, but then crashes while starting up. When I remove my loader from its External Loaders folder it starts up fine again.

    I tried to build the program to both SRAM and Flash, and both with and without a startup file. With a startup file, the output is only 200bytes, telling me the code is not included. Without a startup file, the size grows up to 2500 bytes, but the results stay the same.

    The VisualGDB Embedded edition does not have the “External Memories page” which is referred to in the SysProgs tutorial for making an external loader (https://visualgdb.com/tutorials/arm/stm32/flash/), but I find it hard to believe that I can’t do something as common as programing an external memory with a Development environment named like that. Besides, i would hate to revert to some cheap-ass free IDE which apears to pull this off without any problem.

    At the end, to rule out everything, I voided every function block only returning the ‘Succes’ value if required, but even that didn’t help. Same results. I have no clue on how to debug this.

    I am not very experienced in (configuring) tool-chains. Any pointers on whether the program should be loaded in SRAM or flash (I guess the former) and if it requires a startup file (when added, I need to hang on to the main function as well. Does that make sence?), and if I need to add or remove any defines or tool-chain arguments.

    Thanks in advance,

    Wim!

    #26402
    support
    Keymaster

    Hi,

    Sorry, our external FLASH plugin mechanism is only intended to be used with VisualGDB. It will not work with the ST-Link programming tool, or any other software.

    If you are using VisualGDB, you can program the FLASH memory without launching a debugging session via Debug->Start Without Debugging or Debug-> Program FLASH Memory.

    Regarding the external memories, you can indeed get it to work by modifying the linker script manually, however you would need to make sure you fully understand the linker script logic first, as incorrectly using some of the linker script parameters would make the built file unusable.

    If you prefer something that works out-of-the-box, please consider upgrading to VisualGDB Custom Edition here and then use the External Memories page of VisualGDB Project Properties to automatically edit the linker script as expected.

     

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