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.

Compiler/TMS320C6678: integrated NDK and SRIO

Part Number: TMS320C6678


Tool/software: TI C/C++ Compiler

Hi

My tools:

OS: win7

CCS: 7

I started to integrate SRIO and NDK and now I have a strange problem!!

I describe my actions as below:

1) I made a NDK project and it works correct(The base project was "Client" example and I could ping the DSP). The properties of the project was as below:

MCSDK: 2.1.2.6

PDK: 1.1.2.6

NDK: 2.21.2.43

SYS/BIOS: 6.3.6.50 

XDCTOOLS: 3.23.4.60

CGT: 8.1.2

2) I made a SRIO DIO project and I can communicated to FPGA successfully. The properties of the project was as below:

EDMA3: 2.11.5

IPC: 1.24.3.32

MCSDK: 2.1.2.6

PDK: 1.1.2.6

NDK: 2.21.2.43

SYS/BIOS: 6.3.6.50 

XDCTOOLS: 3.23.4.60

CGT: 8.1.2

3) I started to add NDK project to SRIO project.

3.1) I made a new "*.cfg" file and I could build the project successfully.

3.2) I added NDK configurations(I copy and paste stack test function with all headers from my NDK project.), I could build the project successfully.

3.3) I call stack test function as a task but when I build the project some errors happened as below:

The console prints as below:

**** Build of configuration Debug for project SRIO_Develpment_NDK2 ****

"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k all 
'Building file: ../Srio_Source/benchmarking.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6600 --abi=eabi -Ooff --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.2/include" -g --optimize_with_debug=off --display_error_number --diag_wrap=off --diag_warning=225 --preproc_with_compile --preproc_dependency="Srio_Source/benchmarking.d" --obj_directory="Srio_Source" --cmd_file="configPkg/compiler.opt" "../Srio_Source/benchmarking.c"
"../Srio_Source/benchmarking.c", line 645: warning #994-D: missing return statement at end of non-void function "system_init"
"../Srio_Source/benchmarking.c", line 770: warning #179-D: function "producerTests" was declared but never referenced
'Finished building: ../Srio_Source/benchmarking.c'
' '
'Building target: SRIO_Develpment_NDK2.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6600 --abi=eabi -Ooff -g --optimize_with_debug=off --display_error_number --diag_wrap=off --diag_warning=225 -z -m"SRIO_Develpment_NDK2.map" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.2/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.2/include" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="SRIO_Develpment_NDK2_linkInfo.xml" --rom_model -o "SRIO_Develpment_NDK2.out" "./Srio_Source/Net.obj" "./Srio_Source/benchmarking.obj" "./Srio_Source/cppi_device.obj" "./Srio_Source/listlib.obj" "./Srio_Source/osal.obj" "./Srio_Source/qmss_device.obj" "./Srio_Source/resourcemgr.obj" "./Srio_Source/srio_device_tput.obj" "./Srio_Source/srio_dio_tput.obj" "./Srio_Source/srio_drv.obj" "./Srio_Source/srio_laneconfig.obj" "./Srio_Source/srio_status_decode.obj" "./Srio_Source/tput_utils.obj" "../Srio_Source/benchmarking.cmd" -l"configPkg/linker.cmd" -llibc.a 
<Linking>

 undefined               first referenced                                                                                                        
  symbol                     in file                                                                                                             
 ---------               ----------------                                                                                                        
 Osal_nimuFree           C:\ti\pdk_C6678_1_1_2_6\packages\ti\transport\ndk\nimu\lib\debug\ti.transport.ndk.nimu.ae66<nimu_eth.obj>               
 Osal_nimuMalloc         C:\ti\pdk_C6678_1_1_2_6\packages\ti\transport\ndk\nimu\lib\debug\ti.transport.ndk.nimu.ae66<nimu_eth.obj>               
 Osal_paBeginMemAccess   C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66>                                                  
 Osal_paEndMemAccess     C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66>                                                  
 Osal_paMtCsEnter        C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66>                                                  
 Osal_paMtCsExit         C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66>                                                  
 Osal_platformFree       C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\debug\ti.platform.evm6678l.ae66<platform.obj>   
 Osal_platformMalloc     C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\debug\ti.platform.evm6678l.ae66<platform.obj>   
 Osal_platformSpiCsEnter C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\debug\ti.platform.evm6678l.ae66<evmc66x_spi.obj>
 Osal_platformSpiCsExit  C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\debug\ti.platform.evm6678l.ae66<evmc66x_spi.obj>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "SRIO_Develpment_NDK2.out" not built
