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.

how to setup CCS v6 to cross compile on WIN 8 for BeagleBone Black running latest Angstrom image

Hi,

have a new BBB Rel C with latest Angstrom image on it, works fine stand alone. Possible to use gcc, gdb, ddd etc.

On my Laptop running Win 8 is the latest CCS V6 (Version: 6.0.1.00040)  installed, with PRU support, everything is in place and works.

Remote access to BBB is also up and running, so far so good. Plug and play out of the CCS V6.

I want to develop and debug on the WIN 8 laptop.

Question: how to setup a new project to compile and link correctly for the Linux OS running on BBB?

If I use the Hello World template, it compiles and link successfully, without any warning, but it is not possible to execute the binary on BBB ( chmod +x is done ).

Selected Target is BeagleBone Black

Compiler GNU V4.7.4 (Linaro)

Basic Example -> Hello World

Error Message:

root@beaglebone:~/Projects/TEST_Hello_1# ./Hello_World.out
Illegal instruction
root@beaglebone:~/Projects/TEST_Hello_1# file Hello_World.out
Hello_World.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripp
ed
root@beaglebone:~/Projects/TEST_Hello_1#

root@beaglebone:~/Projects/TEST_Hello_1# uname -a
Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux

I made tests with a lot of  possible settings, no success.

And I did not find any example or tutorial for the described configuration.

Transcript of the last try:

**** Build of configuration Debug for project Hello World ****

"c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../hello.c'
'Invoking: GNU Compiler'
"c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -Dam3359 -I"c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include" -g -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"hello.d" -MT"hello.d" -o"hello.o"  "../hello.c"
'Finished building: ../hello.c'
' '
'Building file: ../startup_ARMCA8.S'
'Invoking: GNU Compiler'
"c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -Dam3359 -I"c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include" -g -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"startup_ARMCA8.d" -MT"startup_ARMCA8.d" -o"startup_ARMCA8.o"  "../startup_ARMCA8.S"
'Finished building: ../startup_ARMCA8.S'
' '
'Building target: Hello World.out'
'Invoking: GNU Linker'
"c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" -Dam3359 -g -gstrict-dwarf -Wall -specs="rdimon.specs" -Wl,-Map,"Hello World.map" -Wl,--defsym,STACKSIZE=0x18000 -Wl,--defsym,HEAPSIZE=0x400 -o"Hello World.out" "./hello.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  -Wl,--start-group -l"c" -l"gcc" -l"rdimon" -Wl,--end-group
'Finished building target: Hello World.out'
' '

**** Build Finished ****

Any hint is appreciated

Pepito

PS my target application is a chip tester, need high speed access to IO, think with aid of the PRU units it should work. Directly compiled on BBB is already some stuff running. But I'm sure CCS is more comfortable.

  • Moving this to the CCS forum.

  • is this the answer or an advise? Did not help.

    Pepito

  • Pepito said:
    Question: how to setup a new project to compile and link correctly for the Linux OS running on BBB?

    If I use the Hello World template, it compiles and link successfully, without any warning, but it is not possible to execute the binary on BBB ( chmod +x is done ).

    The gcc-arm-none-eabi-4_7-2013q3 compiler which comes with CCS creates "bare metal" applications which are intended to run directly on the processor, rather than Linux applications.

    Found Creating a Linux GCC project in Windows hosted CCSv5 which was written for CCS v5 on how to compile Linux applications. However, not sure how much is applicable to CCS v6

    [I haven't tried creating ARM Linux applications myself]

  • After installation of

    http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09-20140911_win32.exe

    I'm now able to cross compile on Win 7/8 PC for BeagleBone running Linux.

    Remote debug is really unstable. First of all, provide full path to gdb, otherwise it doesn't work.

    It connects stable with BeagleBone, compiled program, required files are copied automatically to Beaglebone project work directory, but I have to go thru the debug setup again and again, existing setup is not saved correctly / completely. 

    At the moment it's really time consuming, and concerning the result, it's not efficient.

    I'm missing also useful documentation how to use PRU C programs in that environment. I'm able to write and compile PRU C programs on the Win PC .... but communication with ARM C is not working ( usage of __R31 as described ). Had to copy include files and libraries for PRU to the expected location by hand.

    Because the PRU C compiler is not available for BeagleBone Linux, I have to cross compile.

    Best efficiency ( only C for ARM ) I have with vi, gcc/g++, ddd/gdb and make directly on Beaglebone. In that environment I can concentrate of the work I have to do.

    I would like to have the same ( PRU C, ddd/gdb ) tool chain available on BeagleBone.

    Am I the only one running into that mouse trap?

    I developed over years a lot of projects for µP ( FreeRtos, Linux ) with different targets and environments, but never I spent so much time to setup the environment to get  it ( unstable ) work.

    Pepito

     

     

     

  • Hello,

    I'm running into the same problem. I thought that if I configured a project to use the Angstrom toolchain, things would work. The toolchain can be found here:
    http://web.archive.org/web/20130823131954/http://www.angstrom-distribution.org/toolchains/

    ...however I'm unable to configure CCS to use this toolchain, either through Window->Preferences->Code Composer Studio->Build->Compilers, or when creating a New Project. Can someone provide some info on how this could be done?

    I'm using CCS 6.0.