Site Index
   Support Home
   OMAP Home
   Related Products
   OMAP Tech Docs
   Linux Docs
   Development Flow
   Ordering Info.

Support Site
Main Site

OSK5912 Board Support Library

The Board Support Library (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 Application Program Interface (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
ENET Module Ethernet config and I/O
Flash Module Program and erase Flash
I2C Module I2C config and I/O
LED Module Manipulate LEDs
Power Module Power management
UART Module UART config and I/O

Using the BSL
To use the BSL:

  1. Link the BSL in with your code.

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

  3. Call the functions themselves, starting with OSK5912_init().

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

Libraries and include files
The version of Code Composer that comes with the OSK5912 automatically includes the lib and include paths above so you donít need to manually include them in the search paths. To include the OSK5912bsl.lib file for example, select Project -> Build Options on the Linker tab type OSK5912bsl.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:

  • GEL File - Make sure the gel (osk5912.gel) file is included in your project.

  • Linker Command File Included - Make sure the linker command ( *.cmd) file is included in your project.

  • Endian Mode is Consistent - The endian mode settings must be consistent in each place it is set. It is set in the project options by selecting Project -> Build Options and viewing the Compiler tab under the Advanced Section. Typically, little endian mode should be used on the OSK5912.

  • BSL Library Included - Make sure the correct BSL library is included. The BSL library should be specified by selecting Project -> Add Files to Project for the file path you can type or search for

  • 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 Compiler tab under the Preprocessor Section ďInclude Search PathĒ field. 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:


    includes both the project directory and the BSL include directory.

  • C Runtime Library Included - The TI C Runtime Library allows the use of printf( ) statements and other common C functions. The C Runtime library should be specified by selecting Project -> Add Files to Project for the file path you can type or search for


    Note: This is optional if you require the uses of printf( ) statements, or other common C functions.

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