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.

C6678 Openmp Helloworld Example Compilation Error

Other Parts Discussed in Thread: SYSBIOS

Hi,

I just downloaded the  BIOS-MCSDK 2.1.0 Beta and tried to compile the openmp helloworld example.

RTSC packages I used are IPC 1.24.2.27, PDK 1.1.0.2, OpenMP 1.1.2.03_beta, SYS/BIOS 6.33.4.39 and BIOS-MCSDK 2.1.0 Beta.

 The two source files I was using in the project:

omp_1_01_02_03_beta\packages\ti\omp\examples\omp_hello.c

omp_1_01_02_03_beta\packages\ti\omp\examples\omp_config.cfg

When I build the project, I have the following error:

**** Build of configuration Debug for project HelloWorld_example ****

C:\Program Files\Texas Instruments\ccsv5\utils\bin\gmake -k all
'Building target: HelloWorld_example.out'
'Invoking: C6000 Linker'
"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.3.5/bin/cl6x" -mv6600 -g --display_error_number --diag_warning=225 --abi=eabi --openmp -z -m"HelloWorld_example.map" --warn_sections --display_error_number -i"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.3.5/lib" -i"C:/Program Files/Texas Instruments/omp_1_01_02_03_beta/packages/ti/omp/lib/debug" -i"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.3.5/include" --reread_libs --rom_model -o "HelloWorld_example.out" -l"./configPkg/linker.cmd" "./omp_hello.obj" -l"libc.a" -lti.omp.ae66
<Linking>

undefined first referenced
symbol in file
--------- ----------------
__TI_tls_block_size C:\Program Files\Texas Instruments\omp_1_01_02_03_beta\packages\ti\omp\utils\lib\release\ti.omp.utils.ae66<ThreadLocalStorage.oe66>
__TI_tls_init C:\Program Files\Texas Instruments\omp_1_01_02_03_beta\packages\ti\omp\utils\lib\release\ti.omp.utils.ae66<ThreadLocalStorage.oe66>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "HelloWorld_example.out" not
built