gmake: *** [SRIO_Develpment_NDK2.out] Error 1
gmake: Target 'all' not remade because of errors.

>> Compilation failure
makefile:152: recipe for target 'SRIO_Develpment_NDK2.out' failed

**** Build Finished ****

I try a lot but I couldn't solve the problem.

Please, guide me what should I do?

Regards

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

    BR
    Tsvetolin Shulev
  • Hi

    Please,answer me, I'm waiting.

    Regards

  • dariush,

    Did you check if the files that have the OSAL function definitions have been included in your project?
    We have moved to Processor SDK, any particular reason that you have to use MCSDK and PDK 1.x?

    Regards,
    Garrett
  • Garrett

    If you look at errors, "NDK" library produce the error!! Maybe I should add a particular module at "*.cfg" file?!!

    For LAN, my base project was TI client example that located at MCDSK directory.

    For SRIO, my base project was TI "Tput_Benchmarking" that located at PDK directory.

    Regards

  • dariush,


    The reason of 'NDK' library produces the error is the referenced OSAL functions are not defined. Osal functions need to be implemented by applications. You should be able to find these functions definition in platform_osal.c under mcsdk_2_01_02_06\examples\ndk\client\.

    Regards,
    Garrett

  • Dear Garrett

    I could build the project, I modified the project as below such that SRIO and NDK work in parallel:

    1) I created a new "*.cfg" file.

    2)I created two memory region for ethernet and SRIO.

    3)I changed the queue numbers,

    4) I changed the event ID and Interrupt number for SRIO.

    5) SRIO and NDK created in two tasks.

    The console prints attached as below:

    
     Main Start 
    QMSS successfully initialized 
    CPPI successfully initialized 
    PA successfully initialized 
    ********************************
    *********** CONSUMER ***********
    ********************************
    WARNING: Please ensure that the CONSUMER is executing before running the PRODUCER!!
    Debug: Waiting for module reset...
    Debug: Waiting for module local reset...
    Debug: Waiting for SRIO ports to be operational...  
    Debug: SRIO port 0 is operational.
    Debug:   Lanes status shows lanes formed as one 4x port
    GPIO INIT...
    
    Debug: DrvConfig Rx host descriptor 0x@10856d00 Buffer: 0x@90000cc0 Return Queue 0x2e0
    Debug: DrvConfig Rx host descriptor 0x@10856d80 Buffer: 0x@90000dc0 Return Queue 0x2e0
    Debug: DrvConfig Rx host descriptor 0x@10856e00 Buffer: 0x@90000ec0 Return Queue 0x2e0
    Debug: DrvConfig Rx host descriptor 0x@10856e80 Buffer: 0x@90000fc0 Return Queue 0x2e0
    Debug: DrvConfig Ping: 0x1085ab00 Pong: 0x1085ab08
    Debug: DrvConfig Rx Free Queue: 0x2e0 Rx Completion Queue: 0x2c8 Flow Id: 0
    Debug: DrvConfig Tx host descriptor 0x@10856f00 Buffer: 0x@900010c0
    Debug: DrvConfig Tx host descriptor 0x@10856f80 Buffer: 0x@900011c0
    Debug: DrvConfig Tx host descriptor 0x@10857000 Buffer: 0x@900012c0
    Debug: DrvConfig Tx host descriptor 0x@10857080 Buffer: 0x@900013c0
    Debug: DrvConfig Tx Free Queue: 0x2e1 Tx Queue: 0x2a0
    Debug: SRIO Driver Instance 0x@80006ae0 has been created
    Debug: SRIO Driver handle 0x80006ae0.
    
    
    consumerDIONWriteThroughput() Start
    Throughput: (RX side, DIO_NW, 3.125GBaud, 4X, tab delimited)
    Producer 1.
    
    Inter Stack Test
     
    TCP/IP Stack Example Client 
    
    NetworkOpen Stack Test Start
    PASS successfully initialized  
    Ethernet subsystem successfully initialized  
    Ethernet eventId : 48 and vectId (Interrupt) : 7  
    Verify_Init: Expected 16 entry count for gTxFreeQHnd queue 736, found 20 entriesVerify_Init: Expected 0 entry count for Queue number = 898, found 114 entries 
    Verify_Init: Expected 0 entry count for Queue number = 899, found 4 entries 
    Warning:Queue handler Verification failed  
    Registration of the EMAC Successful, waiting for link up .. 
    Network Added: If-1:192.168.0.41 
    Service Status: HTTP     : Enabled  :          : 000 
    
     

    I spend a lot of time and try hard but unfortunately, when I ran the program SRIO and NDK didn't work at the same time.

    Q1: 

    Is it possible I E_Mail my project for you and you see the code?

    Please help me.

    Best Regards

  • dariush,

    >>Warning:Queue handler Verification failed
    With the warning, are you seeing SRIO works fine but NDK fails for ping? Have you looked into this warning?

    >>Debug: DrvConfig Rx host descriptor 0x@10856d00 Buffer: 0x@90000cc0 Return Queue 0x2e0
    SRIO DirectIO doesn't really need CPPI/QMSS, I would recommend you try the example attached in the thread: e2e.ti.com/.../259319

    Would it be possible that you upload your code snippet for QMSS/CPPI in the thread so we can understand how you configure and initialize them?

    Regard, Garrett
  • Hi

    Yes, SRIO works but NDK failed for the ping. I checked a special address in DSP memory that FPGA wrote in that address via SRIO DIO and I saw the data received correctly.

    The sequense of calling my functions(in the main()) are as below:

    1) Qmss_Cppi_PA_Init();

    2) SRIO (enable_srio();, SrioDevice_init();, Srio_init(); and clearSrioStatusErrors(); )

    3) GPIO_INIT();

    4) setupSRIOAppConfig((Qmss_MemRegion)Qmss_MemRegion_MEMORY_REGION1); .

    In stage one I declared and init Qmss, Cppi, and PA.

    In stage two I only modify " SrioDevice_init() " function that I can communicate to FPGA.

    In stage three I init GPIO that I think it didn't have the effect on the problem.

    In stage four I called " setupSRIOAppConfig() ". I called this function with a separate memory region " Qmss_MemRegion_MEMORY_REGION1" from Ethernet memory region "Qmss_MemRegion_MEMORY_REGION0" .

    I should mention that I called SRIO and DIO in two tasks.

    Best Regards

  • Only one point remained, the warning " >>Warning:Queue handler Verification failed "
    when I reset the DSP removed and didn't appear again.
  • Please answer me, I'm waiting for you.

  • Why nobody answers me?!!!! Please, answer me. I'm in trouble.

  • dariush,

    >>I should mentioned that I called SRIO and DIO in two tasks.
    You probably meant SRIO and NDK in two tasks. Are these tasks with the same priority? Can you try to set the SRIO to higher priority to see if it still behaves the same - SRIO works but NDK fails for the ping. This will help determine if any conflict with Cppi_initDescriptor in the use case.

    Regards,
    Garrett
  • Dear Garrett

    I have two static task as below:

    as you see the priority of "DioTestTast" is higher than " StackTest" and it still behaves the same - SRIO works but NDK fails for the ping.  I declared NDK initialization in " StackTest" and make socket(bind...)

    for SRIO in  "DioTestTask".

    The sequense of calling my functions(in the main()) are as below:

    1) Qmss_Cppi_PA_Init();

    2) SRIO (enable_srio();, SrioDevice_init();, Srio_init(); and clearSrioStatusErrors(); )

    3) GPIO_INIT();

    4) setupSRIOAppConfig((Qmss_MemRegion)Qmss_MemRegion_MEMORY_REGION1); .

    What should I do? Do you want I explain and attached "Qmss_Cppi_PA_Init()" function?

    Regards

  • dariush,

    You may try to trace where the NDK/CPSW functionality fails by comparing the NDK/SRIO integrated project and the project commenting out SRIO. Also, look into wireshark trace to see if the NDK fails in tx or rx path. By adding nimu_eth.c file into your project may help debug.

    In the last update of the thread - e2e.ti.com/.../291465, it appears to use same QMSS memory region helps get SRIO+NDK working.

    Regards,
    Garrett