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.

problem on Rebuild EVM c6678 library with gcc

Hi to all

i try to rebuild 'ti.platform.evm6678l.ae66' library in pdk c6678 with the version of gcc (c6x-uclinux-gcc)

i have two solution:

S1 : rewrite makefile and rebuild library from source file (or edit exist makefile)

S2 : use ccs and edit project properties and replace CGT compiler to gcc

Q1:Do you know a better solution?

i start work on S2 but compiler and archiver  options (FLAGS) is completely different  and after removing all option (falgs) console report  this:

....

../src/evm66x_i2c.c: line 1: /bin: is a directory
../src/evm66x_i2c.c: line 6: /bin: is a directory
../src/evm66x_i2c.c: line 7: ccsObjs.opt: command not found
../src/evm66x_i2c.c: line 8: ccsObjs.opt: command not found
../src/evm66x_i2c.c: line 9: ccsObjs.opt: command not found

......

that seem due to changing compiler

Q2: anybody can help me for this issue?

thanks

Ebi

  • update:
    when i try to replace CGT command to gcc "--include_path=" (in CCS project properties),"--include_path=" is unrecognized in gcc.

    how can i change aliases from "--include_path" to "-I" ? (both support in CCS)

  • Hi Ebi,
    This thread has been moved to device forum from Compiler forum for assistance. Thank you.
  • Did you add the compiler path and able to detect in CCS ?
    Refer to the following TI wiki.

    processors.wiki.ti.com/.../C6000_Linux_Support
  • Hi Titusrathinaraj 

    Sorry for replaying late , I was out of office

    thanks for this link  but i need static library (don't need dynamic library)

    i import platform_lib_evmc6678 to CCS 5.2

     add compiler path in project properties > c6000 compiler

    add and change header file directory

    after build project i have error in console : --include_path unrecognized 

    i try to change "--include_path" to "-I" in .mk file manually but compiler can't find header file

    ----------------------------------------------------------------------

    i try to use CCS cross compiler but compiler can't use PDK library  (.lib) file (error : can not find library file)

    how can i rebuild pdk library or where can i find platform library  for linux c6x ?

    (i need access to GPIO and LED using linux c6x on c6678 EVM)

    thanks

    Ebi

  • Hi,

    how can i rebuild pdk library or where can i find platform library for linux c6x ?

    (i need access to GPIO and LED using linux c6x on c6678 EVM)

    I don't think that we can build pdk platform project for linux-c6x.
    We have driver for GPIO in linux-c6x location.
    arch/c6x/drivers/
  • Hi Ebi,
    We do not support such requirements. The PDK sources are part of MCSDK, you can write your own make file and select compiler to build it on your environment.
    Thank you.
  • Hi Titusrathinaraj
    thanks for your replay and sorry for replying late (i was on vacation)
    i succeed to control GPIO using PDK source file on linux c6x but it seem unusual solution.
  • Hi raja

    thanks for your replay and sorry for replying late (i was on vacation)

    i succeed to use pdk source file for control GPIO but i have problem to control "user LED "

    this is my function (compile with c6x-uclinux-gcc)

    void fpgaControlUserLEDs(FPGA_UserLed uchUserLEDNum, 
                             FPGA_LedStatus uchStatus)
    {
    	unsigned char uchValue = 0; /* Default value */
    	unsigned char temp;
    	unsigned int ret;
    
        if ( (FPGA_USER_LED0 > uchUserLEDNum) ||
             (FPGA_USER_LED3 < uchUserLEDNum)) {         
             /* No action for the invalid LED numbers */
             return;
        }         
    
        /* Read the current LED status */
        ret = fpgaReadConfigurationRegister(FPGA_DBG_LED_OFFSET, &uchValue);
        printf ("Status = %d \n" , uchValue);
        if (ret != SUCCESS) {        
        	printf ("Result is Bad \n  ");
        	//IFPRINT (platform_write( "fpgaControlUserLEDs: Error in reading the fpga config reg\n"));
        }
    
    
        /* Turn on/off the corresponding LED bit number */     
        switch (uchStatus) {
            case FPGA_LED_OFF:
                temp      = (FPGA_LED_ON << uchUserLEDNum);
                uchValue |= temp;
                break;
            case FPGA_LED_ON:
                temp      = ~(FPGA_LED_ON << uchUserLEDNum);
                uchValue &= temp;            
                break;
            default: /* No action */
                break;
        }
    
        /* Send command to turn on/off the Corresponding LED */
        ret = fpgaWriteConfigurationRegister(FPGA_DBG_LED_OFFSET, uchValue);
        printf ("Status = %d  \n" , uchValue);
        if (ret != SUCCESS) {        
        	//IFPRINT (platform_write( "fpgaControlUserLEDs: Error in writing the fpga config reg\n"));
        	printf ("Result is Bad \n  ");
        }
        printf ("Result is Good \n  ");
    
        return;
    }

    and this is result for Linux (program build without error but not working )

    Status = 255
    Status = 255
    Result is Good
    LED off
    Status = 255
    Status = 253
    Result is Good
    LED on
    Status = 255
    Status = 255
    Result is Good
    LED off
    Status = 255
    Status = 253
    Result is Good
    LED on
    Status = 255
    Status = 255
    Result is Good
    LED off
    Status = 255
    Status = 253
    Result is Good
    LED on

    result for same function in CCS project (working correctly):

    Status = 0
    Status = 2
    Result is Good
    LED off
    Status = 2
    Status = 0
    Result is Good
    LED on
    Status = 0
    Status = 2
    Result is Good
    LED off
    Status = 2
    Status = 0
    Result is Good
    LED on
    Status = 0
    Status = 2
    Result is Good
    LED off
    Status = 2
    Status = 0
    Result is Good
    LED on

    main file and all of source file is same

    can you help me what's wrong in my code ?

    thanks 

    Ebi

  • update :

    i try to resolve problem

    below is spi timing diagram for c6678 EVM (READ operation)

    i check spi send / receive data 

    send address in CCS project and linux project is same , but receive data for linux project is incorrect :

    debug LED register is 0xFF instead of 0x0

    why fpga send incorrect data to DSP when i use linux ?

    thanks

    Ebi

  • Hi Ebi,
    I understand that you are running CCS project in "No boot" mode. What is the boot mode used for running linux on C66xx core?
    Thank you.
  • Hi raja

    thanks for following

    i running linux in "NAND boot"

    Ebi

  • Hi Ebi,
    From my understanding, some initialization not happened however I do not know how to debug that on your new setup.
    Thank you.

  • Raja,
    I think you are right

    thank you
  • Hi Ebi,
    Thank you for closing this post however please post back once you got the solution to solve this issue. That might help many e2e users in future.

    Thank you.
  • Hi Raja

    sorry for replying i working on other Project

    i succesed to use PDK library for control  GPIO:

    in ubuntu host => create c project in CCS =>select linux GCC => add most PDK,GCC header and source file and some header file from CCS compiler directory

    but i can't use PDK header and source file for control debug LED(spi) i think some initialization  procedure corrupt when i use both PDK and GCC source file 

    i hope this post is usefull for others

    best regards

    Ebi

  • Hi Ebi,
    Thank you for the post.
  • Hi,

       I am working on 6657 dsp processor and I will have to change the pdk libraries (for a future custom board).

    I need to know if exist a document that describe the build procedure as ti.platform.evm6657l.ae66, ti.csl.ae66,

    ti.transport.ndk.nimu.ae66 and so on, and if exists where I can catch it.

    We will try to remove phy device (sgmii) and I need to study if it's possible and the sw impacts.

    I have found some links that describe the pdk demo build or platform_lib but it's not enough.

    I use CCS 6.1.3, bios_6_46_00_23, on linux host.

    Installed packets:

    ti-processor-sdk-rtos-c665x-evm-03.00.00.04-Linux-x86-Install.bin

    CCS6.1.3.00034_linux

    bios_setuplinux_6_46_00_23.bin

    Best Regards,

    Dario

  • Hi

    in this post , i try to rebuild PDK with c6x-uclinux-gcc for Linux-c6x but i understand that you try to  edit PDK and rebuild library for CCS (cl6x) in Linux environment  .

    i hope this link be useful :

    (i think if you create new thread, TI employee can help you better )

    Ebi