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.

TMS320C6678: copy program code from one core to another

Part Number: TMS320C6678

Hi

We would like to copy only the program code located on L2SRAM

We assume it is the InternalCode on the linker file. 

1. How do we know where exactly the program code located on L2SRAM

    that if the location as changed then location of our pointer will also be updated.

2. how would we know the length of the program code located on L2SRAM

    that if the length as changed then length our copy will also be updated

Regards 

Doron Gabbay

  • Hi,

    This can be found out from the memory map file for where program code starts and how long it is. To manage this, you can group the program code into one section in the linker command file like:

    .gfuncSection {
    _gfuncStart = .;
    gfunc1*.obj (.text)
    gfunc1*.obj (.const)
    gfunc2*.obj (.text)
    gfunc2*.obj (.const)
    .....
    _gfuncEnd = .;
    } > L2SRAM

    Then in your main.c file, you can access them like:

    extern far void* _gfuncStart ;
    extern far void* _gfuncEnd ;

    uint32_t start,end, programBytesUsed ;
    start = (uint32_t)&_gfuncStart ;
    end = (uint32_t)&_gfuncEnd ;
    programBytesUsed = end - start;

    Regards, Eric

  • Eric you are great thank you
    I hope it work