Site Index
   Support Home
   C5000 Home
   EVM5502
   EVM5509
   EVM5509A_PLUS
   DSK5509A
   DSK5510
   DSK5416
   PEP5416
   Ordering Info.
Google

C5000 Site
Support Site
Main Site

PEP5416 Board Support Library

The BSL provides a C-language interface for configuring and controlling all on-board devices. The library consists of discrete modules that are built and archived into a library file. Each module represents an individual API and is referred to simply as an API module. The module granularity is structured so each device is implemented in an individual API module. The goal of the BSL is to provide a level of hardware abstraction and software standardization that improves development time and portability.

The BSL contains the following modules:

File Description
Board Setup Module General board initialization
Codec Module Access to the AIC23 codec
HPI Module HPI
LED Module Manipulate LEDs
Rotary Module Read rotary

Libraries and include files
In its most basic form, using the BSL is just a matter of:

  1. Linking the BSL in with your code.

  2. Referencing the appropriate include files for each module (see the API descriptions for each function’s requirements).

  3. Calling the functions themselves, starting with PEP5416_init().

The libraries and include files reside in the include and lib directories of the PEP5416 example directory.

Using the BSL
The version of Code Composer that comes with the PEP automatically includes the lib and include paths above so you don’t need to manually include them in the search paths. To include the pep5416bslf.lib file for example, select Project -> Build Options on the Linker tab type pep5416bslf.lib in the "Include Libraries" field.

If you choose to specify your search paths, the library search path is specified on the same tab as the library file and the include search path is specified by selecting Project -> Build Options, and setting the "Include Search Path" field in the preprocessor section of the compiler tab.

Customizing the BSL
The BSL source code is available in the lib directory along with the library itself. You may extend or modify the source code and build your own version of the library. You can also include the BSL source files directly into your application for greater control. One useful technique while debugging is to use Code Composer’s ability to open multiple projects simultaneously to open both your application and the BSL at the same time. The debugger will treat the BSL almost as if the source code for both projects were actually part of the same project.

Project checklist
The following are things to check when creating your own project:

  • CDB File The CDB file contains all of the DSP/BIOS settings. The easiest thing to do is copy, rename and modify one of the BSL examples.

  • Linker Command File Included - Make sure the linker command file is included in your project. It ends in .cmd and is auto-generated when your CDB file is compiled.

  • BSL Library Included - Make sure the correct BSL library is included. The BSL library should be specified by selecting Project -> Build Options on the Linker tab and typing pep5416bslf.lib in the "Include Libraries" field.

  • Include Paths are Set - If you can’t see header (*.h) files that your program uses, make sure you have the paths set correctly in Project -> Build Options on the Preprocessor tab. If you can’t see header files in the same directory as your project, add a . to your search path. To include multiple paths, place a semicolon between paths, for example:

    .;c:\ti\boards\pep5416\include

    includes both the project directory and the BSL include directory.

  • Processor Options are Set - The code gen tools need to be aware of the processor type and silicon revision to fully optimize your code.

    Look under System -> Global Settings in the CSL selector box. If your program does not use DSP/BIOS you must manually define the value CHIP_5416 under Project -> Build Options on the Define Symbols field of the Preprocessor tab. Use a semicolon to separate multiple values if something else is already defined.

©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.