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.

TMS320C6678: Linalg - level 3 BLAS example hanging

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm experiencing some problems running the level 3 BLAS example on the EVM for C6678.

I now rebuilt the libarch and linalg libraries as described in http://processors.wiki.ti.com/index.php/Processor_SDK_Linear_Algebra_Library but the problem persists.

I also connect/launch the program with the options described in http://downloads.ti.com/mctools/esd/docs/openmp-dsp/building_openmp_app.html

I connect via my target config file which executes the setup script for core 0, I load the program onto all cores. When they all point to _c_int00 I am starting them and getting the output:

[C66xx_0] Hello World from thread = 0
Number of threads = 8
[C66xx_1] Hello World from thread = 1
[C66xx_2] Hello World from thread = 2
[C66xx_3] Hello World from thread = 3
[C66xx_4] Hello World from thread = 4
[C66xx_5] Hello World from thread = 5
[C66xx_6] Hello World from thread = 6
[C66xx_7] Hello World from thread = 7
L2 SRAM size is 393216, total L2 size is 524288.

It then hangs at the the function tiCblasNew() and when I pause core 0 I see:

GOMP_critical_start() at tomp_util.h:150
bli_init() at bli_init.c55

Any hints on that?

Thank you very much for your help and please let me know if you need any additional information.

Best wishes,

