Loading documents preview...
Practical Audio Experiments using the TMS320C5505 USB Stick
“Getting Started” Texas Instruments University Programme Teaching Materials
© 2010 Texas Instruments Inc
0-1
Getting Started
© 2010 Texas Instruments Inc
Chapter 1 - Slide 2
Objectives • To build your first project using the TMS320C5505 USB Stick. • Playback music using the TMS320C5505 USB stick.
• Modify the code.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 3
Important • Follow the steps carefully! • If the wrong memory models are used, the project will not build.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 4
Compatibility • All of the applications provided on this teaching CD will also run on the TMS320C5505 and TMS320C5515 USB Stick without modification. • To run the applications on the older TMS320VC5505 USB stick, it is necessary to make a change to the file csl_general.h
© 2010 Texas Instruments Inc
Chapter 1 - Slide 5
TMS320C5505 USB Stick Setup USB Stick
USB to PC CD Player Headphones
© 2010 Texas Instruments Inc
Chapter 1 - Slide 6
TMS320C5515 USB Stick Setup USB to PC
Microphone Headphones
© 2010 Texas Instruments Inc
Chapter 1 - Slide 7
Compatible Microphone • A 600 Ohm dynamic microphone is recommended. A low-cost karaoke microphone can be used.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 8
Microphone Adaptor • The USB stick uses a 3.5mm stereo jack • For a 6.35mm jack (microphone or guitar), an adaptor is required.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 9
Workspace • Code Composer Studio creates a “workspace”, that is a folder where projects are stored
• The default directory is: Desktop -> My Documents -> Workspace.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 10
Create New Folder in Workspace • Using Windows Explorer, create a new folder
© 2010 Texas Instruments Inc
Chapter 1 - Slide 11
Naming the New Project • Name this folder MyFirstProject
© 2010 Texas Instruments Inc
Chapter 1 - Slide 12
Copy the Files • Copy the project files to MyFirstProject folder
© 2010 Texas Instruments Inc
Chapter 1 - Slide 13
Start Code Composer Studio • Start Code Composer Studio
© 2010 Texas Instruments Inc
Chapter 1 - Slide 14
Creating a New Project • Select File -> New ->CCS Project
© 2010 Texas Instruments Inc
Chapter 1 - Slide 15
Naming the New Project • For Project Name use MyFirstProject. Click Next >
© 2010 Texas Instruments Inc
Chapter 1 - Slide 16
Project Types Available • Default is ARM. Select Project Type C5500 from list.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 17
Project Type Selected • Click on Next >
© 2010 Texas Instruments Inc
Chapter 1 - Slide 18
Additional Project Settings • No references to other projects. Click Next >
© 2010 Texas Instruments Inc
Chapter 1 - Slide 19
Select TMS320C5505 • From the pull-down menu, select TMS320C5505 • Note: This and others windows may look slightly different, depending on the release version of CCS 4.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 20
Select Runtime Support Library • The Runtime Support Library required is rts55h.lib, which is automatically selected.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 21
Select Linker Command File • Do not put anything in Linker Command File. • Click on Finish.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 22
Active Project • The the C/C++ Projects window, MyFirstProject is the Active Project for Debug.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 23
Show Files in MyFirstProject • Click on + to expand the list of files.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 24
View main.c • Double left click on main.c to open the main.c file.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 25
Select Project Properties • Select Project -> Properties
© 2010 Texas Instruments Inc
Chapter 1 - Slide 26
Properties for MyFirstProject
© 2010 Texas Instruments Inc
Chapter 1 - Slide 27
C/C++ Build – Basic Settings • Double Click on C/C++ Build
© 2010 Texas Instruments Inc
Chapter 1 - Slide 28
Basic Options • Click on Basic Options.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 29
Setup Silicon Version • Type 5505 in for (--silicon_version, -v)
© 2010 Texas Instruments Inc
Chapter 1 - Slide 30
Runtime Model Options • Double click on Runtime Model Options
© 2010 Texas Instruments Inc
Chapter 1 - Slide 31
Setting the Pointer Size • Set (--ptrdiff_size) to 32 (default).
© 2010 Texas Instruments Inc
Chapter 1 - Slide 32
Selecting the Memory Model • It is important to use the “huge” memory model.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 33
Runtime Model Options Selected • Click on OK.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 34
Processor Specific Settings • Two different processors have been used on the C5505 USB Stick: – TMS320C5505 (newer boards) – TMS320VC5505 (older boards), as shown in picture below:
© 2010 Texas Instruments Inc
Chapter 1 - Slide 35
Modifications for TMS320VC5505 • The following change is required for boards with the TMS320VC5505 only.
• Go to the C/C++ Projects window then open the file csl_general.h:
© 2010 Texas Instruments Inc
Chapter 1 - Slide 36
Building the Project • Select: Project -> Build Active Project.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 37
Build Complete • Console windows shows build is complete • Problems window should contain no errors or warnings.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 38
Confirming Memory Model • Scroll up the Console Window to check that memory_model=huge.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 39
Problems with the Build? • If you are having specific problems with the build, it is most likely that you have missed out a step in the process • It is important to have: – Silicon version 5505 – huge memory model – rts55h.lib
© 2010 Texas Instruments Inc
Chapter 1 - Slide 40
Debugging the Project
© 2010 Texas Instruments Inc
Chapter 1 - Slide 41
Launch TI Debugger • Select Target -> Launch TI Debugger
© 2010 Texas Instruments Inc
Chapter 1 - Slide 42
First Debug Session Only • The first time you debug, you will be asked to Open Target Configuration. Click Yes.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 43
Naming Target Configuration • You may wish to change the Target Configuration Name.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 44
Setup XDS100 USB Emulator • Select Texas Instruments XDS100v2 USB Emulator.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 45
Configure C5505 USB Stick • Select USBSTK5505. Click on Save.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 46
XDS100 Now Connected • The XDS100 USB Emulator is now connected.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 47
XDS100 Emulator Configured • The Console window shows that the Phase Lock Loop has been set up for 100MHz operation
• The XDS100 USB Emulator has been successfully set up.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 48
Start Debug of MyFirstProject • Select Target -> Debug Active Project.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 49
Debugging MyFirstProject • XDS100 USB Emulator is debugging MyFirstProject.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 50
Go to main() • Arrow shows that the program is ready to run from the beginning of main().
© 2010 Texas Instruments Inc
Chapter 1 - Slide 51
Run Program • Select Target -> Run.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 52
Program Running • The following text is shown in the Console Window:
© 2010 Texas Instruments Inc
Chapter 1 - Slide 53
Halt Program Execution • To stop the program, select Target -> Halt.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 54
Modifying C Code
© 2010 Texas Instruments Inc
Chapter 1 - Slide 55
Before Modification • main.c before modification
© 2010 Texas Instruments Inc
Chapter 1 - Slide 56
After Modification • main.c after modification. Change gain of channels.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 57
Rebuild Active Project
© 2010 Texas Instruments Inc
Chapter 1 - Slide 58
Viewing Files in Debug
© 2010 Texas Instruments Inc
Chapter 1 - Slide 59
Viewing Source Files • Highlight any file and click on it to edit.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 60
Summary
© 2010 Texas Instruments Inc
Chapter 1 - Slide 61
Summary • You have now learnt how to set up the TMS320C5505 USB Stick
• All of the other applications are self-contained, so if you have a specific interest, you can go straight to that application • It is recommended that the chapters be followed in sequence because some of the later chapters use concepts explained earlier.
© 2010 Texas Instruments Inc
Chapter 1 - Slide 62