This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need documentation for the -mv7R4 --no_stm switch



I am unable to find *any* documentation about this switch.

If there are limitations - which I have been told there are for example I have been told that maybe it doesn't support putting the stack in SDRAM,  then we need to know.   If there is code in the RTS library that isn't fixed - we need to know.

Where is there detailed information about this switch and any limitations?

The switch doesn't even show up in the compiler readme.txt or in the command line help and CCS even complains when you try to add this switch to a build..  Yet we have silicon errata that tell customers to use this switch.  

Have a customer now urgently trying to get their system working w. the C++ compiler and stack, heap and .data sections in SDRAM and it crashes.   Suspect the errata may be the cause but not sure if we can say --no_stm will fix the issue.

See How to determine stack/RAM usage

  • Anthony F. Seely said:
    Where is there detailed information about this switch and any limitations?

    Unfortunately, there is no external documentation about --no_stm.  This forum thread has some useful details.  Note the hardware experts who are familiar with the related silicon bug will know more about this situation than anyone.  

    Anthony F. Seely said:
    CCS even complains when you try to add this switch to a build.

    Have you tried to add this switch using the Additional Flags button?  It is described here.

    Thanks and regards,

    -George

  • George,

    George Mock said:
    Note the hardware experts who are familiar with the related silicon bug will know more about this situation than anyone.  

    That's Sunil Oak (10718) .        We already talked and he has concerns that the Stack in SDRAM may not be supported due to limitations in what the compiler team could implement.   That is why we are trying to find documentation of these limitations.

    There is only very brief mention of this option in the README.TXT for the compiler 5.1 release series.  Nothing useful to this discussion. 
    So 5.2 and 15.x have no mention.   The silicon w. the issue however is still in widespread use and on most of our development kits.   Hence we need to have detailed documentation on any known limitations.    For example is it really true that for some reason the compiler could replace 'other' STM instructions but not the STM/LDM (PUSH/POP) that are used to save & restore context to the stack on function entry/exit.   That would seemingly be a severe limitation which is why I have some doubts and would like confirmation of Sunil's concern.

    George Mock said:
    Have you tried to add this switch using the Additional Flags button?

    Yes - the result is a little obnoxious IMO because at least on the *command line* if you give the correct option you see:

    The above is helpful because if you misspell  --no_stm as --no-stm (has happened) at least you get useful information and sense that the switch is 'correct'.

    What CCS gives is this:

    So not even acknowledging that the switch is valid and actually *suggesting* it's probably wrong.    Not a great result IMO as it definitely sent me looking for documentation to see if I even had is spelled right..  

    Anyway, we need documentation added for this switch and we need to know if there are any limitations regarding effectiveness for various sections.
    I don't mean whether it fixes the silicon bug or not -- but I do mean are there any known cases like the stack or some of the other sections generated [for both C and C++ compilers] where the compiler is unable to suppress the STMs.

    I'd have thought the runtime library but apparently we did get updates into some of the functions like memory copy and fill...

  • This has gone beyond what can be addressed in a forum thread.  I filed CODEGEN-1299 in the SDOWP system to have this addressed.  It requests that --no_stm and any related limitations be documented.

    Thanks and regards,

    -George

  • Hi George,

    That's fine but this feature has been released since 5.1.3 and we need to know now what the limitations are.

    The SDOWP is fine so that this information gets published eventually - but we can't wait 6months to resolve issues affecting customers today.