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.

CCS/66AK2H12: Compile / Build : change origin of generated code

Part Number: 66AK2H12

Tool/software: Code Composer Studio

XDCtools 3.50.02.20, SYS/BIOS 6.50.01.12, NDK 2.25.1.11

My SBC target does not have the 512MB DIMM that the EVM has. I'd like to remove the DIMM from the EVM and run my project out of the on board 512MB but I can not figure out the steps needed to make this happen. If I remove the DIMM, the compiled project still tries to load into 0x8000_0000, which no longer exists. I looked through the CFG and it is not appearent to me how to set the origin. 

FYI The project I am building uses the NDK and the emac example to run a TCP/IP server.

  • Hi Mike,

    I've forwarded your query to the software experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Made progress. SYS/BIOS User's Guide (spruex3), Section 7.2.2,Create a Custom Platform.
    I create a new platform with DDR base address 0x6000_0000 and size of 0x2000_0000.
    I can switch my project platform to the one I just created. It loads and runs. I can see it is running out of an origin in the 0x6000_0000 memory area. Good.
  • But my emac hello world project does not work. I am using a local ip address. The code runs to

    rc = NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr );

    and never returns nor even does the callback to NetworkIPAddr (). The EVM does not respond to ping.

    If I pause and look under the ROV Classic > NDK, the ip address is still 0.0.0.0. So not assigned therefor no callback?

    Near as I can tell I am spinning in the networkStack task : NetScheduler()

    The code does work when the DIMM is in place and the original platform is used.
  • Hi,

    What example you are trying to run on your board? Is it NIMU_emacExample_EVMK2HC66BiosExampleProject? From my map file:

    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    L2SRAM 00800000 00100000 000606d8 0009f928 RW X
    MSMCSRAM 0c000000 00600000 0039d8a8 00262758 RW X
    DDR3 80000000 80000000 00000000 80000000 RWIX

    It DOESN'T using DDR.

    In general, let say you have your own board that doesn't have DDR, so you can't use any address 0x80000000 and above. You can put the code into MSMC or L2. If your program has a linker command file, you can specify the code placement there. If you don't use linker command file, but a .cfg file for RTSC project. Please check processors.wiki.ti.com/.../Processor_SDK_RTOS:_TI_RTOS_Tips_And_Tricks
    Something you can do like:

    Program.sectMap[".text"] = "MSMCSRAM";
    Program.sectMap[".const"] = "MSMCSRAM";
    Program.sectMap[".qmss"] = "L2SRAM";
    Program.sectMap[".cppi"] = "L2SRAM";

    You created a 512MB section from 0x6000_0000. This is the PCIE data memory.

    Regards, Eric
  • Thanks for looking at this Eric. I am running on the ARM. It is a project derived from the PDK EMAC example. (changed to use TCP instead of UDP). No real changes until after the connections is up and the callbacks are called. Using a static IP.
  • I went back and imported again the original example. This is NIMU_emacExample_EVMK2H_armBiosExampleProject

    I am running on the EVM. With no changes, a clean debug build it works, at least as far as the IP address displays on the CCS console and I can ping it. So the stack is alive.

    I change to my custom platform so that it now loads to 0x6000_0000 memory. Reboot the EVM and run again. Now the code loads into 0x6000_0000 memory area as expected and runs. I get all the same printout upto and including "StackTest: using localIp" but the IP never displays so static void NetworkIPAddr( IPN IPAddr, uint IfIdx, uint fAdd ) is never getting called. EVM no longer response to ping.

    Under Project >RTSC Tools>Platform>Edit/New I can view my platform. I have:
    Clock speed set to 125.0.
    Nothing under Device Memory, Customize Memory not checked.
    External Memory I have added one entry; DDR : 0x60000000 : 0x20000000 : code/data/RWX
    Memory Sections - all three set to DDR
  • My co-worker might have figure out the problem. 0x6000_0000 memory is not i/o coherent where as the DIMM at 0x8000_0000 is. As an experiment he suggested disabling cache. I tried this and now the example works (as far as I tested which is to ping it). Please see his post at: e2e.ti.com/.../631759
  • Hi,

    Thanks for sharing the details! So your issue is to use DDR3B instead of DDR3A on ARM. However, from the datasheet, No IO coherency supported for this region (512M starting from 0x6000_0000), you have to disable the cache.

    Regards, Eric