This page is optimized for mobile devices, if you would prefer the desktop version just click here

2.1 Log lab

The module is a lab assignment to better understand the TI DSP/BIOS LOG module.

Introduction

This lab module will help you become familiar with TI DSP/BIOS LOG module and its use.

Reading

  • SPRU423 TMS320 DSP/BIOS Users Guide: Read the section Event Log Manager (LOG Module)

Lab module prerequisites

None

Laboratory

  • Follow the procedure in Code Composer Studio v4 DSP/BIOS Project to create a new CCS DSP/BIOS project. Name the project loglab . Your project should have a DSP/BIOS configuration file named loglab.tcf .
  • Create a LOG object called trace . Use the default length of 64 and the logtype circular.
  • Add a task to the configuration. This is part of the TSK module but you don't need to know about the module to be able to do this lab. Add a task by right clicking on Scheduling->TSK and selecting Insert TSK . A new task should be added called TSK0 .
  • Specify the function the task will run by right clicking on TSK0 and bringing up its properties. On the Function tab next to Task Function type in the function name _logTSK . This will specify the C function logTSK as the function it will call.
  • Create a main.c file and include a main function that does nothing and a function logTSK . The main structure of the file is
#include<std.h>#include<log.h>#include<tsk.h>#include "loglabcfg.h"main() {}logTSK() {/* your code here */ }
  • Write a loop in the logTSK function that loops 20 times and writes some text indicating that the loop number is being printed and print the loop number. For instance, have it print
Loop Number 0 Loop Number 1Loop Number 2 ...
  • Start the debug session.
  • Open the log view by selecting Tools->RTA->Printf Logs .
  • Run the program and record the results.
<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Ti dsp/bios lab. OpenStax CNX. Sep 03, 2013 Download for free at http://cnx.org/content/col11265/1.8
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.