Idris

  • Here some additional info/insights:

    Whenever I reset the EVM (full reset), the executable built via makefile works. The second time I run it, it crashes (didn't save the log, can post it if needed).

    When I build via CCS, the build log is the following:

    **** Clean-only build of configuration Debug for project omp_linalglib2 ****
    
    /home/idris/ti/ccsv8/utils/bin/gmake -k -j 4 clean -O 
     
    rm -rf  "omp_linalglib2.hex"  "configPkg/linker.cmd" "configPkg/compiler.opt"  "omp_linalglib2.out" 
    rm -rf "dgemm_test.obj" "fc_config_c6678.obj" "ticblas_config.obj" 
    rm -rf "dgemm_test.d" "fc_config_c6678.d" "ticblas_config.d" 
    rm -rf  "configPkg/" 
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug for project omp_linalglib2 ****
    
    /home/idris/ti/ccsv8/utils/bin/gmake -k -j 4 all -O 
     
    Building file: "../omp_config.cfg"
    Invoking: XDCtools
    "/home/idris/ti/xdctools_3_50_08_24_core/xs" --xdcpath="/home/idris/ti/bios_6_73_00_12/packages;/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages;/home/idris/ti/pdk_c667x_2_0_11/packages;/home/idris/ti/ipc_3_50_02_02/packages;/home/idris/ti/edma3_lld_2_12_05_30C/packages;/home/idris/ti/framework_components_3_40_02_07/packages;/home/idris/ti/framework_components_3_40_02_07/examples;/home/idris/ti/linalg_1_2_0_0/packages;/home/idris/ti/libarch_1_0_0_0/packages;/home/idris/ti/xdais_7_24_00_04/packages;/home/idris/ti/xdais_7_24_00_04/examples;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.runtime.openmp.platforms.evm6678 -r debug -c "/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4" "../omp_config.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring omp_config.xe66 from package/cfg/omp_config_pe66.cfg ...
    Configuring OpenMP runtime for device: TMS320C6678
    Override RMAN.maxAlgs = 1
    Setting to rman's functions 
    useModule Settings: 6600
    Auto-registering resource manager for EDMA3CHAN
    generating custom ti.sysbios library makefile ... 
    ********** GUNP Program.build.target.isa 66
    Inside EDMA3 RM getLibs
        will link with ti.sdo.edma3.rm:lib/c6678-evm/66/debug/edma3_lld_rm.ae66
    	Linking with library ti.drv.qmss:./lib/c66/ti.drv.qmss.ae66
    	Linking with library ti.csl:./lib/c6678/c66/release/ti.csl.ae66
    Starting build of library sources ...
    making /home/idris/workspace_v8/omp_linalglib2/src/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory `/home/idris/workspace_v8/omp_linalglib2/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `/home/idris/workspace_v8/omp_linalglib2/src/sysbios'
    Build of libraries done.
    cle66 package/cfg/omp_config_pe66.c ...
    "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edma3/edma3_config.h", line 253: warning: typedef name has already been declared (with same type)
    Finished building: "../omp_config.cfg"
     
    Building file: "../fc_config_c6678.c"
    Invoking: C6000 Compiler
    "/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp/platforms" --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp" --include_path="/home/idris/workspace_v8/omp_linalglib2" --include_path="/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --openmp --preproc_with_compile --preproc_dependency="fc_config_c6678.d_raw" --cmd_file="configPkg/compiler.opt" "../fc_config_c6678.c"
    "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edma3/edma3_config.h", line 253: warning #303-D: typedef name has already been declared (with same type)
    Finished building: "../fc_config_c6678.c"
     
    Building file: "../ticblas_config.c"
    Invoking: C6000 Compiler
    "/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp/platforms" --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp" --include_path="/home/idris/workspace_v8/omp_linalglib2" --include_path="/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --define=SOC_C6678 --define=LIB_RTOS -g --diag_warning=225 --diag_wrap=off --display_error_number --openmp --preproc_with_compile --preproc_dependency="ticblas_config.d_raw" --cmd_file="configPkg/compiler.opt" "../ticblas_config.c"
    Finished building: "../ticblas_config.c"
     
    Building file: "../dgemm_test.c"
    Invoking: C6000 Compiler
    "/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp/platforms" --include_path="/home/idris/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp" --include_path="/home/idris/workspace_v8/omp_linalglib2" --include_path="/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --define=LIB_RTOS --define=SOC_C6678 -g --diag_warning=225 --diag_wrap=off --display_error_number --openmp --preproc_with_compile --preproc_dependency="dgemm_test.d_raw" --cmd_file="configPkg/compiler.opt" "../dgemm_test.c"
    Finished building: "../dgemm_test.c"
     
    Building target: "omp_linalglib2.out"
    Invoking: C6000 Linker
    "/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 -g --diag_warning=225 --diag_wrap=off --display_error_number --openmp -z -m"omp_linalglib2.map" -i"/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/lib" -i"/home/idris/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --priority --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="omp_linalglib2_linkInfo.xml" --rom_model -o "omp_linalglib2.out" "./dgemm_test.obj" "./fc_config_c6678.obj" "./ticblas_config.obj" "../src/sysbios/BIOS.obj" "../src/sysbios/c62_TaskSupport_asm.obj" "../src/sysbios/c64p_Exception_asm.obj" "../src/sysbios/c64p_Hwi_asm.obj" "../src/sysbios/c64p_Hwi_asm_switch.obj" "../src/sysbios/c64p_Hwi_disp_always.obj" "../src/sysbios/ti_tls_get_tp.obj" "../src/sysbios/timer64_Timer_asm.obj" -l"configPkg/linker.cmd" -l"/home/idris/ti/linalg_1_2_0_0/packages/ti/linalg/lib/libcblas.ae66" -l"/home/idris/ti/libarch_1_0_0_0/packages/ti/libarch/lib/libarch.ae66" -llibc.a 
    <Linking>
    "configPkg/linker.cmd", line 131: warning #10068-D: no matching section
    warning #10247-D: creating output section ".tdata" without a SECTIONS specification
    warning #10247-D: creating output section ".tbss" without a SECTIONS specification
    Finished building target: "omp_linalglib2.out"
     
    **** Build Finished ****
    

    Note that if I'm not resetting the EVM before loading the program it will just hang at tiCblasNew().

    If I reset the EVM and then load the program on it, I get the following:

    [C66xx_0] Hello World from thread = 0
    Number of threads = 8
    [C66xx_1] Hello World from thread = 1
    [C66xx_2] Hello World from thread = 2
    [C66xx_3] Hello World from thread = 3
    [C66xx_4] Hello World from thread = 4
    [C66xx_5] Hello World from thread = 5
    [C66xx_6] Hello World from thread = 6
    [C66xx_7] Hello World from thread = 7
    [C66xx_0] Preparing for ticblas
    L2 SRAM size is 393216, total L2 size is 524288.
    Creating new ticblas instance
    ti.sysbios.heaps.HeapMem: line 221: out of memory: handle=0x80056a88, size=12
    xdc.runtime.Error.raise: terminating execution
    [C66xx_1] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0x52ac4749 A21=0xdfa2bbff
    A22=0xecfbd6f5 A23=0x7fba7ffe
    A24=0xcdfbbdf3 [C66xx_2] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0xf65dc1b6 A21=0xcfac3ef0
    A22=0xa87ea9e5 A23=0xad507822
    A24=0xd03cff08 [C66xx_3] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0xbcfb1f6f A21=0x162aded5
    A22=0x67dcbfd7 A23=0xa3150516
    A24=0x4500e88b [C66xx_4] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0x8b550c4c A21=0x584e0180
    A22=0xf79cf3f1 A23=0xfa0d4fa6
    A24=0xcbbc2187 [C66xx_5] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0xb4e2b32c A21=0x34a01010
    A22=0x4abf3fba A23=0x8404b31e
    A24=0x442d3807 [C66xx_6] A0=0x0 A1=0x1
    A2=0x0 A3=0x90
    A4=0x0 A5=0x0
    A6=0x19f A7=0x0
    A8=0x0 A9=0x18
    A10=0x9f4f1ce8 A11=0x90
    A12=0x9f4fccf0 A13=0x90
    A14=0x1 A15=0x9f447370
    A16=0x202 A17=0x204
    A18=0x0 A19=0x0
    A20=0x3ffb7f2d A21=0x28a240a8
    A22=0x27def794 A23=0x7f5bdfa7
    A24=0x4d97ff6f [C66xx_1] A25=0xebdabeff
    A26=0xb2b30cab A27=0xd7febf5f
    A28=0x1cff70fb A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1184ff24 B13=0x9f448a86
    B[C66xx_2] A25=0xd77c32fc
    A26=0x55bdd50d A27=0x95b6c4ef
    A28=0x8cdeceb9 A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1284ff24 B13=0x9f448a86
    B[C66xx_3] A25=0x2f993473
    A26=0x63acad6f A27=0xf197d6a6
    A28=0x10ee6cae A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1384ff24 B13=0x9f448a86
    B[C66xx_4] A25=0xe65edfeb
    A26=0x7be5accf A27=0x84830062
    A28=0x34480000 A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1484ff24 B13=0x9f448a86
    B[C66xx_5] A25=0x0
    A26=0x1211bfff A27=0xa2041042
    A28=0xa0080 A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1584ff24 B13=0x9f448a86
    B14=0x9f4fc[C66xx_6] A25=0x4002009
    A26=0x9c A27=0x0
    A28=0xf977e6fb A29=0x400000
    A30=0x20 A31=0x1
    B0=0x9f4fcd90 B1=0x9f4f1ce8
    B2=0x0 B3=0x9f4d1e10
    B4=0x9f4fcd90 B5=0x0
    B6=0x0 B7=0x855314
    B8=0x9f447f00 B9=0x200
    B10=0xffffffff B11=0x0
    B12=0x1684ff24 B13=0x9f448a86
    B14=0x9f4fcdac [C66xx_1] 14=0x9f4fcdac B15=0x1184fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AM[C66xx_2] 14=0x9f4fcdac B15=0x1284fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AM[C66xx_3] 14=0x9f4fcdac B15=0x1384fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AM[C66xx_4] 14=0x9f4fcdac B15=0x1484fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AM[C66xx_5] dac B15=0x1584fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AMR=0x0
    RILC[C66xx_6] B15=0x1684fe98
    B16=0x202 B17=0x206
    B18=0x204 B19=0x9f447f0e
    B20=0x9f447ea8 B21=0x1
    B22=0x9f447efc B23=0x1
    B24=0x0 B25=0x1
    B26=0x18 B27=0x9f447f0c
    B28=0x9f447f0a B29=0x9f447f08
    B30=0x9f447f06 B31=0x7fff
    NTSR=0x1000c
    ITSR=0x0
    IRP=0x0
    SSR=0x0
    AMR=0x0
    RILC=0x0[C66xx_1] R=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1184fe98.
    xdc.runtime.Error.raise: terminating execution
    [C66xx_2] R=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1284fe98.
    xdc.runtime.Error.raise: terminating execution
    [C66xx_3] R=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1384fe98.
    xdc.runtime.Error.raise: terminating execution
    [C66xx_4] R=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1484fe98.
    xdc.runtime.Error.raise: terminating execution
    [C66xx_5] =0x0
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1584fe98.
    xdc.runtime.Error.raise: terminating execution
    [C66xx_6] 
    ILC=0x0
    Exception at 0x90
    EFR=0x2 NRP=0x90
    Internal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000090, sp = 0x1684fe98.
    xdc.runtime.Error.raise: terminating execution

  • Could you explain what is the difference between your CCS build and the makefile based build. Are simply building the example as is or have you made any modifications ? I don`t see any major issue in your build. Minor issue seems to be that you are using CGT compiler from CCS rather than the version packaged in the SDK but there shouldn`t be any impact due to that. I suspect that the CCS project is no longer being maintained in the library so the makefile may be the right approach to build the example. I am confirming this with the maintainer.

    Also, can you clarify when you indicated the application runs when you perform full reset . what is you process of reloading the code. Are doing CPU reset on all cores or are you triggering warm reset before reloading ? Since failure log indicates that the application ran out of Heap Memory , have you looked at the ROV or tried to increase the HeapMem

    Check for guidance provided here:
    e2e.ti.com/.../1135634
    e2e.ti.com/.../181125

    Regards,
    Rahul
  • Hi Rohan,

    Thank you very much for your answer.

    Regarding the differences between the two builds:

    - I am not modifying any C-file. In CCS, I create an empty RTSC project and I then copy-paste dgemm_test.c, fc_config_c6678.c, ticblas_config.c and omp_config.cfg into the project folder. After adding the necessary products/includes, I have to manually enter the libarch and linalg static libraries for linking (it somehow doesn't link them automatically). The log I pasted in my past post was created from this.

    - I tried to compare the linker.cmd files. Both files are the same, the linked libraries are the same, the only thing which is different is that it links the generated sysbios.ae66 and omp_config_pe66.oe66 libraries.

    - I tried to rebuild the makefile example from scratch. For that purpose, I deleted everything except the makefiles, the .c files and the omp config. A thing which jumped to my eye is that it then complains

    <Linking>
    "/tmp/TI3dzRcEqs7", line 29: error: cannot find file "../common/linker_fc.cmd"
    

    Shouldn't these .cmd files be generated automatically? If not, that could be a difference to my CCS build. Anyway, I added the linker_fc.cmd again and now I actually see something happening. After loading the program, I now get an error for the makefile project:

    [C66xx_0] L2 SRAM size is 393216, total L2 size is 524288.
    BLAS memory requirements - vfast size: 28160, fast size: 772224, medium size: 4700736, slow size: 4804.
    Provided memory is not enough for BLAS!

    I guess that before I wasn't rebuilding the sysbios.ae66 and the omp_config_pe66.oe66. However, I never changed anything to the cfg files. Isn't that example supposed to run on my EVM without changing anything? I will add here that it doesn't matter whether I use the compiler delivered with CCS or the one from the SDK - I tried both, same errors. At least the error above gave me some additional info, so I will first try to get this example going. I was able to identify which of the memory conditions required for that program are failing:

    Provided memory is not enough for BLAS!
    smem_size_fast=772224 > l2_buf_size=262144
    smem_size_med=4700736 > msmc_buf_size=2621440

    Still, it is a bit puzzling that the example wouldn't work without changing anything.

    Regarding your other comments:

    - When I meant full reset I meant that I would be disconnecting in CCS and then press the full reset button on the board next to the ethernet thing. I then reconnect via my target config file and I go on Run->Load Program or I press the bug button for debugging and it automatically connects and loads the program (tried both).

    - Yes I will try to use ROV and also try to increase the heapMem since it now seems to be connected to the makefile example as well. About the linker_fc.cmd - shouldn't that be generated automatically? I can't see anything like that in my CCS build. I'll experiment with that as well. I'll post the results asap.

    Thanks again and best wishes,

    Idris

    EDIT:

    The following values are hard-coded in the example and don't seem to be configurable:

    #define BLAS_L2_BUF_SIZE   (256*1024UL)     /* 256KB SRAM is available in L2 for C6678 EVM */
    #define BLAS_MSMC_BUF_SIZE (5*512*1024UL)   /* reserve 2.5MB for BLAS */  

    Which would mean that tiCblasGetSizes is simply giving me too big values back. What could I have done wrong then?

    EDIT #2:

    When I run the old example which - I guess - was built with the prebuilt libarch and linalg libraries, I get this:

    BLAS memory requirements - vfast size: 28672, fast size: 245312, medium size: 2154688, slow size: 4804.
    

    So fast and medium size are less than half of the other stuff in my example. I just rebuilt the llnalg library using the command

    make DSPlibs MEM_MODEL=Small TARGET=SOC_C6678 LIBOS=LIB_RTOS

    That is really weird, any hints on that?

    EDIT #3:

    Ok, I now know the following:

    - If I include the linker_fc.cmd (attached) in my CCS project and I use they linlalg and libarch libraries delivered by TI, everything works fine (I luckily thought of saving them somewhere before rebuilding). This holds for both the makefile project and the CCS project.

    - If I don't include the linker_fc.cmd, I will get errors like "Core 0 DMA not initialized" and "[C66xx_1] Failed to alloc edma handle CoreID 1" - why that?

    - Remains to know what is the difference between the library you deliver and the one I rebuilt? My employer just told me that he would like to be able to build everything from source, and I feel like I'm doing everything as described in the README.

    Your help is greatly appreciated.

    linker_fc.cmd

    SECTIONS
    {

        .fclocalfar :
        {
            "edmamgr.ae66"      (.fardata)
            "ecpy.ae66"         (.fardata)
            "edma3Chan.ae66"    (.fardata)
            "edma3.ae66"        (.fardata)
            "rman.ae66"            (.fardata)
            "nullres.ae66"        (.fardata)
            "fcsettings.ae66"   (.fardata)
    /*        "edma3_lld_rm.ae66" (.fardata)*/

            "edmamgr.ae66"      (.far)
            "edma3Chan.ae66"    (.far)
            "edma3.ae66"        (.far)
            "rman.ae66"            (.far)
            "nullres.ae66"        (.far)
            "fcsettings.ae66"   (.far)
    /*        "edma3_lld_rm.ae66" (.far)*/
        } > L2SRAM

    }

  • Idris,

    Here is a simlar post where the user was able to build the example using original version of the cBLAS library but ran into similar failure when the library was re-buillt

    e2e.ti.com/.../766788

    Can you also confirm that you can reproduce the same result .

    Regards,
    rahul
  • Hi Rahul,

    yes I face the same issues. Using the ti-processor-sdk-rtos-c667x-evm-05.01.00.11-Linux-x86-Install and also using the one referred to in the post. When I use the rebuilt library, the program fails in the following if-statement (from the example):

    int config_mem_for_ticblas(double *l2_buf,   size_t l2_buf_size, 
                               double *msmc_buf, size_t msmc_buf_size, 
                               double *ddr_buf,  size_t ddr_buf_size)
    {
        size_t smem_size_vfast, smem_size_fast, smem_size_med, smem_size_slow;
        void *l1d_SRAM_ptr;
        int l1d_cfg_err;
        
        /* First, verify the provided/available memory meet requirements */
        tiCblasGetSizes(&smem_size_vfast, &smem_size_fast, &smem_size_med, &smem_size_slow);
    
        printf("BLAS memory requirements - vfast size: %d, fast size: %d, medium size: %d, slow size: %d.\n", smem_size_vfast, smem_size_fast, smem_size_med, smem_size_slow);
        
        if(  (smem_size_vfast> lib_get_L1D_total_size()) /* total available L1D  */
           ||(smem_size_fast > l2_buf_size)       /* provided L2 size   */
           ||(smem_size_med  > msmc_buf_size)     /* provided MSMC memory */                 
           ||(smem_size_slow > ddr_buf_size) 
          ) {                                                            
            printf("Provided memory is not enough for BLAS!\n");
            exit(0);
        }
    ...
    }

    The rebuilt library seems to have higher memory requirements.

  • Hi

    Any update on recompiling the library? Were you able to reproduce the problem or are we doing something wrong compiling the library?

    Thanks and best wishes,

    Idris

  • Idris,

    This is being looked into but the developer is currently busy so there are some delay in proposing a work around. I saw that you are checking on this on the other E2E thread where similar issue is discussed .

    Regards,
    Rahul