Skip to main content
Visitor II
December 1, 2017
Question

ST Link External Loader Not Recognized

  • December 1, 2017
  • 2 replies
  • 2290 views
Posted on December 01, 2017 at 21:00

Hello,

I am using the ST-Link utility, v4.0.0.  I created a custom external loader in IAR for ARM using one of the example projects.  After I build the loader in IAR I copy the .out file to ST Link's external loader folder and give it an STLDR extension.  However when I go to load the file through ST Link, the Device name is blank, the Device Type is 'Unknown Device, the Start address is 0 and the Device Size is 0.  I know that this information comes from the Dev_Inf file but since I just modified an existing project, I think this is all setup correctly.  I have built this both in IAR v7.3 and v7.8.  Any guidance would be appreciated.

Thanks.

#st-link-external-loader
    This topic has been closed for replies.

    2 replies

    Graduate II
    December 1, 2017
    Posted on December 01, 2017 at 21:42

    You probably want to start by looking a the file with an ELF inspection tool to see what data sections and symbols are being exported. In Keil there is FromELF, not sure what the 'objdump' equivalent is in IAR

    Compare to working loaders. The one I'm look at were built with V7.20.5.7591/W32

    Current version of ST-LINK Utilities is V4.1.0, should try that so as not to fight old demons.

    ...

        616  AHBPrescTable              0x20001d7c   Gb    4  Data  De   0x10

        617  StorageInfo                0x20001d8c   Gb    5  Data  De   0xc8

        618  Info_BLOCK$$Base           0x20001d8c   Gb    5   --   De

    ...

        AHBPrescTable

            0x20001d7c:    00000000    ....    DCD    0

            0x20001d80:    00000000    ....    DCD    0

            0x20001d84:    04030201    ....    DCD    67305985

            0x20001d88:    09080706    ....    DCD    151521030

        RAM_BLOCK$$Limit

    ** Section #5 'P2 ro' (SHT_PROGBITS) [SHF_ALLOC]

        Size   : 200 bytes (alignment 4)

        Address: 0x20001d8c

        0x20001d8c:   49 53 36 31 57 56 31 30 32 34 31 36 42 4c 4c 5f    IS61WV102416BLL_

        0x20001d9c:   53 54 4d 33 32 34 78 47 2d 45 56 41 4c 00 00 00    STM324xG-EVAL...

        0x20001dac:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001dbc:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001dcc:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001ddc:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001dec:   00 00 00 00 04 00 00 00 00 00 00 64 00 00 20 00    ...........d.. .

        0x20001dfc:   00 00 20 00 ff 00 00 00 01 00 00 00 00 00 20 00    .. ........... .

        0x20001e0c:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001e1c:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001e2c:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001e3c:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

        0x20001e4c:   00 00 00 00 00 00 00 00                            ........

        Info_BLOCK$$Limit

    ** Section #6 '.debug_abbrev' (SHT_PROGBITS)

        Size   : 1688 bytes
    cpayeAuthor
    Visitor II
    December 1, 2017
    Posted on December 01, 2017 at 22:24

    I have upgraded to v4.1 and I am now using the map files to compare the one of the example projects with mine.  However, I did copy the .out file from the example I am examining to the ST Link External Loader folder and it too is showing up with an empty Device name, unknown device type, etc.  I did not re-build the example - I just took the .out file as-is, copied it and gave it the .stldr extension.

    cpayeAuthor
    Visitor II
    December 3, 2017
    Posted on December 03, 2017 at 15:51

    I think I found the issue.  I re-built my loader in IAR v7.3 and it was recognized by ST-Link.  I did the same with one of the examples and that worked as well.  (Originally I built my loader in IAR v7.8).  Is there something that could be tweaked to make the build work with IAR v7.8?  

    Thanks.

    Graduate II
    December 3, 2017
    Posted on December 03, 2017 at 18:06

    Not using IAR here, and not sure how robust ST's ELF Loader is in reality, my opinion is that it is pulling symbols, but might also depend on section attributes.

    If you want to send a working vs non-working variant to

    mailto:sourcer32@gmail.com

    I'll see if there is anything that might break or confuse the loader.
    cpayeAuthor
    Visitor II
    December 5, 2017
    Posted on December 05, 2017 at 16:11

    Thanks Clive.  I can't provide my specific code but I can provide the ST example code built in v7.3 IAR and built in v7.8 (example code built in v7.8 had the same behavior as mine).  Which files would be the most helpful?  A copy of the .out and .map for each?