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.

Stack start adress, registers etc...

Other Parts Discussed in Thread: TMS320VC5502, SYSBIOS

Hi everyone.

So I've got an other question. For my project I've got to save the context of my DSP (TMS320VC5502) on the EMIF, reboot the DSP, load the context and then resume the execution, as if the reboot never happened.

So for the EMIF part, I'm trying to make it work, but i've already posted a question about that. It's about the context saving that I've got some problem. Indeed, I've got to save the stack, and the associated register in order to make it work.

I searched on the web, and I haven't found the adress of the start of the stack... And I don't know either how to access the register. I've read in a lot of documentation, that I should have a BIOS/Object view in Code Composer that should give me those information, unluckily it seems it was for CCS v3, and I haven't found this view in CCS5.

Anyway, I guess this start adress is determined at the building, since if I change the sys stack size, the normal stack will be shifted I guess.

So, how can I access those values in my code? And by the way, when i'll load my context, will the bios let me write the new stack, or is those segment protected?

Thanks a lot in advance,

Matthieu

  • Matthieu,

    What version of BIOS are you using?  For CCS v5, we have ROV for SYSBIOS.  This can be used to help you look at Tasks in your system, size of heap and stack and amount of usage, etc...

    I think there's a symbol STACK that should show the start of the stack.  If not, you might also want to look at your *.map file to find where the .stack section is.

    Judah

  • Hi.

    Thanks you for your answer. So, I've ot DSP/BIOS v5. I tried to display ROV, but it gives me an error message that says that it can't initialize. It propsoe me to go to project proprieties, CCS build, RTSC, but I don't have an RTSC menu. Or anything that sounds like it.

    So, I went into the .map file, to find something interresting:

    .sysstack
    *            0   [ 00007910 ]  00003c88          *   00000100   UNINITIALIZED
                     [ 00007910 ]  00003c88          *   00000100   --HOLE--

    .stack       0   [ 00007b10 ]  00003d88          *   00000400   UNINITIALIZED
                     [ 00007b10 ]  00003d88          *   00000400   --HOLE--

    And, a bit later,

                00006740    GBL_initdone
                00003d88    GBL_stackbeg
                00004187    GBL_stackend
                00003c88    GBL_sysstackbeg
                00003d87    GBL_sysstackend

    So, I should have in the variable GBL_stackbeg the adress I need, unluckily, I can't get it even if I include the GBL.h. I could hard code the adress, but it will change at every modification of the DSP/BIOS (and i'll make some in the future)

    SO what do you think? Is those adresse the ones I need, and how could I get them with a C code?

    Thanks in advance

  • Matthieu,

    Opps...I though you were using SYSBIOS not DSPBIOS.

    One thing you can try is to place those output sections at a well known address through your linker.cmd file then you can reference the address in your .c file.

    Judah