>> Compilation failure
gmake: *** [HelloWorld_example.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Would you please let me know how to fix the problem? Thank you.

  • Hi Zheng

    You will need to use the 7.4.0B2 code generation tools to compile OpenMP projects. Your project is picking up the older 7.3.5 compiler which does not have OpenMP support. To download 7.4.0B2 please go to https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/beta.htm

  • Hi,

    Thank you very much for the note. 

    I downloaded the 7.4.0B2 compiler and successfully compiled the code with the following two warnings:

    #10247-D creating output section ".TI.tls_init" without a SECTIONS specification HelloWorld_example

    #10247-D creating output section ".TI.tls" without a SECTIONS specification HelloWorld_example

    Then I tried to execute the program on my C6678 evm but I have the following error outputs:

    [C66xx_0] Hello World from thread = 0
    [C66xx_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] A0=0x0 A1=0x1
    A2=0x0 A3=0x8
    A4=0x0 A5=0x0
    A6=0x0 A7=0x0
    A8=0x0 A9=0x0
    A10=0x0 A11=0xc01af40
    A12=0x0 A13=0x0
    A14=0x0 A15=0x0
    A16=0x0 A17=0x2640100
    A18=0xa0115548 A19=0x0
    A20=0x100 A21=0x4c
    A22=0x2005000 A23=0xc054888
    A24=0x2005000 A25=0x825b80
    A26=0xc054888[C66xx_0] A27=0xc054888
    A28=0x0 A29=0xc037ba4
    A30=0x34 A31=0x0
    B0=0x0 B1=0x1
    B2=0x0 B3=0x157c8
    B4=0x2640114 B5=0xc037994
    B6=0xdf60010 B7=0x0
    B8=0x90003c80 B9=0x3a
    B10=0x0 B11=0x0
    B12=0x0 B13=0x0
    B14=0xa0194828 B15=0xa01157b8
    B16=0x30 B17=0xa0115774
    B18=0xff B19=0x2[C66xx_0] 0
    B20=0x20 B21=0x108228ec
    B22=0x0 B23=0x40a0046
    B24=0x80018208 B25=0xa0010c00
    B26=0x24c08 B27=0x0
    B28=0x20000000 B29=0xff
    B30=0x0 B31=0xffffffff
    NTSR=0x1000f
    ITSR=0xf
    IRP=0xc01e490
    SSR=0x0
    AMR=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x157c8
    EFR=0x2 NRP=0x157c8
    I[C66xx_0] nternal exception: IERR=0x1
    Instruction fetch exception
    ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x0c01e490, sp = 0xa01157b8.
    To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
    xdc.ru[C66xx_0] ntime.Error.raise: terminating execution
    [C66xx_0] ti.omp.utils.ThreadLocal: line 129: assertion failure: A_invalidKey: Invalid key encountered
    xdc.runtime.Error.raise: terminating execution

    Would you please let me know how to fix this problem? Thank you very much.

  • Zheng,

    Could you please try the following:

    1. In CCS, go to View-->Target Configurations. Double click on your Target Configuration for the 6678 EVM. As the snapshot below shows, now select C66x_0, and in the "initialization script" path point to the evmc6678l.gel file that is located in your CCSv5 installation directory at 'ccsv5\ccs_base\emulation\boards\evmc6678l\gel\evmc6678l.gel'

    2. Repeat Step 1 for all the cores

    3. Power cycle the EVM

    4. Right-click on your target configuration and click on "Launch selected configuration." This should bring up your Debug view.

    5. Connect to all the cores, load the .out files on all cores and run all cores.

    If you plan to re-run the example, always ensure that you do a "System Reset" on Core 0, a" CPU Reset" on Cores 1-7, followed by running the "Global_Default_Setup" script on Core 0, and only then load and run the program.

  • Apart from the above suggestion from Uday, there is one more thing.

    Looks like code is getting corrupted.  Where are you loading your executable ?

  • HI Varada,

    I loaded the executable to my board though the USB cable.

    P.S. I can not reproduce the error now. The example is executed correctly.

  • Hi ,

      I  download 7.4.0B2 code generation tools  to compile "helloworld_example" project, but  when i build the project and  i have following errors:


    **** Build of configuration Debug for project HelloWorld_example ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building target: HelloWorld_example.out'
    'Invoking: C6000 Linker'
    "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g --display_error_number --diag_warning=225 --abi=eabi --openmp -z -m"HelloWorld_example.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "HelloWorld_example.out" -l"./configPkg/linker.cmd"  "./HelloWorld.obj" -l"libc.a"
    <Linking>

     undefined           first referenced                                                                              
      symbol                 in file                                                                                   
     ---------           ----------------                                                                              
     __TI_tls_block_size C:\ti\omp_1_01_02_06\packages\ti\omp\utils\lib\debug\ti.omp.utils.ae66<ThreadLocalStorage.oe66>
     __TI_tls_init       C:\ti\omp_1_01_02_06\packages\ti\omp\utils\lib\debug\ti.omp.utils.ae66<ThreadLocalStorage.oe66>
     __c6xabi_errno_addr C:\ti\omp_1_01_02_06\packages\ti\omp\lib\debug\ti.omp.ae66<env.oe66>                          

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "HelloWorld_example.out" not
       built

    >> Compilation failure
    gmake: *** [HelloWorld_example.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    i used  IPC 1.24.2.27     PDK  1.1.03   OPENMP  1.01.02.06_BETA  SYS\BIOS  6.33.04.39  BIOS_MCSDK   2.01.03  BETA  

    Would you please let me know how to fix the problem? Thank you.

                                                                                                            thank you !

                                                                                                                 luo 

    i 

  • Can you please try with Compiler cgtools version 7.4.1, available at

    https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm

    Hope this resolves.

  • Hi,

    I am trying to test some of the examples included in the CCS/MCSDK installation. I have been able to compile the openmp hello world application. But when I load the compiled program to the board and run, no print statements are displayed in the console.

    I am using the following tool versions:

    compiler: 7.4.1, IPC: 1.24.3.32, PDK: 1.1.0.3, OpenMP: 1.1.2.06, SYS/BIOS: 6.33.5.4.6, MCSDK: 2.01.00.03

    Thanks.

  • Are you seeing printf's from Core 0? There is a defect with the current release due to which only printf's from the master core show up on the console. Any printf's from worker cores are dropped. We are working on fixing this for the next release.

    Ajay

  • Thank Ajay and Uday,

    I am able to run the code now. I'm getting the following message though:

    [C66xx_0] A0=0x11040000 A1=0x80004200
    [C66xx_0] A2=0xfe7c0000 A3=0x3d
    [C66xx_0] A4=0xc9636844 A5=0x80004200
    [C66xx_0] A6=0xc03cc700 A7=0x0
    [C66xx_0] A8=0x1844018 A9=0x1
    [C66xx_0] A10=0x2 A11=0xc03d33b4
    [C66xx_0] A12=0xa7562a56 A13=0x9f0a1760
    [C66xx_0] A14=0x80004200 A15=0x0
    [C66xx_0] A16=0x80000008 A17=0x8
    [C66xx_0] A18=0x80004180 A19=0x40
    [C66xx_0] A20=0x100 A21=0x4c
    [C66xx_0] A22=0x1480048 A23=0x80a0a02c
    [C66xx_0] A24=0x40080051 A25=0xd009c00e
    [C66xx_0] A26=0x20000204 A27=0x2ea0148a
    [C66xx_0] A28=0x8 A29=0xb
    [C66xx_0] A30=0x2 A31=0xc03cc65c
    [C66xx_0] B0=0x1 B1=0x1
    [C66xx_0] B2=0x1 B3=0x9f08fdd0
    [C66xx_0] B4=0x80004200 B5=0x9f0a1760
    [C66xx_0] B6=0x0 B7=0x1
    [C66xx_0] B8=0x1000 B9=0x0
    [C66xx_0] B10=0x80000088 B11=0x0
    [C66xx_0] B12=0x1 B13=0x9f090b2c
    [C66xx_0] B14=0xc03ceb00 B15=0x848fe8
    [C66xx_0] B16=0x1 B17=0x849118
    [C66xx_0] B18=0xff B19=0x20
    [C66xx_0] B20=0x20 B21=0x1
    [C66xx_0] B22=0x0 B23=0x40000000
    [C66xx_0] B24=0x84a1d4 B25=0x10300a
    [C66xx_0] B26=0x89a645a B27=0x2516202c
    [C66xx_0] B28=0x2892a725 B29=0x32ad4200
    [C66xx_0] B30=0x0 B31=0x2
    [C66xx_0] NTSR=0x1000f
    [C66xx_0] ITSR=0x0
    [C66xx_0] IRP=0x0
    [C66xx_0] SSR=0x0
    [C66xx_0] AMR=0x0
    [C66xx_0] RILC=0x0
    [C66xx_0] ILC=0x0
    [C66xx_0] Exception at 0xc03ce710
    [C66xx_0] EFR=0x2 NRP=0xc03ce710
    [C66xx_0] Internal exception: IERR=0x10
    [C66xx_0] Resource conflict exception
    [C66xx_0] ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x00848fe8.
    [C66xx_0] To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
    [C66xx_0] xdc.runtime.Error.raise: terminating execution

    How can I fix this?

    Thanks.

  • Uday's suggestion to uncheck the box that says "On a program load or restart," for all the cores fixed this. Thanks.