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.

writing to all of SARAM

Other Parts Discussed in Thread: STRIKE

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I am using a TMS 320VC5505D chip using a XDS510USB PLUS JTAG emulator. I have my DARAM setup with a base of 0xc0 and a length of 0xff40. My SARAM is setup with a base of 0x01000 with a length of 0x40000. I set this up using the DSP/BIOS graphical configuration tool. I cannot write to the second half of my SARAM. Can you tell me why?

Barry

  • Barry,

    I think you need to use word address for BIOS memory config. The number you used are byte addresses.

    Try word address to see if it works.

    Regards,

    Peter Chung

     

  • Peter

    I think you have misunderstand the question. The SARAM starts at location 0x10000 and ends at 0x4ffff. I should be able to write to any location in this space. I cannot write to location ox28000 to 0x4ffff.

     

    Barry

     

  • Can you clarify on what you mean when you say you cannot write to those locations?  How are you doing the write?  Code?  Memory window? 


    Keep in mind that addresses are different depending on whether an instruction fetch is occurring or a data access.  There are several FAQs related to this topic on the 55x FAQ page.  Here's one:

    http://processors.wiki.ti.com/index.php/55x_FAQ#What.27s_the_deal_with_byte_addressing_vs_word_addressing.3F

     

  • Hi Barry,

     

    Peter is right.

     

    You need to specify word addresses in the DSP/BIOS tcf file. So your values should be

    DARAM: base: 0x60; length: 0x7FA0

    SARAM:  0x8000; Length: 0x20000

     

    In your program/memory window all the memory locations you access refer to word addresses. When you write data to a memory location implies that you are writing two bytes. On VC5505 DSP 0x27FFF is the last location of SARAM and 0x28000 is the start address of external CS0 space.

     

    Pratap. 

  • Pratap and Peter,

    Sorry to publicly disagree, but I don't believe that is the correct solution.  Please see this FAQ:

    http://processors.wiki.ti.com/index.php/55x_FAQ#When_I_write_my_linker_command_file_should_I_use_byte_addresses_or_word_addresses.3F

    The tcf file from BIOS ultimately translates into the linker command file (and a few others).  That's why you should use byte addresses in the tcf as discussed above.  Furthermore, the BIOS team has pre-defined the memory maps for the various processors, so it was the TI BIOS team that defined these using the byte addresses, not Barry.

    I believe the fundamental issue is simply the fact that data addressing is done by word address and not byte address so you would have as many addresses (twice as wide) when doing data accesses.

    Brad

    EDIT:  The tcf files as created by the BIOS teams display everything as word addresses which ultimately translates to a byte address for the linker command file...

  • Hi Brad,

    I agree with you. Memory locations in the command file are byte addresses and issue faced by Barry is because he interprets word address as byte address.

    But the memory locations in the tcf file, as defined by BIOS team, will be word addresses only. While creating the command file memory sections will indicated as byte addresses. I am not sure about other platforms and BIOS versions but is true for VC5505(ti.platforms.dsk5505), CCS3.3 and DSP BIOS 5.33.

    Pratap.

     

     

  • Barry Turner said:
    I set this up using the DSP/BIOS graphical configuration tool. I cannot write to the second half of my SARAM. Can you tell me why?

    Barry, please post your code that is trying to write the whole SARAM.

  • All,

    Thank you for your active participation in the forum. We always need your attention and help. I appreciate it.

    Barry,

    I am not sure if your problem is caused by the byte address in the BIOS configuration. However, first of all, I would like to try "word address" in your BIOS configuration. As far as I know, "word address" in the BIOS configuration for C55x will be conveted into "byte address" in the command link file.

    Please check your command  link (.cmd) file and make sure your memory addresses are correct. If you still see the same problem, please let us know.

    Best Regards,

    Peter Chung

     

  • Peter and Pratap,

    Looks like you're right after all.  Sorry for the confusion -- I'll eat my words.  :)  I was confused because the definitions for the C5505.tci file actually use byte addresses, but the tcf file and the utility appear to do everything in word addresses as you described.

    Barry,

    If you used one of the pre-defined platforms like dsk5505, evm5505 or ezdsp5505 then it should have the correct memory definitions already (which are word addresses as it turns out!).

    Sorry for the confusion.  I'm going to re-work a couple of my previous posts to try and strike out the stuff that was wrong so I don't confuse anyone in the future.  Then I will crawl under a rock for the remainder of the day.

    Best regards,
    Brad

  • Peter

    I went through the command file and I think that I understand what is happening. My problems started when I tried to download my executable and got an error at an address I thought was legitimate. I tried using the emulator to read and write to it but could not. I had setup the DSP/Bios as it was byte addresses. I will change the entries and relink the code. I inherited a project that has a functiong executable. I was only provided source code. I did not get the PJT, TCF, or any other configuration files.  I do have have 2 meg of external SRAM I will need to map buffers into. I have inserted it into the DSP/Bios but and not sure how to map the buffers there. Could you give some ideas on how to do this and/or what to read to figure it out.

    Thanks for everyone's help. I am sure I will need some more.

    Regards

    Barry

  • Hi Barry,

    You can allocate buffers in a specific memory section using  #pragma as shown below.

    #pragma DATA_SECTION(bufferName, "memorySectionName");

    Pratap.

  • Pratap

    Thanks for the information. I have gradually put together my memory sections to where I can down load the code now.It

    appears that I have a problem reading and writing to my off chip SRAM on my target. It is on to the next problem.

     

    Thanks

    Barry Turner