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.

TMDSEVM6678: Simple code example for c6678

Part Number: TMDSEVM6678

Hi,

I need simple code examples ("Hello world") for c6678 multi -core processor.

I'll appriciate any help.

Thanks,

Moti

  • Hi,

    Here is the wiki how to setup a hello world example for ARM & DSP cores:
    software-dl.ti.com/.../Examples_and_Demonstrations.html

    And here is a link for the multi core debug steps:
    processors.wiki.ti.com/.../Multi-Core_Debug_with_CCS

    Best Regards,
    Yordan
  • Hi,
    I followed your instructions to create a "hello world" project
    * I'm using CCS 7.4.0 & processor_sdk_rtos_c667x_4_03_00_05.
    * I also modified 2 code lines in: C:\ti\pdk_c667x_2_0_9\packages\pdkProjectCreate.bat
    # 70 : set SOC=C6678 (it was a57..)
    #124 : set PROCESSOR=dsp (it was arm)

    *** Configuration:
    Blackhawk XDS560v2-USB Mezzanine Emulator
    TMS320c6678

    *** The build generates the following warnings:
    Description Resource Path Location Type
    #10210-D null: creating ".stack" section with default size of 0x400; use the -stack option to change the default size HelloWorld C/C++ Problem
    #10210-D null: creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size HelloWorld C/C++ Problem
    #10247-D null: creating output section ".cinit" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".cio" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".const" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".far" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".fardata" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".stack" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".switch" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".sysmem" without a SECTIONS specification HelloWorld C/C++ Problem
    #10247-D null: creating output section ".text" without a SECTIONS specification HelloWorld C/C++ Problem

    *** execution fails: HelloWorld.out Load failed ***
    C66xx_1: Trouble Reading Memory Block at 0x8000 on Page 0 of Length 0x4: (Error -1190 @ 0x8000) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.100.0)
    C66xx_1: File Loader: Verification failed: Target failed to read 0x00008000
    C66xx_1: GEL: File: C:\Users\motima\workspace_v7\HelloWorld\Debug\HelloWorld.out: Load failed.

    What went wrong?
    Please add as many details as you can.

    Thanks
  • The generated map file:

    ******************************************************************************
    TMS320C6x Linker PC v8.2.2
    ******************************************************************************
    >> Linked Sun May 27 17:15:52 2018

    OUTPUT FILE NAME: <HelloWorld2.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 0000ea40


    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    NEARRAM 00000001 00007fff 00000000 00007fff RWIX
    RAM 00008000 fffffffe 0000b7c4 ffff483a RWIX


    SEGMENT ALLOCATION MAP

    run origin load origin length init length attrs members
    ---------- ----------- ---------- ----------- ----- -------
    00008000 00008000 00007040 00007040 r-x
    00008000 00008000 00007040 00007040 r-x .text
    0000f040 0000f040 00004468 00000000 rw-
    0000f040 0000f040 00002000 00000000 rw- .stack
    00011040 00011040 00002000 00000000 rw- .sysmem
    00013040 00013040 0000031c 00000000 rw- .fardata
    00013360 00013360 00000148 00000000 rw- .far
    000134a8 000134a8 00000138 00000138 r--
    000134a8 000134a8 00000138 00000138 r-- .const
    000135e0 000135e0 00000120 00000000 rw-
    000135e0 000135e0 00000120 00000000 rw- .cio
    00013700 00013700 000000c8 000000c8 r--
    00013700 00013700 00000038 00000038 r-- .switch
    00013738 00013738 00000090 00000090 r-- .cinit


    SECTION ALLOCATION MAP

    output attributes/
    section page origin length input sections
    -------- ---- ---------- ---------- ----------------
    .text 0 00008000 00007040
    00008000 00001c40 rts6600_elf.lib : _printfi.obj (.text:__TI_printfi)
    00009c40 00000680 : _printfi.obj (.text:_pconv_a)
    0000a2c0 00000600 : divd.obj (.text:__c6xabi_divd)
    0000a8c0 000005c0 : _printfi.obj (.text:_pconv_g)
    0000ae80 00000460 : _printfi.obj (.text:_pconv_e)
    0000b2e0 00000440 : memory.obj (.text:free)
    0000b720 000003e0 : fputs.obj (.text:fputs)
    0000bb00 000002e0 : _printfi.obj (.text:fcvt)
    0000bde0 00000280 : _printfi.obj (.text:_pconv_f)
    0000c060 00000240 : imath64.obj (.text:__c6xabi_divull)
    0000c2a0 00000240 : _printfi.obj (.text:_ltostr)
    0000c4e0 00000220 : fputc.obj (.text:fputc)
    0000c700 00000220 : setvbuf.obj (.text:setvbuf)
    0000c920 000001c0 : imath40.obj (.text:__c6xabi_divul)
    0000cae0 000001a0 : hostrename.obj (.text:HOSTrename)
    0000cc80 00000180 : frexp.obj (.text:frexp)
    0000ce00 00000180 : memory.obj (.text:malloc)
    0000cf80 00000160 : autoinit.obj (.text:_auto_init_elf)
    0000d0e0 00000140 : fclose.obj (.text:__TI_closefile)
    0000d220 00000140 : getdevice.obj (.text:getdevice)
    0000d360 00000140 : ldexp.obj (.text:ldexp)
    0000d4a0 00000120 : fseek.obj (.text:fseek)
    0000d5c0 00000100 : copy_decompress_rle.obj (.text:__TI_decompress_rle_core)
    0000d6c0 00000100 : _io_perm.obj (.text:__TI_wrt_ok)
    0000d7c0 00000100 : atoi.obj (.text:atoi)
    0000d8c0 00000100 : cpy_tbl.obj (.text:copy_in)
    0000d9c0 000000e0 : hostlseek.obj (.text:HOSTlseek)
    0000daa0 000000e0 : hostopen.obj (.text:HOSTopen)
    0000db80 000000e0 : hostwrite.obj (.text:HOSTwrite)
    0000dc60 000000e0 : close.obj (.text:close)
    0000dd40 000000e0 : exit.obj (.text:exit)
    0000de20 000000e0 : ltoa.obj (.text:ltoa)
    0000df00 000000e0 : memset.obj (.text:memset)
    0000dfe0 000000e0 : printf.obj (.text:printf)
    0000e0c0 000000c0 : hostread.obj (.text:HOSTread)
    0000e180 000000c0 : hostunlink.obj (.text:HOSTunlink)
    0000e240 000000c0 : fflush.obj (.text:__TI_doflush)
    0000e300 000000c0 : divu.obj (.text:__divu)
    0000e3c0 000000c0 : _printfi.obj (.text:_ecpy)
    0000e480 000000c0 : memory.obj (.text:minsert)
    0000e540 000000c0 : memory.obj (.text:mremove)
    0000e600 000000c0 : tls.obj (.text:tls:init:__TI_tls_init)
    0000e6c0 000000a0 : hostclose.obj (.text:HOSTclose)
    0000e760 000000a0 : fopen.obj (.text:__TI_cleanup)
    0000e800 000000a0 : memory.obj (.text:_minit)
    0000e8a0 000000a0 : memcpy64.obj (.text:memcpy)
    0000e940 00000080 : trgmsg.obj (.text:__TI_readmsg)
    0000e9c0 00000080 : llshift.obj (.text:__c6xabi_llshl)
    0000ea40 00000080 : boot.obj (.text:_c_int00)
    0000eac0 00000080 : getdevice.obj (.text:finddevice)
    0000eb40 00000080 : unlink.obj (.text:unlink)
    0000ebc0 00000060 : frcmpyd_div.obj (.text:__TI_frcmpyd_div)
    0000ec20 00000060 : trgmsg.obj (.text:__TI_writemsg)
    0000ec80 00000060 : llshift.obj (.text:__c6xabi_llshru)
    0000ece0 00000060 : lseek.obj (.text:lseek)
    0000ed40 00000060 : memccpy.obj (.text:memccpy)
    0000eda0 00000060 : write.obj (.text:write)
    0000ee00 00000040 : isinf.obj (.text:__c6xabi_isinf)
    0000ee40 00000040 : _printfi.obj (.text:__c6xabi_isnan)
    0000ee80 00000040 : args_main.obj (.text:_args_main)
    0000eec0 00000040 : imath64.obj (.text:_subcull)
    0000ef00 00000020 : errno.obj (.text:__c6xabi_errno_addr)
    0000ef20 00000020 : _lock.obj (.text:_nop)
    0000ef40 00000020 : printf.obj (.text:_outc)
    0000ef60 00000020 : printf.obj (.text:_outs)
    0000ef80 00000020 : startup.obj (.text:_system_post_cinit)
    0000efa0 00000020 : pre_init.obj (.text:_system_pre_init)
    0000efc0 00000020 : exit.obj (.text:abort)
    0000efe0 00000020 : copy_decompress_none.obj (.text:decompress:none:__TI_decompress_none)
    0000f000 00000020 : copy_decompress_rle.obj (.text:decompress:rle24:__TI_decompress_rle24)
    0000f020 00000020 hello.obj (.text)

    .const 0 000134a8 00000138
    000134a8 00000101 rts6600_elf.lib : ctype.obj (.const:.string:_ctypes_)
    000135a9 00000003 --HOLE-- [fill = 0]
    000135ac 00000024 : _printfi.obj (.const:.string)
    000135d0 00000010 hello.obj (.const:.string)

    .fardata 0 00013040 0000031c UNINITIALIZED
    00013040 000001e0 rts6600_elf.lib : defs.obj (.fardata:_ftable)
    00013220 000000a0 : write.obj (.fardata:_stream)
    000132c0 00000078 : write.obj (.fardata:_device)
    00013338 0000000c : exit.obj (.fardata)
    00013344 00000008 : memory.obj (.fardata)
    0001334c 00000004 : _lock.obj (.fardata:_lock)
    00013350 00000004 : _lock.obj (.fardata:_unlock)
    00013354 00000004 : defs.obj (.fardata)
    00013358 00000004 : errno.obj (.fardata)

    .cinit 0 00013738 00000090
    00013738 0000006c (.cinit..fardata.load) [load image, compression = rle]
    000137a4 0000000b (.cinit..far.load) [load image, compression = rle]
    000137af 00000001 --HOLE-- [fill = 0]
    000137b0 00000008 (__TI_handler_table)
    000137b8 00000010 (__TI_cinit_table)

    .init_array
    * 0 00008000 00000000 UNINITIALIZED

    .stack 0 0000f040 00002000 UNINITIALIZED
    0000f040 00000008 rts6600_elf.lib : boot.obj (.stack)
    0000f048 00001ff8 --HOLE--

    .sysmem 0 00011040 00002000 UNINITIALIZED
    00011040 00000008 rts6600_elf.lib : memory.obj (.sysmem)
    00011048 00001ff8 --HOLE--

    .far 0 00013360 00000148 UNINITIALIZED
    00013360 00000140 (.common:__TI_tmpnams)
    000134a0 00000008 (.common:parmbuf)

    .cio 0 000135e0 00000120 UNINITIALIZED
    000135e0 00000120 rts6600_elf.lib : trgmsg.obj (.cio)

    .switch 0 00013700 00000038
    00013700 00000038 rts6600_elf.lib : _printfi.obj (.switch:__TI_printfi)

    MODULE SUMMARY

    Module code ro data rw data
    ------ ---- ------- -------
    .\
    hello.obj 32 16 0
    +--+--------------------------+-------+---------+---------+
    Total: 32 16 0

    C:\ti\ti-cgt-c6000_8.2.2\lib\rts6600_elf.lib
    _printfi.obj 13696 92 0
    memory.obj 2016 0 8
    divd.obj 1536 0 0
    fputs.obj 992 0 0
    defs.obj 0 0 804
    imath64.obj 640 0 0
    fputc.obj 544 0 0
    setvbuf.obj 544 0 0
    trgmsg.obj 224 0 288
    getdevice.obj 448 0 0
    imath40.obj 448 0 0
    hostrename.obj 416 0 0
    frexp.obj 384 0 0
    write.obj 96 0 280
    autoinit.obj 352 0 0
    fclose.obj 320 0 0
    ldexp.obj 320 0 0
    copy_decompress_rle.obj 288 0 0
    fseek.obj 288 0 0
    printf.obj 288 0 0
    exit.obj 256 0 12
    ctype.obj 0 257 0
    _io_perm.obj 256 0 0
    atoi.obj 256 0 0
    cpy_tbl.obj 256 0 0
    hostopen.obj 224 0 8
    close.obj 224 0 0
    hostlseek.obj 224 0 0
    hostwrite.obj 224 0 0
    llshift.obj 224 0 0
    ltoa.obj 224 0 0
    memset.obj 224 0 0
    divu.obj 192 0 0
    fflush.obj 192 0 0
    hostread.obj 192 0 0
    hostunlink.obj 192 0 0
    tls.obj 192 0 0
    fopen.obj 160 0 0
    hostclose.obj 160 0 0
    memcpy64.obj 160 0 0
    boot.obj 128 0 0
    unlink.obj 128 0 0
    frcmpyd_div.obj 96 0 0
    lseek.obj 96 0 0
    memccpy.obj 96 0 0
    args_main.obj 64 0 0
    isinf.obj 64 0 0
    _lock.obj 32 0 8
    errno.obj 32 0 4
    copy_decompress_none.obj 32 0 0
    pre_init.obj 32 0 0
    startup.obj 32 0 0
    +--+--------------------------+-------+---------+---------+
    Total: 28704 349 1412

    Heap: 0 0 8192
    Stack: 0 0 8192
    Linker Generated: 0 143 0
    +--+--------------------------+-------+---------+---------+
    Grand Total: 28736 508 17796


    LINKER GENERATED COPY TABLES

    __TI_cinit_table @ 000137b8 records: 2, size/record: 8, table size: 16
    .fardata: load addr=00013738, load size=0000006c bytes, run addr=00013040, run size=0000031c bytes, compression=rle
    .far: load addr=000137a4, load size=0000000b bytes, run addr=00013360, run size=00000148 bytes, compression=rle


    LINKER GENERATED HANDLER TABLE

    __TI_handler_table @ 000137b0 records: 2, size/record: 4, table size: 8
    index: 0, handler: __TI_decompress_rle24
    index: 1, handler: __TI_decompress_none


    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

    address name
    ------- ----
    0000efc0 C$$EXIT
    0000ec78 C$$IO$$
    0000e6c0 HOSTclose
    0000d9c0 HOSTlseek
    0000daa0 HOSTopen
    0000e0c0 HOSTread
    0000cae0 HOSTrename
    0000e180 HOSTunlink
    0000db80 HOSTwrite
    000135e0 __CIOBUF_
    000137b8 __TI_CINIT_Base
    000137c8 __TI_CINIT_Limit
    000137b0 __TI_Handler_Table_Base
    000137b8 __TI_Handler_Table_Limit
    UNDEFED __TI_INITARRAY_Base
    UNDEFED __TI_INITARRAY_Limit
    00011040 __TI_STACK_END
    00002000 __TI_STACK_SIZE
    00000000 __TI_STATIC_BASE
    00002000 __TI_SYSMEM_SIZE
    UNDEFED __TI_TLS_INIT_Base
    UNDEFED __TI_TLS_INIT_Limit
    0000e760 __TI_cleanup
    00013338 __TI_cleanup_ptr
    0000d0e0 __TI_closefile
    0000efe0 __TI_decompress_none
    0000f000 __TI_decompress_rle24
    0000e240 __TI_doflush
    0001333c __TI_dtors_ptr
    00013340 __TI_enable_exit_profile_output
    0000ebc0 __TI_frcmpyd_div
    00013354 __TI_ft_end
    ffffffff __TI_pprof_out_hndl
    00008000 __TI_printfi
    ffffffff __TI_prof_data_size
    ffffffff __TI_prof_data_start
    0000e940 __TI_readmsg
    0000e600 __TI_tls_init
    00013360 __TI_tmpnams
    0000ec20 __TI_writemsg
    0000d6c0 __TI_wrt_ok
    ffffffff __binit__
    0000a2c0 __c6xabi_divd
    0000e300 __c6xabi_divu
    0000c920 __c6xabi_divul
    0000c060 __c6xabi_divull
    0000ef00 __c6xabi_errno_addr
    0000ee00 __c6xabi_isinf
    0000e9c0 __c6xabi_llshl
    0000ec80 __c6xabi_llshru
    ffffffff __c_args__
    0000e300 __divu
    00013358 __errno
    0000ee80 _args_main
    0000cf80 _auto_init_elf
    0000ea40 _c_int00
    000134a8 _ctypes_
    000132c0 _device
    00013040 _ftable
    0001334c _lock
    0000e800 _minit
    0000ef20 _nop
    0000f040 _stack
    00013220 _stream
    0000eec0 _subcull
    00011040 _sys_memory
    0000ef80 _system_post_cinit
    0000efa0 _system_pre_init
    00013350 _unlock
    0000efc0 abort
    0000d7c0 atoi
    ffffffff binit
    0000dc60 close
    0000d8c0 copy_in
    00013358 errno
    0000dd40 exit
    0000eac0 finddevice
    0000c4e0 fputc
    0000b720 fputs
    0000b2e0 free
    0000cc80 frexp
    0000cc80 frexpl
    0000d4a0 fseek
    0000d220 getdevice
    0000d360 ldexp
    0000d360 ldexpl
    0000ece0 lseek
    0000de20 ltoa
    0000f020 main
    0000ce00 malloc
    0000ed40 memccpy
    0000e8a0 memcpy
    0000df00 memset
    000134a0 parmbuf
    0000dfe0 printf
    0000c4e0 putc
    0000eb40 remove
    0000c700 setvbuf
    0000eb40 unlink
    0000eda0 write


    GLOBAL SYMBOLS: SORTED BY Symbol Address

    address name
    ------- ----
    00000000 __TI_STATIC_BASE
    00002000 __TI_STACK_SIZE
    00002000 __TI_SYSMEM_SIZE
    00008000 __TI_printfi
    0000a2c0 __c6xabi_divd
    0000b2e0 free
    0000b720 fputs
    0000c060 __c6xabi_divull
    0000c4e0 fputc
    0000c4e0 putc
    0000c700 setvbuf
    0000c920 __c6xabi_divul
    0000cae0 HOSTrename
    0000cc80 frexp
    0000cc80 frexpl
    0000ce00 malloc
    0000cf80 _auto_init_elf
    0000d0e0 __TI_closefile
    0000d220 getdevice
    0000d360 ldexp
    0000d360 ldexpl
    0000d4a0 fseek
    0000d6c0 __TI_wrt_ok
    0000d7c0 atoi
    0000d8c0 copy_in
    0000d9c0 HOSTlseek
    0000daa0 HOSTopen
    0000db80 HOSTwrite
    0000dc60 close
    0000dd40 exit
    0000de20 ltoa
    0000df00 memset
    0000dfe0 printf
    0000e0c0 HOSTread
    0000e180 HOSTunlink
    0000e240 __TI_doflush
    0000e300 __c6xabi_divu
    0000e300 __divu
    0000e600 __TI_tls_init
    0000e6c0 HOSTclose
    0000e760 __TI_cleanup
    0000e800 _minit
    0000e8a0 memcpy
    0000e940 __TI_readmsg
    0000e9c0 __c6xabi_llshl
    0000ea40 _c_int00
    0000eac0 finddevice
    0000eb40 remove
    0000eb40 unlink
    0000ebc0 __TI_frcmpyd_div
    0000ec20 __TI_writemsg
    0000ec78 C$$IO$$
    0000ec80 __c6xabi_llshru
    0000ece0 lseek
    0000ed40 memccpy
    0000eda0 write
    0000ee00 __c6xabi_isinf
    0000ee80 _args_main
    0000eec0 _subcull
    0000ef00 __c6xabi_errno_addr
    0000ef20 _nop
    0000ef80 _system_post_cinit
    0000efa0 _system_pre_init
    0000efc0 C$$EXIT
    0000efc0 abort
    0000efe0 __TI_decompress_none
    0000f000 __TI_decompress_rle24
    0000f020 main
    0000f040 _stack
    00011040 __TI_STACK_END
    00011040 _sys_memory
    00013040 _ftable
    00013220 _stream
    000132c0 _device
    00013338 __TI_cleanup_ptr
    0001333c __TI_dtors_ptr
    00013340 __TI_enable_exit_profile_output
    0001334c _lock
    00013350 _unlock
    00013354 __TI_ft_end
    00013358 __errno
    00013358 errno
    00013360 __TI_tmpnams
    000134a0 parmbuf
    000134a8 _ctypes_
    000135e0 __CIOBUF_
    000137b0 __TI_Handler_Table_Base
    000137b8 __TI_CINIT_Base
    000137b8 __TI_Handler_Table_Limit
    000137c8 __TI_CINIT_Limit
    ffffffff __TI_pprof_out_hndl
    ffffffff __TI_prof_data_size
    ffffffff __TI_prof_data_start
    ffffffff __binit__
    ffffffff __c_args__
    ffffffff binit
    UNDEFED __TI_INITARRAY_Base
    UNDEFED __TI_INITARRAY_Limit
    UNDEFED __TI_TLS_INIT_Base
    UNDEFED __TI_TLS_INIT_Limit

    [100 symbols]

  • Hi,

    Ok, so this is indicates that you don't have a correct linker .cmd file. You're probably running a custom project and not some of the projects included in Processor SDK RTOS, right?

    You can get there through: Project/Properties/General. *.cmd files are situated in: ~/ti/ccsv7/ccs_base/c6000/include


    Best Regards,
    Yordan