EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #38 background imageLoading...
Page #38 background image
Creating and Building a CCSv4 Project for DSP/BIOS Applications
2-8
2.1.2 How hello.c Uses DSP/BIOS
The hello.c program uses DSP/BIOS’s LOG module to send a message to
the host.
The first few lines include the header files for DSP/BIOS modules used in this
file. In DSP/BIOS programs, always include the std.h file first, then include the
module header files. This example uses the LOG module, so that header file
is also included.
#include <std.h>
#include <log.h>
The program must also include the header file that will be generated from the
.tcf configuration file. This file has the filename <tcf_file>cfg.h. For example,
if the .tcf file for a project is hello.tcf, the #include statement would be as
follows:
#include "hellocfg.h"
The main() function simply prints a message to a log using the LOG_printf
API. This API is very efficient. To reduce execution time, LOG_printf just
passes raw data to the host PC; formatting is done on the PC.
/* ======== main ======== */
Void main()
{
LOG_printf(&trace, "hello world!");
After the main() function is complete, it returns. In more complicated
applications, the return statement has the effect of turning control over to
DSP/BIOS scheduling to run hardware interrupts (HWI), software interrupts
(SWI), tasks (TSK), and idle functions (IDL) as needed.
/* fall into DSP/BIOS idle loop */
return;

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals