Starterware Bootstrap - matianfu/survivor GitHub Wiki

install starterware

Download starterware for ti am335x from:

http://processors.wiki.ti.com/index.php/StarterWare

chmod and run installation bin file.

After installation, most (but not all) directories and subdirectories have permission of 777, which results in the highlighted display in shell. Change the permission to 775 to suppress.

chmod 775 $(find . -type d -perm 777)

using openocd and gdb

failed. Seems openocd cannot access sram address.

using ccs/eclipse

dependency

The starterware are highly modular and fine-grained. The codes are split into platform (board-specific), drivers, libs (such as usb, mmc, etc) and apps, respectively.

The top level folder for ccs projects (project file, I mean, not source code, they are separately located) is <starterware>/build/armv7a/cgt_ccs. Startware is an ambitious project (like the u-boot) that aims to support many ARM chips, not only the AM335x family. cgt_ccs comes from some heritage naming convention related to TI ARM compiler, which is used by CCS. If you are going to use IAR or GCC, refer to EWARM or GCC folder respectively.

In cgt_ccs folder, there is grlib (graphic lib), mmcsdlib, nandlib and utlis. All these components are board (and probably chip) independent.

Inside am335x folder, drivers, system_config, and usblib seems to be board independent. But probably chip dependent. I guess for other chips such AM437x, all these should be in another suite.

Finally we land into beaglebone sub-folder. Here we have all example app folder, except for two of them: the bootloader, and the platform, which supposed to be needed for every app.

The dependency on libs, are application specific. But in most case, platform, drivers, and utils are required by all apps as well as boot loaders.

For example, the bootloader project requires drivers, mmcsdlib, platform and utils to be built before and place their output into the binary folder.

bootloader as an example

Import and build drivers, mmcsdlib, platform (for beaglebone) and utils projects first. Then import bootloader project. Building will fail with a lot of errors at this time.

Right click the (executable) project name, boot, choose Properties->Build->Steps->Post-build steps->command:

"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat"
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/bootloader/${ConfigName}/${ProjName}.out"
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/bootloader/${ConfigName}/${ProjName}.bin"
"${CG_TOOL_ROOT}/bin/armofd.exe"
"${CG_TOOL_ROOT}/bin/armhex.exe"
"${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe" & 
"../../../../../../../tools/ti_image/tiimage.exe" "0x402F0400" "MMCSD"
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/bootloader/${ConfigName}/${ProjName}.bin"
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/bootloader/${ConfigName}/${ProjName}_ti.bin"

This script is written for Windows platform. A lot of things should be corrected. This argument is also applicable for building other executables, but not for lib targets since they don't generate the final executables, with need special treatment before they can be loaded into the memory and execute.

  1. tiobj2bin.bat (in ccs folder) should be changed to tiobj2bin.
  2. tiobj2bin is a shell script. On Ubuntu, the default shell is dash, not bash. This cause problems. Open the script file and change the first (shebang) line to #! /bin/bash.
  3. armofd.exe and armhex.exe should be changed to armofd and armhex respectively. They are located in /tools/compiler/arm_5.1.1/bin/ inside ccsv5 folder.
  4. Change mkhex4bin.exe to mkhex4bin. It resides in the same folder with tiobj2bin.
  5. Finally, tiimage.exe to tiimage. It's located in <starterware>/tools/ti_image/tiimage.

Be sure to CLEAN the project before rebuilding it.

debugging

http://processors.wiki.ti.com/index.php/AM335X_StarterWare_Environment_Setup

Create target configuration from View menu. Choose xds100v2 usb emulator and beaglebone.

Tips: if the test complaints, try to repair the FTDI driver in this way:

cd <ccsv5>/install_scripts
sudo ./install_drivers.sh

Then reboot the system. I used this way to fix the issue (After I manipulate with FTDI driver and lib for quite some time, for OpenOCD, the XDS100v2 debug stop working).

⚠️ **GitHub.com Fallback** ⚠️