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/TMS320C5515: CSL 3.07 installation problems (CCSv6.1

Part Number: TMS320C5515


Tool/software: Code Composer Studio

Hi everyone,

I am trying to install CSL3.07 on CCSv6.1 I have never done it before and I am having a hard time. I posted to the CCS forum was told to ask my ask questions here. My previous posts that show the steps I took are here: https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/583301/2144003

I am still having some problems. Please have a look at the pic below. I believe all "nand" related errors are because, the functions shown in the error tab are defined both in csl_nand.c and csl_emif.c and declared both in csl_nand.h and csl_emif.h (names of the functions are same, only the arguments are of different type). When I tried go to one of the function's declaration I am given 2 options, as seen in the pic, to go to as CCS finds 2 declarations (and also 2 definitions). If I remove lets say csl_emif.c the errors disappear. I won't be using either emif or nand. If you say it will be a viable solution, I can get rid of them but still want to know why the files were created this way and correct way to use them. 

Another problem is the linker file. I found a suitable linker file on the forum that enables the use of printf and I am using that one ( given in: https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/215845/761954 ). It seems that I need to customize the linker to my needs. I have started reading 9.6.4 in www.ti.com/.../spru280i.pdf  as suggested in one of the post. If have suggested solutions I would like to hear them (especially if you think this is not a part of the installation process). My log console is given below the pic. 

For both of my problems what I want to know is, did you have similar problems too while installing CSL or it is just me doing some fundamental mistake. It is the first time I am installing CSL.

My main is simply this:

#include <stdio.h>

#include "csl_sysctrl.h"

/*
* main.c
*/
int main(void)
{

SYS_setEBSR(CSL_EBSR_FIELD_PPMODE, CSL_EBSR_PPMODE_0);

return 0;
}


**** Build of configuration Debug for project DSP5515 ****

"E:\\Texas\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../src/csl_emif.c'
'Invoking: C5500 Compiler'
"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/bin/cl55" -v5515 --memory_model=large -g --include_path="E:/Texas/bios_5_42_02_10/packages/ti/bios/include" --include_path="E:/Texas/c55_csl_3.07/inc" --include_path="E:/Texas/bios_5_42_02_10/packages/ti/rtdx/include/c5500" --include_path="E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/include" --include_path="E:/Texas/bios_5_42_02_10/packages" --define=c5515 --display_error_number --diag_warning=225 --ptrdiff_size=16 --algebraic --asm_source=algebraic --preproc_with_compile --preproc_dependency="src/csl_emif.pp" --obj_directory="src" "../src/csl_emif.c"
'Finished building: ../src/csl_emif.c'
' '
'Building target: DSP5515.out'
'Invoking: C5500 Linker'
"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/bin/cl55" -v5515 --memory_model=large -g --define=c5515 --display_error_number --diag_warning=225 --ptrdiff_size=16 --algebraic --asm_source=algebraic -z -m"DSP5515.map" --stack_size=0x200 --heap_size=0x400 -i"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/lib" -i"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/include" --reread_libs --display_error_number --warn_sections --xml_link_info="DSP5515_linkInfo.xml" --rom_model --sys_stacksize=0x200 -o "DSP5515.out" "./main.obj" "./src/csl_audioClass.obj" "./src/csl_cdc.obj" "./src/csl_dat.obj" "./src/csl_dma.obj" "./src/csl_emif.obj" "./src/csl_gpio.obj" "./src/csl_gpt.obj" "./src/csl_hid.obj" "./src/csl_i2c.obj" "./src/csl_i2c_ioExpander.obj" "./src/csl_i2s.obj" "./src/csl_intc.obj" "./src/csl_irqplug.obj" "./src/csl_lcdc.obj" "./src/csl_mcbsp.obj" "./src/csl_mcspi.obj" "./src/csl_mem.obj" "./src/csl_mmcsd.obj" "./src/csl_mmcsd_ataIf.obj" "./src/csl_msc.obj" "./src/csl_nand.obj" "./src/csl_pll.obj" "./src/csl_rtc.obj" "./src/csl_sar.obj" "./src/csl_sdio.obj" "./src/csl_spi.obj" "./src/csl_sysctrl.obj" "./src/csl_uart.obj" "./src/csl_uhpi.obj" "./src/csl_usb.obj" "./src/csl_wdt.obj" "./src/evm5515.obj" "./src/evm5515_gpio.obj" "./src/evm5515_i2c.obj" "./src/vectors.obj" "../C5515.cmd" -l"libc.a"
<Linking>
error #10056: symbol "_NAND_enableHwECC" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_setup" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"

>> Compilation failure
error #10056: symbol "_NAND_readNBytes" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_hasCacheProg" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_hasCopyBack" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_hasRandomWrite" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_setAddress" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_setLatchEnableOffset" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_sendCommand" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_isStatusWriteProtected" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_readECC" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_writeNBytes" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_getBankInfo" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_disableHwECC" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_hasRandomRead" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
error #10056: symbol "_NAND_checkCommandStatus" redefined: first defined in
"./src/csl_emif.obj"; redefined in "./src/csl_nand.obj"
warning #10247-D: creating output section ".switch" without a SECTIONS
specification
"../C5515.cmd", line 74: error #10099-D: program will not fit into available
memory. placement with alignment/blocking fails for section ".text" size
0x20835 page 0. Available memory ranges:
DARAM1 size: 0x2000 unused: 0x2000 max hole: 0x2000
"../C5515.cmd", line 80: error #10099-D: program will not fit into available
memory. run placement with alignment/blocking fails for section ".bss" size
0x29ec page 0. Available memory ranges:
DARAM5 size: 0x2000 unused: 0x2000 max hole: 0x2000
"../C5515.cmd", line 72: error #10099-D: program will not fit into available
memory. placement with alignment/blocking fails for section "vectors" size
0x200 page 0. Available memory ranges:
VECS size: 0x100 unused: 0x100 max hole: 0x100
error #10010: errors encountered during linking; "DSP5515.out" not built
gmake: *** [DSP5515.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

  • Hi Denn,

    I've forwarded this to the SW experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi,

    In the meanwhile, I have been digging deeper to solve these problem. For the memory error, I have found another linker file from one of the example projects and I have changed the SARAM origin and lenght; now it seems to be working fine. I hope these changes do not cause linker related errors in the future. The linker content is below and any comments are welcome.

    Regarding the multiple function definition/declaration problem. It is because of the function overloading. The functions with the same name (and with different arguments) have to be defined in the ‘ extern “C” {} ‘ block. However for this, __cplusplus has to be defined. In my case it is not and condition is grayed out. Please have a look at the pic. Obviously I have some mis-settings or something. I am now working on this. I will be glad if you can please suggest me some solutions.

    Thanks

    -stack 0x1000 /* PRIMARY STACK SIZE */
    -sysstack 0x1000 /* SECONDARY STACK SIZE */
    -heap 0x3F80 /* HEAP AREA SIZE */

    MEMORY
    {
    MMR (RW) : origin = 0000000h length = 0000C0h /* MMRs */
    VEC (RX) : origin = 00000C0h length = 000300h /* on-chip ROM vectors */
    DARAM (RW) : origin = 0000400h length = 007A00h /* on-chip DARAM */
    SARAM (RW) : origin = 0008000h length = 01FE80h /* on-chip SARAM */
    }

    SECTIONS
    {
    vectors : > VEC ALIGN = 256
    .text : > SARAM ALIGN = 4
    .stack : > SARAM ALIGN = 4
    .sysstack : > SARAM ALIGN = 4
    .data : > SARAM
    .bss : > SARAM, fill = 0
    .cinit : > SARAM
    .const : > SARAM

    .sysmem : > DARAM
    .cio : > DARAM
    .buffer1 : > DARAM
    .buffer2 : > DARAM
    }

  • Denn,
    Could you please attach your CCS project here to take a look?
    Also, in your csl_general.h file in C55XXCSL_LP, are you defining the correct marco for C5515? Please post that file here as well please.

    Lali
  • Hi Lali,

    I believe I have defined correct macro, all the platforms other than C5515_EVM are grayed out. Please take a look. Thank you for your help in advance.

    Denn project c55_csl_3.07.rar

  • Denn,

    I was able to successfully build the project after some changes. Please find the working project attached. Here is what my CCS workspace looks like below with the .out in the Debug folder. Please ignore the blurred out areas as they aren't relevant to your project. I removed the src folder from your project as it was causing the redefinition error you were seeing. Its best to pick up those definitions from the C55XXCSL_LP.lib instead which is can be imported into your workspace from C:\ti\c55_lp\c55_csl_3.07\ccs_v6.x_examples\C55XXCSL_LP. You will also need atafs_bios_drv_lib as well to build. Take a look at how I added the .lib in the linker section of your project properties.

    Your csl_general.h looks good.

    The default linker command (.cmd) files in CCS have problems are we are in the process of fixing these in a future CCS release. Apologies for that.

    Hope this helps.

    Lali

    ./cfs-file/__key/communityserver-discussions-components-files/791/4162.test_5F00_C5515.zip

  • Hi Lali,

    It indeed helped a lot. Thanks a million for your help. I have changed the paths accordingly and now it seems to debug and run.

    However I would like to ask one last thing. I see that you have sent me a new linker command file. Sometimes I get the following warning (interestingly not always). Is this because of the problem in the linker command file you have mentioned or I am again missing something about the C55XXCSL_LP.lib that it is complaining about. This is the line (  .vectors_csl { C55XXCSL_LP.lib<vectors.obj> (vectors) } > SARAM  )

    This will be a long running project, I don't want to let such warnings to get me stuck in the further stages of the project. Did you get it when you build the project? Could you please comment on this warning?

    Thanks

    **** Build of configuration Debug for project DSP5515 ****

    "E:\\Texas\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: DSP5515.out'
    'Invoking: C5500 Linker'
    "E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/bin/cl55" -v5515 --memory_model=large -g --define=c5515 --display_error_number --diag_warning=225 --ptrdiff_size=16 --algebraic --asm_source=algebraic -z -m"DSP5515.map" --stack_size=0x200 --heap_size=0x400 -i"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/lib" -i"E:/Texas/ccsv6/tools/compiler/C5500 Code Generation Tools 4.4.1/include" -i"E:/Texas/c55_csl_3.07/C55XXCSL_LP/Debug" --reread_libs --display_error_number --warn_sections --xml_link_info="DSP5515_linkInfo.xml" --rom_model --sys_stacksize=0x200 -o "DSP5515.out" "./main.obj" "../C5515.cmd" -l"libc.a" -l"C55XXCSL_LP.lib"
    <Linking>
    "../C5515.cmd", line 59: warning #10068-D: no matching section
    'Finished building target: DSP5515.out'
    ' '

    **** Build Finished ****

  • Denn,

    Excellent! glad that you are unblocked and getting a good build.
    Yes, I see the same warning. You can remove that line from the .cmd file. I think it was an artifact from another project I was working on and forgot to remove the line before sharing the file. You may also get a shift count too large warnings, but I don't think that would be an issue.
    When the msb=15 and lsb=0 the shift is 16 bit. The compiler thinks its strange.

    Lali
  • Thank you very much Lali! :)