Has any one had success with Code Composer Studio and Beaglebone Black?

Installed Ti’s code composer studio in hopes of making life simpler, so far not so good. They have an option for BBB and a prepackaged “hello world” and all that creates is a .o file. Is that all its suppose to do?

We don’t use eclipse so that does not help this issue at all.

Just tried on my install CCS V12.0 running on Linux host. I had to install AM33x support, but after that, yes I can create a new hello world project and it does compile and produce an executable using the TI compiler. However when run gives me a segmentation fault. Probably because it is compiled for a different C lib.
Or maybe it is compiling it for bare metal.

CCS doesn’t seem to find a 32bit gcc arm cross compiler, probably need to point it at the correct directory in preferences.
It does give me 2 versions of CLang, will see if they work any better,

How did you get it to build an executable?

Restarted it and it now has a .out in the debug folder, so it is assumed that is the actual executable. It gets a segmentation fault on the arm board, and missing argument on amd64. Either way it does not work.

Changed to linaro compiler and now it is illegal instruction.

Here is the console output.

Invoking: GNU Compiler
"/home/fred/ti/ccs1210/ccs/tools/compiler/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc-9.2.1" -c -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -marm -Dam3359 -I"/home/fred/workspace_v12/test3" -I"/home/fred/ti/ccs1210/ccs/tools/compiler/gcc-arm-none-eabi-9-2019-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"hello.d_raw" -MT"hello.o"   -o"hello.o" "../hello.c"
cc1: warning: switch '-mcpu=cortex-a8' conflicts with '-march=armv7-a' switch
Finished building: "../hello.c"
 
Building file: "../startup_ARMCA8.S"
Invoking: GNU Compiler
"/home/fred/ti/ccs1210/ccs/tools/compiler/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc-9.2.1" -c -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -marm -Dam3359 -I"/home/fred/workspace_v12/test3" -I"/home/fred/ti/ccs1210/ccs/tools/compiler/gcc-arm-none-eabi-9-2019-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs"  -o"startup_ARMCA8.o" "../startup_ARMCA8.S"
Finished building: "../startup_ARMCA8.S"
 
Building target: "test3.out"
Invoking: GNU Linker
"/home/fred/ti/ccs1210/ccs/tools/compiler/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc-9.2.1" -mtune=cortex-a8 -Dam3359 -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -mcpu=cortex-a8 -Wl,-Map,"test3.map" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 -o"test3.out" "./hello.o" "./startup_ARMCA8.o" -Wl,-T"../AM335x.lds"  
cc1: warning: switch '-mcpu=cortex-a8' conflicts with '-march=armv7-a' switch
Finished building target: "test3.out"
 

**** Build Finished ****

Are you trying to compile for bare metal, or do you just want an IDE that will cross compile for the Linux running on the BBB ?

When using Linaro, if you right click on the project and select properties, you can possibly change the compiler switches. Don’t ask me which ones you need though.

If you are trying to cross compile for Linux on the BBB then it is not a simple process.

You would need to use the same version of GCC that was used to build the image. You also need a sysroot image of the BBB on the host machine.

The only time I have done this, was when I used Buildroot, to build a custom BBB image. Buildroot will build you a cross compiler and setup a sysroot on your host machine for cross compiling. That is probably a bit extreme for most though.

It is just easier to compile on the BBB most of the time.

If you are compiling for bare metal, then the version of GCC does not matter and you do not need the sysroot.

1 Like

What I do is cross compile on host using geany calling the arm cross compiler and then use a script to send the exec. to bbb. That does work very good, I was looking for a little more integration.

It appears the config files in the CCS are for an old BB version dating back to 2013 or so. I have already evaporated the VM that was set up for the code composer studio and moving on to something else.

I was looking at clion, have you used that?

Where possible, most of the time I use a simple text editor (Kate).
Currently developing software on a AM3352 based box, running Debian. I either use scp to copy over a new binary for testing, or the Makefile can build a deb package for me for OTA updates.

If coding for a small micro, then generally the vendor IDE (STM32CubeIDE, MCUxpressiode, MPAB X ) however if the project is Makefile based, then more than likely will use kate. I am also in the process of modifying an existing STM32 based project to also build for a SAMV71 cpu.

If I was going to use an IDE instead of Kate, I would probably go with QT Creator. I have used it in the past and quite like it. Fairly clean interface. If deploying to a Linux device, it can do the scp file copy for you. Can also do remote debugging if gdb is on the target. That’s assuming the software is running on top of an operating system. Can’t use make with QT Creator though, it is either qmake, cmake or qbs.

1 Like

I found this link to useful to get me up and running with building for BBB and remote debugging…

https://community.element14.com/products/devtools/single-board-computers/next-genbeaglebone/b/blog/posts/beaglebone-build-and-debug-a-linux-c-program-with-code-composer-studio

The cross-compiler I’m using is…
gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf

Use the gmake.exe that is in the CCS utils directory.

1 Like

Thank you for sharing that, at the present that link is not working.

Been working on setting up eclipse for the BBB and AI64. The CCS seems to have way too many different product offerings making it overly complex.

I like it simple, been using Geany to cross compile and script to send it over to the target. That is very simple and easy to troubleshoot if things do not work properly.

eclipse has it all on one page, I will work with it some more and try to get it dialed in. Since it is the base for CCS I might be able to pick and chose then move PRU related over to eclipse so it will be specific to BBB and AI64. That should simply this immensely.

They have a very co-mingled and confusing licensing for their products so it keeps me at a distance from them.

I will look into kate, did not know about that one until you mentioned it, thank you.

Assuming you are not using the QT libs, then unless there is some restrictions on using QT Creator in a commercial setting there should be no licensing issues.

I like Kate. Obviously you will not get the intelli-sense like function help, but there are some useful plugins for git, make, cmake, ctags. It all depends on how you like to work.

1 Like