Building Starterware projects in CCSv5 using GCC
Content is no longer maintained and is being kept for reference only!
This page describes the process for (re)building AM335x Starterware example projects using GCC and CCSv5. The StarterWare_Getting_Started_02.00.XX.XX wiki page lists the host platform requirements as well as other supported methods of rebuilding the examples. Please be sure to read that page first.
The supported build methods on Windows listed in that page are
- GCC from Command line in Cygwin
- TMS470 through CCSv5 project
- IAR Embedded Workbench IDE project
In addition to the command line method described in that page, GCC can also be used with CCSv5 by using the same makefile build process. The steps to do so are shown below.
Note: this is not a officially supported/tested build method, however this page is provided to serve as a guideline for those interested in using the CCS GUI to build with the GCC toolset.
Building Starterware project
Make sure you have satisfied all the host requirements and set up the tool chain as described in StarterWare_Getting_Started_02.00.XX.XX#Host_platform_Requirements.
- In CCSv5, go to menu File->New->Project, Makefile Project with Existing Code
- Browse to specific example within gcc build folder in Starterware. Choose Cygwin GCC for toolchain. Click Finish
- Note that in the Project Explorer view you will only see the makefile and linker script (gpioLedBlink.lds), which are the only files that physically reside in that folder. All other source files that comprise the project are physically in other folders and the makefile takes care of locating them.
- Right-click on project and go to Properties->C/C++ Build->Environment. Select “Replace native environment with specified one”. Click on Add. Add a new variable named LIB_PATH with value set to the path to your Code Sourcery tools (say C:/Programs/CodeSourcery/Sourcery_G++_Lite). Make sure the path has forward slashes and not backslashes. This is necessary for the build to succeed without errors.
- Right-click on the project and select Build project. The executable (ELF and binary image) will be generated in the corresponding location in binary directory. For example, on building the 'gpio' project present in 'build/armv7a/gcc/am335x/beaglebone/gpio', the executables are generated in 'binary/armv7a/gcc/am335x/beaglebone/gpio'.
- After the project is built, you can proceed with loading and debugging it by following the procedure in StarterWare_Getting_Started_02.00.XX.XX#Loading_Executable_and_Debugging_using_CCSv5
Importing existing project
Once you have created a makefile project in CCS using the above steps, you can import it into a workspace at any time using the steps below: