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.

66AK2G12: How to get started with the PRU ICSS on the ICEK2G development board

Part Number: 66AK2G12

Hello, 

I am trying to run some basic examples using the PRU ICSS on the ICEK2G development kit using the PRU software support package found at https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package 

A online TI online training for the PRU is centered around the beaglebone, and during the series one presenter uses an initialization file to configure the PRU prior to loading its program code. This does not seem to be available for the ICEK2G board. 

I would like to :

  1. Debug the PRU application in Code Composer Studio 
  2. Control the PRU operation from a TI-RTOS running on the DSP. 

How can I get started doing this please ?

  • The starting point for PRU_ICSS development on iceK2G is Processor SDK RTOS that has the PRU-ICSS Low level driver and ICSS EMAC implementation for the device:

    https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_device_drv.html#pruss

    https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_device_drv.html#icss-emac 

  • Thank you for the information Rahul. I am having difficulty to compile the example code in the first link due to undefined symbols.

    The way that I have found to work is to include driver headers in my c code ( #include <ti/...> ) and then adding the path to the PDK directory in Build Settings -> XDCtools -> Basic Options. Doing only so will result in the linker complaining about not finding the symbols. To resolve this I create links between the associated source files (.c) and my current project. That way I have managed to compile code using ti's drivers.

    In this case ( see the attached build log ), it seems more complex as I cannot locate where the files are. How can I go about this and is there an easier way to facilitate working with these drivers? 

    Luke 

    build-log.txt
    **** Build of configuration Debug for project pruicss-example ****
    
    "C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
     
    Building file: "../pruss_test_wSoCFile.cfg"
    Invoking: XDCtools
    "C:/ti/ccs1000/xdctools_3_61_00_16_core/xs" --xdcpath="C:/ti/bios_6_82_01_19/packages;C:/ti/pdk_k2g_1_0_16/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evmTCI66AK2G02 -r release -c "C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7" --compileOptions "-g" "../pruss_test_wSoCFile.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring pruss_test_wSoCFile.xe66 from package/cfg/pruss_test_wSoCFile_pe66.cfg ...
    generating custom ti.sysbios library makefile ... 
    	Linking with library ti.drv.pruss:./lib/c66/release/ti.drv.pruss.ae66
    	Linking with library ti.osal:./lib/tirtos/k2g/c66/release/ti.osal.ae66
    	Linking with library ti.utils.profiling:./lib/c66/release/ti.utils.profiling.ae66
    	Linking with library ti.csl:./lib/k2g/c66/release/ti.csl.ae66
    Starting build of library sources ...
    making C:/Users/luke.CORP/ccs/pru-dsp/pruicss-example/src/sysbios/sysbios.ae66 ...
    cle66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/BIOS.c ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme66 C:/ti/bios_6_82_01_19/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj c62_TaskSupport_asm.obj ti_tls_get_tp.obj timer64_Timer_asm.obj ...
    Build of libraries done.
    cle66 package/cfg/pruss_test_wSoCFile_pe66.c ...
    Finished building: "../pruss_test_wSoCFile.cfg"
     
            1 file(s) copied.
    making ../src/sysbios/sysbios.ae66 ...
    gmake[1]: Nothing to be done for 'all'.
    Building file: "../main.c"
    Invoking: C6000 Compiler
    "C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7/bin/cl6x" -mv6600 --include_path="C:/Users/luke.CORP/ccs/pru-dsp/pruicss-example" --include_path="C:/ti/bios_6_82_01_19/packages/ti/posix/ccs" --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7/include" --define=USE_BIOS --define=SOC_K2G --define=C66x --define=k2g02 --define=dsp0 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="configPkg/compiler.opt"  "../main.c"
    "../main.c", line 213: warning #121-D: return value type does not match the function type
    "../main.c", line 289: warning #121-D: return value type does not match the function type
    Finished building: "../main.c"
     
    making ../src/sysbios/sysbios.ae66 ...
    gmake[2]: Nothing to be done for 'all'.
    Building target: "pruicss-example.out"
    Invoking: C6000 Linker
    "C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7/bin/cl6x" -mv6600 --define=USE_BIOS --define=SOC_K2G --define=C66x --define=k2g02 --define=dsp0 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"pruicss-example.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7/lib" -i"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.7/include" --reread_libs --define=DSP_CORE=1 --diag_wrap=off --display_error_number --warn_sections --xml_link_info="pruicss-example_linkInfo.xml" --rom_model -o "pruicss-example.out" "./main.obj" -l"configPkg/linker.cmd"  -llibc.a 
    <Linking>
     
     undefined    first referenced                                                                              
      symbol          in file                                                                                   
     ---------    ----------------                                                                              
     Board_init   ./main.obj                                                                                    
     UART_printf  ./main.obj                                                                                    
     pruss_config C:\ti\pdk_k2g_1_0_16\packages\ti\drv\pruss\lib\c66\release\ti.drv.pruss.ae66<pruicss_drv.oe66>
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "pruicss-example.out" not built
     
    >> Compilation failure
    makefile:140: recipe for target 'pruicss-example.out' failed
    gmake[1]: *** [pruicss-example.out] Error 1
    makefile:136: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****
    

  • Thank you for the information Rahul. I am having difficulty to compile the example code in the first link due to undefined symbols.

    The way that I have found to work is to include driver headers in my c code ( #include <ti/...> ) and then adding the path to the PDK directory in Build Settings -> XDCtools -> Basic Options. Doing only so will result in the linker complaining about not finding the symbols. To resolve this I create links between the associated source files (.c) and my current project. That way I have managed to compile code using ti's drivers.

    In this case ( see the attached build log ), it seems more complex as I cannot locate where the files are. How can I go about this and is there an easier way to facilitate working with these drivers? 

    Luke 

    build-log.txt

  • Can you share your .cfg file here. The build indicates that you are not linking to the board library and the UART driver so there is some issue in your build,