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.

CCS/TMS320DM8148: Cross compile for ARM in windows

Guru 20755 points
Part Number: TMS320DM8148


Tool/software: Code Composer Studio

Hello,

I am using CCS in windows.

I have installed both gnu arm and TI compiler for arm running in Linux, which also contain gdb/gdbserver.

Yet, on creating a new project, I don't find how to set cross compiler for arm.

I found in C:\ti\ccsv7\tools\compiler 

the following:


04/15/2018 11:36 PM <DIR> .
04/15/2018 11:36 PM <DIR> ..
07/20/2017 12:17 AM <DIR> dmed
07/20/2017 12:18 AM <DIR> gcc-arm-none-eabi-6-2017-q1-update
07/20/2017 12:14 AM <DIR> ti-cgt-arm_16.9.3.LTS
11/29/2017 07:39 PM <DIR> ti-cgt-arm_16.9.6.LTS
04/15/2018 10:52 PM <DIR> ti-cgt-arm_16.9.7.LTS
04/15/2018 11:36 PM <DIR> ti-cgt-arm_18.1.1.LTS
07/20/2017 12:13 AM <DIR> ti-cgt-c6000_8.1.3
11/29/2017 07:39 PM <DIR> ti-cgt-c6000_8.1.5
04/15/2018 10:52 PM <DIR> ti-cgt-c6000_8.1.6

So, I tried to use gcc-arm-none-eabi-6-2017-q1-update (although not sure if it fits Linux ??) , and then I got the following build errors:

make all
Building file: ../src/example.c
Invoking: Cross GCC Compiler
arm-none-eabi-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/example.d" -MT"src/example.o" -o "src/example.o" "../src/example.c"
Finished building: ../src/example.c

Building target: example
Invoking: Cross GCC Linker
arm-none-eabi-gcc -o "example" ./src/example.o
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x24): undefined reference to `_write'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text._close_r+0x18): undefined reference to `_close'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek'
c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text._read_r+0x24): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status
make: *** [example] Error 1

08:14:37 Build Finished (took 1s.158ms)

Thank you,

ran

  • ranchu said:
    I have installed both gnu arm and TI compiler for arm running in Linux, which also contain gdb/gdbserver.

    Are you looking to create a bare-metal application to run on the ARM processor, or a application to run on Linux OS running on the ARM? The toolchain to select will depend on that.

    The more common use-case when using CCS is the former (bare-metal application). For this you can use the compiler tools included with CCS (arm-none-eabi). 

    For the latter (application running on Linux) you will require a Linaro toolchain targeted for Linux (arm-linux-gnueabi) which you need to separately download and install. After installing a Linaro toolchain, you could use the steps in this page as a reference to set up and use CCS to build the project. Note that the page was written for CCSv5 so some steps may need to be adjusted for newer CCS versions. 

  • We have progressed.

    I'll give more details:
    1. we actually have 2 custom boards (not related to EVM mentioned before):
    one which works, has an older chip (got from TI's sample)
    a second - newer board with newer chip from TI's factory (not given as sample chip).
    + EVM board
    2. we read device id and factory id from the EVM and from the newer chip board:
    1. in evm:
    vendor - 0451
    product - 8440
    2. in the newer failed:
    vendor- b7fc
    product - ff4d

    How is it that vendor/product is different in the new chip?

    Should we program eeprom with correct IDs ?

    Thank you,
    ran

  • Ran,

    Since this last question is not related to the original question that started this thread nor does it fall under CCS/related tools, I would request that you start a new post for this in the appropriate device forum. We will close out this thread as you have made progress since your original question.