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.

issue about linker file to be used in hyberlink examble

Dear all,

I am using Hyperlink interface example that trasfer data from L2SRAM in local device to L2SRAM in remote device. The data segment is placed in L2SRAM in the
following linker file

http://www.mediafire.com/?leehect1refnwel
how to specify exactly the location where the data to be sent well be allocated to be sent through the hyperlink that's how to put the data to be sent in a specific location in the L2SRAM to be read by the hyperlink examble and sent through it?

looking forward for your comprehensive answer.
thank you in advance

  • Hi Abdalrahman,

    You can use a RTSC configuration file and RTSC platform package for your hyperlink project.

    1. To begin you can place your buffer in local L2SRAM using the following method:

    Add the following in your .cfg file:
    Program.sectMap[".inputbuff"]  = "L2SRAM";

    In your C file you can place the buffer in this region as follows:
    #pragma DATA_SECTION(buffer, ".inputbuff");
    #pragma DATA_ALIGN(buffer, 128);
    char buffer[bufsize];

    Ensure that the "L2SRAM" segment is defined in your RTSC platform you are using.

    2. Setup the address translation on the local and remote side. On the remote side this will ensure that when the data is received on incoming hyperlink, it will be sent to the appropriate L2 address on the remote device. Here are a few resources you can use to understand hyperlink address translation:

    1. HyperLink User Guide: http://www.ti.com/lit/ug/sprugw8a/sprugw8a.pdf

    2. HyperLink example included in MCSDK. Once you install MCSDK this is located at pdk_C6678_1_x_x_x\packages\ti\drv\exampleProjects\hyplnk_exampleProject
    You can use the RTSC configuration file (memoryMappedExample.cfg) and platform used in this project as a starting point.

    3. HyperLink presentation slides: http://keystone-workshop.googlecode.com/svn/trunk/pdf/Intro%20to%20Hyperlink.pdf

    3. Writing to the hyperlink address space (0x4000_0000 to 0x4FFF_FFFF) in the local device will initiate a write transaction on the interface. More details are in the user guide mentioned earlier in this post.

  • Hello Gurnani ,i have 2 questions;

    1-In the example , Is the  address translation is already setup  (the values such as txSecOvl - txPrivIDOvl - txIgnMask - .rxPrivIDSel - rxSegSel ) ??

    2-how to change the values on the memory ?

  • there is another question when i ran the example in LOOPBACK mode there is an error as following

    Can't find a source file at "/sim/sds12/scratch/tsuch_rtsbuild_dflcmp2507.dal.design.ti.com_23248_linux/c60_rts/./exit.c"  Locate the file or edit the source lookup path to include its location.

    and written (Single write failed)

    so how to solve this error ?

  • Hi Ahmed

    The address translation is setup in the function "hyplinkExampleAddrMap" in hyplnkLLDIFace.c.

    You can change the values in this function. To understand how to setup the values for address translation, please study the 3 resources I pointed you to in my earlier post.

  • Wrt your second question, where CCS cannot find exit.c, as per some posts by the CCS team, it was an issue in older versions of CCS, (see: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/118747.aspx). However, this error should not interfere with your debugging session, so you can continue using it as-is and ignore this error, or if you'd like to update to the latest CCS version go to http://processors.wiki.ti.com/index.php/Download_CCS

  • thanks Gurnani; but you didn't answer you question about how to change the values on the memory ?

    i want to change the values of L2SRAM at certain addresses but i don't know how to do it , So can you help me in this issues ?

    thanks in advance

  • Ahmed,

    I thought by "changing values on memory" you meant address translation. I'm still not sure what you mean by "change values of L2SRAM at certain addresses." Do you want to modify the memory map? If so you can do so by following the procedure outlined here http://rtsc.eclipse.org/docs-tip/Demo_of_the_RTSC_Platform_Wizard_in_CCSv4

  • NO, i read the user guide and understood the address translation ,i want to send from L2Sram at Tx to L2SRAM at Rx and to make sure that the sending operation is done i want to change the values on one side at certain addresses  using CCS. The corrseponding value on the other side(Rx) will be changed as well.

    so how to do it (changing the values on the certain addresses)?

  • OK, so since you know how to configure address translation, you can setup address translation to configure L2 on Tx side to L2 on Rx side.

    On your Tx side, any write transaction to the address range 0x4000_0000 to 0x4FFF_FFFF, will write to HyperLink address space; and if hyperlink initial setup and address translation is configured correctly, and the link is active, then this will lead to an automatic write to L2 on the remote side.

    You can verify and change values on certain addresses as follows. In your example, set a breakpoint at the point just after hyperlink address translation setup has taken place and the link is active, before any write transaction. To change values on certain addresses in CCS, you can go to View --> Memory Browser. Based on how your address translation and segment lookup table is setup, write a few bytes to the address range starting at 0x4000_0000. These values should show up on the remote L2.

  • Dear Uday,

    thank you for your comprehensive answer BUT
    as i understood these lines :

    1. To begin you can place your buffer in local L2SRAM using the following method:

    Add the following in your .cfg file:
    Program.sectMap[".inputbuff"]  = "L2SRAM";

    In your C file you can place the buffer in this region as follows:
    #pragma DATA_SECTION(buffer, ".inputbuff");
    #pragma DATA_ALIGN(buffer, 128);
    char buffer[bufsize];

    Ensure that the "L2SRAM" segment is defined in your RTSC platform you are using.

    is aiming to define a buffer with size 128 in the L2SRAM -where data section in set- is that rigth? BUT how to determine exactly where to put this buffer i.e. in the address range you mentioned as when the hyperlink is activated the data to be sent will be in the range specified to it in the example?

    the question in other means : how to put the buffer to be sent in a specific range in the L2SRAM knowing that my Platform information is as follows:

    looking forward for youresponse

    Abdalrahman;

  • Abdalrahman,

    In the RTSC platform, you can modify it so that you split L2SRAM based on your address range requirements for your buffer. For example, let's say you want to place the buffer at starting address 0x08400000 in L2SRAM. This would be done by changing the default length of section "L2SRAM" from 0x00080000 to 0x00040000, and adding a new section called say "L2SRAM_BUFF" with base address 0x00840000, and length 0x00040000, as shown in the snapshot below:

    Now add the following in your .cfg file:
    Program.sectMap[".inputbuff"]  = "L2SRAM_BUFF";

    In your C file you can place the buffer in this region as follows:
    #pragma DATA_SECTION(buffer, ".inputbuff");
    #pragma DATA_ALIGN(buffer, 128);
    char *pBuffer = buffer[bufsize];

    Note that the 128 is not the size, it is the alignment on a 128-byte boundary. The buffer size is determined by bufsize, which should be less than or equal to the total size allocated for L2SRAM_BUFF.

    You can verify that the buffer is placed in the correct memory section of L2 by going to View-->Memory Browser.

  • hello ran;

    you told me : (write a few bytes to the address range starting at 0x4000_0000).

    I tried to write the values to the address but it didn't change , so how to change it ?

    wish to help me ;

  • Ahmed,

    I would start by first verifying that the address translation scheme is setup correctly. Just before you attempt to write to the remote (by writing to 0x4000_0000), check the relevant Hyperlinkregisters to see that address translation is setup as required.

  • thanks ran,

    i ran the example for 1 iteration,the example is running and the address is setup correctly,but what i want to say is that i want to send several values (for an example,3H in the first address ,6H in the first address ,aH in the first address , and so on-H refer to hexadecimal or i can send a Binary data) through the hyperlink not only one token so,how i can do that ?

    another question ,i want to know what is the difference between token and block,as i understand token refer to the value that i want to transfer it ,as example i  set hyplnk_EXAMPLE_NTOKENS=0x0000f , the example will transfer this value to the remote device and write it in all the segment but i didn't understand what's block refer to ?

  • Hi Ahmed,

    Please see my answer to user 'zezo alex' at http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/210925/746045.aspx#746045

    He had the same question and I have explained what a token is and what a block is in that post