This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LSTXDATA Code

I am writing variables to my external sram with the xdata modifier on my declarations and _ata_ for addresses. I am interested to know how the compiler is handling the writes in order for me to compute how many clock cycles it takes to perform those writes.

I looked in the list file and noticed a line of code "LCALL ?C?LSTXDATA" which seems to be a writing of the data by a Keil function called LSTXDATA. I have searched but can not find where this function is located or listed.

Can anyone help?

Thank you

Parents
  • That's an internal helper function supplied by the Keil runtime library. You should be able to find it by looking in the debugger.

    As to why you're trying to inspect it, that's somewhat pointless: why bother with counting clock cycles when the toolchain includes a tool that lets you measure the actual times taken by any function: the performance analyzer? Or, to put it the other way round: if clock cycle counting really is important for what that code is trying to do, you shouldn't be writing it in C in the first place.

Reply
  • That's an internal helper function supplied by the Keil runtime library. You should be able to find it by looking in the debugger.

    As to why you're trying to inspect it, that's somewhat pointless: why bother with counting clock cycles when the toolchain includes a tool that lets you measure the actual times taken by any function: the performance analyzer? Or, to put it the other way round: if clock cycle counting really is important for what that code is trying to do, you shouldn't be writing it in C in the first place.

Children
No data