CodeWarrior™ Development Studio for Motorola® 56800/E Hybrid Controllers: MC56F83xx/DSP5685xFamily Targeting Manual Revised 2003/08/15
IntroductionCodeWarrior IDE10Targeting MC56F83xx/DSP5685x Controllers• Build Target — The group of settings and files that determine what your code is
Processor Expert InterfaceProcessor Expert Tutorial100Targeting MC56F83xx/DSP5685x Controllersc. Type the new name GPIO_C0, then press the Enter key.
Processor Expert InterfaceProcessor Expert Tutorial101Targeting MC56F83xx/DSP5685x Controllers e. Repeat substeps a, b, and c for the two ExtInt beans
Processor Expert InterfaceProcessor Expert Tutorial102Targeting MC56F83xx/DSP5685x Controllersd. Use this list box to select GPIOC0_SCLK1_TB0_PHASEA1.
Processor Expert InterfaceProcessor Expert Tutorial103Targeting MC56F83xx/DSP5685x Controllers 7. Enable BitIO SetDir, ClrVal, and SetVal functions.a.
Processor Expert InterfaceProcessor Expert Tutorial104Targeting MC56F83xx/DSP5685x Controllers10. Update file Events.c.a. Click the project window’s F
Processor Expert InterfaceProcessor Expert Tutorial105Targeting MC56F83xx/DSP5685x Controllers This completes the Processor Expert tutorial exercise.
Processor Expert InterfaceProcessor Expert Tutorial106Targeting MC56F83xx/DSP5685x Controllers**** ###################################################
Processor Expert InterfaceProcessor Expert Tutorial107Targeting MC56F83xx/DSP5685x Controllers ** ====================================================
Processor Expert InterfaceProcessor Expert Tutorial108Targeting MC56F83xx/DSP5685x ControllersListing 5.2 File LEDcontrol.c/*** #####################
Processor Expert InterfaceProcessor Expert Tutorial109Targeting MC56F83xx/DSP5685x Controllers #include "GPIO_C0.h"#include "GPIO_C1.h&
IntroductionMotorola 56800/E Hybrid Controllers11Targeting MC56F83xx/DSP5685x Controllers Motorola 56800/E Hybrid ControllersThe Motorola 56800/E Hybr
Processor Expert InterfaceProcessor Expert Tutorial110Targeting MC56F83xx/DSP5685x Controllers { num = 7-num; } if
Processor Expert InterfaceProcessor Expert Tutorial111Targeting MC56F83xx/DSP5685x Controllers case 5: GPIO_D6_ClrVal(); brea
Processor Expert InterfaceProcessor Expert Tutorial112Targeting MC56F83xx/DSP5685x Controllers }}void main(void){ /*** Processor Expert intern
113Targeting MC56F83xx/DSP5685x Controllers6C for DSP56800EThis chapter explains considerations for using C with the DSP56800E processor. Note that th
C for DSP56800ENumber Formats114Targeting MC56F83xx/DSP5685x Controllers Table 6.1 56800E Ordinal TypesType Option Setting Size (bits)Rangechar Use U
C for DSP56800ECalling Conventions and Stack Frames115Targeting MC56F83xx/DSP5685x Controllers Table 6.2 shows the sizes and ranges of the floating-po
C for DSP56800ECalling Conventions and Stack Frames116Targeting MC56F83xx/DSP5685x ControllersReturning Values From FunctionsThe compiler returns func
C for DSP56800ECalling Conventions and Stack Frames117Targeting MC56F83xx/DSP5685x Controllers Arithmetic Logic Unit (ALU) (continued)A10 32 Volatile
C for DSP56800ECalling Conventions and Stack Frames118Targeting MC56F83xx/DSP5685x ControllersAddress Generation Unit (AGU) (continued)SP 24 Volatile
C for DSP56800ECalling Conventions and Stack Frames119Targeting MC56F83xx/DSP5685x Controllers Stack Frame and AlignmentFigure 6.1. depicts generation
IntroductionReferences12Targeting MC56F83xx/DSP5685x Controllers– Code Warrior IDE User’s Guide– Code Warrior Development Studio for Motorola 56800/E
C for DSP56800EUser Stack Allocation120Targeting MC56F83xx/DSP5685x ControllersThe compiler always must operate with the stack pointer long aligned. T
C for DSP56800EUser Stack Allocation121Targeting MC56F83xx/DSP5685x Controllers 4. You must not overwrite the compiler’s stack allocation by decreasin
C for DSP56800EUser Stack Allocation122Targeting MC56F83xx/DSP5685x ControllersIn cases where the SP is modified by a run-time dependent amount, a war
C for DSP56800EUser Stack Allocation123Targeting MC56F83xx/DSP5685x Controllers asm(nop);\ asm(nop);}#pragma check_inline_sp_
C for DSP56800EUser Stack Allocation124Targeting MC56F83xx/DSP5685x Controllersasm(nop);}#pragma check_inline_sp_effects onint func(){int a=1, b=1, c;
C for DSP56800EData Alignment Requirements125Targeting MC56F83xx/DSP5685x Controllers {EnterCritical();c = a+b;}else {EnterCritical();c = b++;}return
C for DSP56800EData Alignment Requirements126Targeting MC56F83xx/DSP5685x Controllers• Structures — double-word boundaries if they contain 32-bit elem
C for DSP56800ECode and Data Storage127Targeting MC56F83xx/DSP5685x Controllers • Reordering is mandatory if local variables are allocated on the stac
C for DSP56800ECode and Data Storage128Targeting MC56F83xx/DSP5685x Controllerscheckbox.”. You can locate these sections in the lower half of the memo
C for DSP56800ELarge Data Model Support129Targeting MC56F83xx/DSP5685x Controllers Large Data Model SupportThe DSP56800E extends the DSP56800 data add
13Targeting MC56F83xx/DSP5685x Controllers2Getting StartedThis chapter explains the setup and installation for the CodeWarrior™ IDE, including hardwar
C for DSP56800ELarge Data Model Support130Targeting MC56F83xx/DSP5685x ControllersYou do not need to change C source code to take advantage of the lar
C for DSP56800ELarge Data Model Support131Targeting MC56F83xx/DSP5685x Controllers Table 6.5 lists ways to access a global integer stored at address X
C for DSP56800EOptimizing Code132Targeting MC56F83xx/DSP5685x ControllersExternal Library CompatibilityIf you enable the large data model when the com
C for DSP56800EDeadstripping and Link Order133Targeting MC56F83xx/DSP5685x Controllers for (i=0; i<100; i++) { MyFunc(i); }for (j=0; j<100; j++)
C for DSP56800EDeadstripping and Link Order134Targeting MC56F83xx/DSP5685x ControllersLibraries built with the CodeWarrior C compiler contribute only
135Targeting MC56F83xx/DSP5685x Controllers7Inline Assembly Language and IntrinsicsThe CodeWarrior™ compiler supports inline assembly language and int
Inline Assembly Language and IntrinsicsInline Assembly Language136Targeting MC56F83xx/DSP5685x ControllersInline Assembly OverviewTo specify assembly-
Inline Assembly Language and IntrinsicsInline Assembly Language137Targeting MC56F83xx/DSP5685x Controllers Listing 7.3 shows how to use the asm keywor
Inline Assembly Language and IntrinsicsInline Assembly Language138Targeting MC56F83xx/DSP5685x Controllers6. Assembly language directives, instruction
Inline Assembly Language and IntrinsicsInline Assembly Language139Targeting MC56F83xx/DSP5685x Controllers add x0,y0// int result returned in y0rts}Li
Getting StartedInstalling the CodeWarrior IDE14Targeting MC56F83xx/DSP5685x Controllers1. Insert the CodeWarrior CD-ROM into your CD-ROM drive — an in
Inline Assembly Language and IntrinsicsInline Assembly Language140Targeting MC56F83xx/DSP5685x Controllers;pointed to by R0 in P: memory and;post-incr
Inline Assembly Language and IntrinsicsIntrinsic Functions141Targeting MC56F83xx/DSP5685x Controllers Intrinsic FunctionsThis section explains CodeWar
Inline Assembly Language and IntrinsicsIntrinsic Functions142Targeting MC56F83xx/DSP5685x Controllers * Allowed dst regs: (same) * * Assumptions: OMR&
Inline Assembly Language and IntrinsicsIntrinsic Functions143Targeting MC56F83xx/DSP5685x Controllers NOTE Intrinsic functions us these macros:Word16.
Inline Assembly Language and IntrinsicsIntrinsic Functions144Targeting MC56F83xx/DSP5685x ControllersTable 7.2 Intrinsic Functions for DSP56800ECateg
Inline Assembly Language and IntrinsicsIntrinsic Functions145Targeting MC56F83xx/DSP5685x Controllers Absolute/NegateThe intrinsic functions of the ab
Inline Assembly Language and IntrinsicsIntrinsic Functions146Targeting MC56F83xx/DSP5685x ControllersPrototypeWord16 negate(Word16 svar1)Exampleint re
Inline Assembly Language and IntrinsicsIntrinsic Functions147Targeting MC56F83xx/DSP5685x Controllers PrototypeWord32 L_negate(Word32 lvar1)Examplelon
Inline Assembly Language and IntrinsicsIntrinsic Functions148Targeting MC56F83xx/DSP5685x ControllersExampleshort s1 = 0x4000; /* 0.5 */short s2 = 0x
Inline Assembly Language and IntrinsicsIntrinsic Functions149Targeting MC56F83xx/DSP5685x Controllers L_addAddition of two 32-bit integer or fractiona
Getting StartedCreating a Project15Targeting MC56F83xx/DSP5685x Controllers NOTE Do not move the license.dat file after installation.12. This complete
Inline Assembly Language and IntrinsicsIntrinsic Functions150Targeting MC56F83xx/DSP5685x Controllers Examplelong la = 0x40000000; /* 0.5 */long lb
Inline Assembly Language and IntrinsicsIntrinsic Functions151Targeting MC56F83xx/DSP5685x Controllers waitGenerates a WAIT instruction which places th
Inline Assembly Language and IntrinsicsIntrinsic Functions152Targeting MC56F83xx/DSP5685x ControllersPrototypevoid turn_off_sat(void)Usageturn_off_sat
Inline Assembly Language and IntrinsicsIntrinsic Functions153Targeting MC56F83xx/DSP5685x Controllers Deposit/ExtractThe intrinsic functions of the de
Inline Assembly Language and IntrinsicsIntrinsic Functions154Targeting MC56F83xx/DSP5685x ControllersExamplelong l = 0x87654321;short result;result =
Inline Assembly Language and IntrinsicsIntrinsic Functions155Targeting MC56F83xx/DSP5685x Controllers Exampleshort s1 = 0x7FFF;long result;result = L_
Inline Assembly Language and IntrinsicsIntrinsic Functions156Targeting MC56F83xx/DSP5685x ControllersExampleshort s1=0x2000; /* 0.25 */short s2=0x4000
Inline Assembly Language and IntrinsicsIntrinsic Functions157Targeting MC56F83xx/DSP5685x Controllers NOTE Does not check for division overflow or div
Inline Assembly Language and IntrinsicsIntrinsic Functions158Targeting MC56F83xx/DSP5685x ControllersMultiplication/MACThe intrinsic functions of the
Inline Assembly Language and IntrinsicsIntrinsic Functions159Targeting MC56F83xx/DSP5685x Controllers Exampleshort s1 = 0xC000;/* - 0.5 */short s2 = 0
Getting StartedCreating a Project16Targeting MC56F83xx/DSP5685x ControllersTo create a DSP56800x project use either the:• DSP56800x new project wizard
Inline Assembly Language and IntrinsicsIntrinsic Functions160Targeting MC56F83xx/DSP5685x ControllersmultMultiply two 16-bit fractional values and tru
Inline Assembly Language and IntrinsicsIntrinsic Functions161Targeting MC56F83xx/DSP5685x Controllers PrototypeWord16 mult_r(Word16 sinp1, Word16 sinp
Inline Assembly Language and IntrinsicsIntrinsic Functions162Targeting MC56F83xx/DSP5685x ControllersL_msuMultiply two 16-bit fractional values and su
Inline Assembly Language and IntrinsicsIntrinsic Functions163Targeting MC56F83xx/DSP5685x Controllers Exampleshort s1 = 0x2000;/* 0.25 */short s2 = 0x
Inline Assembly Language and IntrinsicsIntrinsic Functions164Targeting MC56F83xx/DSP5685x ControllersNormalizationThe intrinsic functions of the norma
Inline Assembly Language and IntrinsicsIntrinsic Functions165Targeting MC56F83xx/DSP5685x Controllers NOTE Does not actually normalize the value! This
Inline Assembly Language and IntrinsicsIntrinsic Functions166Targeting MC56F83xx/DSP5685x ControllersExamplelong ll = 0x20000000;/* .25 */short result
Inline Assembly Language and IntrinsicsIntrinsic Functions167Targeting MC56F83xx/DSP5685x Controllers RoundingThe intrinsic function of the rounding g
Inline Assembly Language and IntrinsicsIntrinsic Functions168Targeting MC56F83xx/DSP5685x ControllersShiftingThe intrinsic functions of the shifting g
Inline Assembly Language and IntrinsicsIntrinsic Functions169Targeting MC56F83xx/DSP5685x Controllers Exampleshort result;short s1 = 0x1234;short s2 =
Getting StartedCreating a Project17Targeting MC56F83xx/DSP5685x Controllers Figure 2.1 New Dialog Box2. Select DSP56800x New Project Wizard.3. In the
Inline Assembly Language and IntrinsicsIntrinsic Functions170Targeting MC56F83xx/DSP5685x ControllersExampleshort result;short s1 = 0x1234;short s2 =
Inline Assembly Language and IntrinsicsIntrinsic Functions171Targeting MC56F83xx/DSP5685x Controllers Exampleshort result;short s1 = 0x1234;short s2 =
Inline Assembly Language and IntrinsicsIntrinsic Functions172Targeting MC56F83xx/DSP5685x Controllersshr_rArithmetic shift of 16-bit value by a specif
Inline Assembly Language and IntrinsicsIntrinsic Functions173Targeting MC56F83xx/DSP5685x Controllers NOTE Ignores upper N-5 bits of s_shftamount exce
Inline Assembly Language and IntrinsicsIntrinsic Functions174Targeting MC56F83xx/DSP5685x ControllersPrototypeWord32 L_shl(Word32 lval2shft, Word16 s_
Inline Assembly Language and IntrinsicsIntrinsic Functions175Targeting MC56F83xx/DSP5685x Controllers L_shlftsArithmetic left shift of 32-bit value by
Inline Assembly Language and IntrinsicsIntrinsic Functions176Targeting MC56F83xx/DSP5685x ControllersAssumptionsOMR’s SA bit was set to 1 at least 3 c
Inline Assembly Language and IntrinsicsIntrinsic Functions177Targeting MC56F83xx/DSP5685x Controllers Examplelong l1 = 0x41111111;short s2 = 1;long re
Inline Assembly Language and IntrinsicsIntrinsic Functions178Targeting MC56F83xx/DSP5685x ControllersFigure 7.1 Example of a Modulo BufferThe CodeWar
Inline Assembly Language and IntrinsicsIntrinsic Functions179Targeting MC56F83xx/DSP5685x Controllers • __mod_setint16• __mod_error__mod_initInitializ
Getting StartedCreating a Project18Targeting MC56F83xx/DSP5685x ControllersFigure 2.2 DSP56800x New Project Wizard — Target Dialog Box6. Select the t
Inline Assembly Language and IntrinsicsIntrinsic Functions180Targeting MC56F83xx/DSP5685x Controllers__mod_init(0, (void *)&struct_buf[0], 3, size
Inline Assembly Language and IntrinsicsIntrinsic Functions181Targeting MC56F83xx/DSP5685x Controllers __mod_accessRetrieve the modulo pointer. The __m
Inline Assembly Language and IntrinsicsIntrinsic Functions182Targeting MC56F83xx/DSP5685x ControllersPrototypevoid __mod_stop( int <mod_desc );__m
Inline Assembly Language and IntrinsicsIntrinsic Functions183Targeting MC56F83xx/DSP5685x Controllers __mod_setint16( 0, getrandomint(), 0 );__mod_err
Inline Assembly Language and IntrinsicsIntrinsic Functions184Targeting MC56F83xx/DSP5685x Controllers#pragma section DATA_INT_MODULO beginint int_buf[
Inline Assembly Language and IntrinsicsIntrinsic Functions185Targeting MC56F83xx/DSP5685x Controllers Listing 7.12 Modulo Buffer Example 2/* Set up a
Inline Assembly Language and IntrinsicsIntrinsic Functions186Targeting MC56F83xx/DSP5685x Controllersaffects all user function calls, run-time support
Inline Assembly Language and IntrinsicsIntrinsic Functions187Targeting MC56F83xx/DSP5685x Controllers 22 Attempt to use word pointer functions with by
Inline Assembly Language and IntrinsicsIntrinsic Functions188Targeting MC56F83xx/DSP5685x Controllers
189Targeting MC56F83xx/DSP5685x Controllers8Debugging for DSP56800EThis chapter, which explains the generic features of the CodeWarrior™ debugger, con
Getting StartedCreating a Project19Targeting MC56F83xx/DSP5685x Controllers Figure 2.3 DSP56800x New Project Wizard — Program Choice Dialog Box8. Sel
Debugging for DSP56800ECommand Converter Server190Targeting MC56F83xx/DSP5685x ControllersThe M56800E Target panel is unique to DSP56800E debugging. T
Debugging for DSP56800ECommand Converter Server191Targeting MC56F83xx/DSP5685x Controllers Essential Target Settings for Command Converter ServerBefor
Debugging for DSP56800ECommand Converter Server192Targeting MC56F83xx/DSP5685x Controllers1. Click the command converter server icon.While the command
Debugging for DSP56800ECommand Converter Server193Targeting MC56F83xx/DSP5685x Controllers Figure 8.3 Metrowerks Command Converter Server Window3. On
Debugging for DSP56800ECommand Converter Server194Targeting MC56F83xx/DSP5685x ControllersChanging the Command Converter Server Protocol to PCITo chan
Debugging for DSP56800ECommand Converter Server195Targeting MC56F83xx/DSP5685x Controllers Figure 8.4 Remote Connections PanelTo Add a New Remote Con
Debugging for DSP56800ECommand Converter Server196Targeting MC56F83xx/DSP5685x ControllersFigure 8.5 New Connection Window2. In the Name edit box, ty
Debugging for DSP56800ELoad/Save Memory197Targeting MC56F83xx/DSP5685x Controllers 6. Click the OK button.To Change an Existing Remote ConnectionTo ch
Debugging for DSP56800ELoad/Save Memory198Targeting MC56F83xx/DSP5685x ControllersFigure 8.6 Load/Save Memory Dialog BoxUse this dialog box to load a
Debugging for DSP56800ELoad/Save Memory199Targeting MC56F83xx/DSP5685x Controllers Radio ButtonsThe Load/Save Memory dialog box has two radio buttons:
2 Targeting MC56F83xx/DSP5685x ControllersMetrowerks, the Metrowerks logo, and CodeWarrior are trademarks or registered trademarks of Metrowerks Corp.
Getting StartedCreating a Project20Targeting MC56F83xx/DSP5685x ControllersFigure 2.4 DSP56800x New Project Wizard — Finish Dialog Box10. Click Finis
Debugging for DSP56800EFill Memory200Targeting MC56F83xx/DSP5685x ControllersBrowse ButtonClicking the Browse button displays OPENFILENAME or SAVEFILE
Debugging for DSP56800EFill Memory201Targeting MC56F83xx/DSP5685x Controllers NOTE By default, the History combo box displays the most recent settings
Debugging for DSP56800ESave/Restore Registers202Targeting MC56F83xx/DSP5685x ControllersDialog Box ControlsOK, Cancel, and EscClicking OK writes the m
Debugging for DSP56800ESave/Restore Registers203Targeting MC56F83xx/DSP5685x Controllers History Combo BoxThe History combo box displays a list of rec
Debugging for DSP56800EEOnCE Debugger Features204Targeting MC56F83xx/DSP5685x ControllersBrowse ButtonClicking the Browse button displays OPENFILENAME
Debugging for DSP56800EEOnCE Debugger Features205Targeting MC56F83xx/DSP5685x Controllers Figure 8.9 Set Hardware Breakpoint PanelThe Set Hardware Br
Debugging for DSP56800EEOnCE Debugger Features206Targeting MC56F83xx/DSP5685x ControllersFigure 8.10 EOnCE Special Counter PanelThe EOnCE Special Cou
Debugging for DSP56800EEOnCE Debugger Features207Targeting MC56F83xx/DSP5685x Controllers This pull down list lets you set the order in which a trigge
Debugging for DSP56800EEOnCE Debugger Features208Targeting MC56F83xx/DSP5685x Controllers1. From the IDE menu bar, select DSP56800E > Dump Trace Bu
Debugging for DSP56800EEOnCE Debugger Features209Targeting MC56F83xx/DSP5685x Controllers Select this checkbox to capture addresses of interrupt vecto
Getting StartedCreating a Project21Targeting MC56F83xx/DSP5685x Controllers 12. (Optional) Add source files to the project.a. Method 1: From the main-
Debugging for DSP56800EEOnCE Debugger Features210Targeting MC56F83xx/DSP5685x ControllersFigure 8.13 Set Trigger PanelThe Set Trigger panel options a
Debugging for DSP56800EUsing the DSP56800E Simulator211Targeting MC56F83xx/DSP5685x Controllers • Data compare lengthWhen the data trigger (address a
Debugging for DSP56800EUsing the DSP56800E Simulator212Targeting MC56F83xx/DSP5685x Controllerscode on a simulated DSP56800E architecture without inst
Debugging for DSP56800ELaunching and Operating the Debugger213Targeting MC56F83xx/DSP5685x Controllers Memory MapFigure 8.15 Simulator Memory MapNOTE
Debugging for DSP56800ELaunching and Operating the Debugger214Targeting MC56F83xx/DSP5685x Controllers1. Set debugger preferences.Select Edit >sdm
Debugging for DSP56800ELaunching and Operating the Debugger215Targeting MC56F83xx/DSP5685x Controllers This command resets the board (if Always reset
Debugging for DSP56800ELaunching and Operating the Debugger216Targeting MC56F83xx/DSP5685x ControllersFigure 8.17 Program Window5. Navigate through y
Debugging for DSP56800ELaunching and Operating the Debugger217Targeting MC56F83xx/DSP5685x Controllers The toolbar at the top of the window has button
Debugging for DSP56800ELaunching and Operating the Debugger218Targeting MC56F83xx/DSP5685x ControllersNOTE To remove the breakpoint, click the red dot
Debugging for DSP56800ELaunching and Operating the Debugger219Targeting MC56F83xx/DSP5685x Controllers Figure 8.19 General Purpose Registers for DSP5
Getting StartedCreating a Project22Targeting MC56F83xx/DSP5685x Controllers2. Specify a new DSP56800E project named NewProj1.a. If necessary, click th
Debugging for DSP56800ERegister Details Window220Targeting MC56F83xx/DSP5685x ControllersFigure 8.20 General Purpose Registers Window2. Edit register
Debugging for DSP56800ERegister Details Window221Targeting MC56F83xx/DSP5685x Controllers Figure 8.21 Register Details WindowIn the Register Details
Debugging for DSP56800ERegister Details Window222Targeting MC56F83xx/DSP5685x Controllers1. Locate a particular address in program memory.From the men
Debugging for DSP56800ERegister Details Window223Targeting MC56F83xx/DSP5685x Controllers NOTE The other view options (Disassembly, Source and Mixed)
Debugging for DSP56800ERegister Details Window224Targeting MC56F83xx/DSP5685x ControllersFigure 8.23 View P:Memory (Raw Data) Window• Disassembly (Fi
Debugging for DSP56800ERegister Details Window225Targeting MC56F83xx/DSP5685x Controllers Figure 8.25 View P:Memory (Source) Window• Mixed (Figure 8.
Debugging for DSP56800ELoading a .elf File without a Project226Targeting MC56F83xx/DSP5685x ControllersLoading a .elf File without a ProjectYou can lo
Debugging for DSP56800ECommand-Line Debugging227Targeting MC56F83xx/DSP5685x Controllers Command-Line DebuggingIn addition to using the regular CodeWa
Debugging for DSP56800ECommand-Line Debugging228Targeting MC56F83xx/DSP5685x ControllersListing 8.1 Example Tcl Scriptset x 0; while {$x < 5}{puts
Debugging for DSP56800ECommand-Line Debugging229Targeting MC56F83xx/DSP5685x Controllers NOTE There is no synchronization of debug events in the start
Getting StartedCreating a Project23Targeting MC56F83xx/DSP5685x Controllers 4. In the New window, click the OK button. The New Project window (Figure
Debugging for DSP56800ECommand-Line Debugging230Targeting MC56F83xx/DSP5685x ControllersView Debugging Command HintsYou can view debugging command hin
Debugging for DSP56800ECommand-Line Debugging231Targeting MC56F83xx/DSP5685x Controllers Stop an Executing ScriptTo stop a script that is executing, p
Debugging for DSP56800ECommand-Line Debugging232Targeting MC56F83xx/DSP5685x Controllers2. Press Enter or choose Edit > Copy.Paste Text into the Co
Debugging for DSP56800ECommand-Line Debugging233Targeting MC56F83xx/DSP5685x Controllers ExamplesTable 8.3 shows examples of the alias command.Table 8
Debugging for DSP56800ECommand-Line Debugging234Targeting MC56F83xx/DSP5685x ControllersbringtofrontUse the bringtofront debugging command to indicate
Debugging for DSP56800ECommand-Line Debugging235Targeting MC56F83xx/DSP5685x Controllers cdUse the cd debugging command to change to a different direc
Debugging for DSP56800ECommand-Line Debugging236Targeting MC56F83xx/DSP5685x Controllers• A single register• A block of registers• A single memory add
Debugging for DSP56800ECommand-Line Debugging237Targeting MC56F83xx/DSP5685x Controllers • If value is a hexadecimal value, the debugger determines th
Debugging for DSP56800ECommand-Line Debugging238Targeting MC56F83xx/DSP5685x ControllerscloseUse the close debugging command to close the opened defau
Debugging for DSP56800ECommand-Line Debugging239Targeting MC56F83xx/DSP5685x Controllers p[rocessor] processor_name [subprocessor_name] ]text_color ::
Getting StartedCreating a Project24Targeting MC56F83xx/DSP5685x Controllersb. Select (highlight) Simple C. (Figure 2.8 shows this selection.)Figure 2.
Debugging for DSP56800ECommand-Line Debugging240Targeting MC56F83xx/DSP5685x ControllerscopyUse the copy debugging command to copy the contents of a m
Debugging for DSP56800ECommand-Line Debugging241Targeting MC56F83xx/DSP5685x Controllers debugUse the debug command to start a command-line debugging
Debugging for DSP56800ECommand-Line Debugging242Targeting MC56F83xx/DSP5685x ControllersdisassembleUse the disassemble debugging command to disassembl
Debugging for DSP56800ECommand-Line Debugging243Targeting MC56F83xx/DSP5685x Controllers displayUse the display debugging command to:• Display the con
Debugging for DSP56800ECommand-Line Debugging244Targeting MC56F83xx/DSP5685x Controllers64bit]]reg_group ::= a list of register sets separated by spac
Debugging for DSP56800ECommand-Line Debugging245Targeting MC56F83xx/DSP5685x Controllers evaluateUse the evaluate debugging command to display a C var
Debugging for DSP56800ECommand-Line Debugging246Targeting MC56F83xx/DSP5685x ControllersexitUse the exit debugging command to close the command-line d
Debugging for DSP56800ECommand-Line Debugging247Targeting MC56F83xx/DSP5685x Controllers helpUse the help debugging command to display help for the de
Debugging for DSP56800ECommand-Line Debugging248Targeting MC56F83xx/DSP5685x Controllershsst_attach_listenerUse the hsst_attach_listener command to se
Debugging for DSP56800ECommand-Line Debugging249Targeting MC56F83xx/DSP5685x Controllers hsst_block_mode $cidhsst_closeUse the hsst_close debugging co
Getting StartedCreating a Project25Targeting MC56F83xx/DSP5685x Controllers NOTE The IDE has the same functionality whether subordinate windows (such
Debugging for DSP56800ECommand-Line Debugging250Targeting MC56F83xx/DSP5685x ControllersPrototypehsst_l[og] cid [ directory_name ]ExamplesTable 8.19 s
Debugging for DSP56800ECommand-Line Debugging251Targeting MC56F83xx/DSP5685x Controllers Prototypehsst_o[pen] channel_nameExampleOpen a channel and se
Debugging for DSP56800ECommand-Line Debugging252Targeting MC56F83xx/DSP5685x Controllershsst_write 2 0x1234 $cidinputUse the input debugging command t
Debugging for DSP56800ECommand-Line Debugging253Targeting MC56F83xx/DSP5685x Controllers killUse the kill debugging command to close one or all curren
Debugging for DSP56800ECommand-Line Debugging254Targeting MC56F83xx/DSP5685x ControllerslogUse the log debugging command to log either the commands th
Debugging for DSP56800ECommand-Line Debugging255Targeting MC56F83xx/DSP5685x Controllers nextUse the next debugging command to step over subroutine ca
Debugging for DSP56800ECommand-Line Debugging256Targeting MC56F83xx/DSP5685x Controllers•Use -ru to indicate that the output file is an unsigned decim
Debugging for DSP56800ECommand-Line Debugging257Targeting MC56F83xx/DSP5685x Controllers The default input and display radix is 16: hexadecimal input
Debugging for DSP56800ECommand-Line Debugging258Targeting MC56F83xx/DSP5685x ControllersrestartUse the restart debugging command to restart the debugg
Debugging for DSP56800ECommand-Line Debugging259Targeting MC56F83xx/DSP5685x Controllers run test.tclNOTE You can use the run command to run a script
Getting StartedCreating a Project26Targeting MC56F83xx/DSP5685x ControllersFigure 2.10 Project Window (docked)6. This completes project creation. Yo
Debugging for DSP56800ECommand-Line Debugging260Targeting MC56F83xx/DSP5685x Controllers• -a = append to an existing file• -c = write if the file does
Debugging for DSP56800ECommand-Line Debugging261Targeting MC56F83xx/DSP5685x Controllers ExamplesTable 8.27 shows examples of the step command.\stopUs
Debugging for DSP56800ECommand-Line Debugging262Targeting MC56F83xx/DSP5685x ControllersPrototypesw[itchtarget] [index]ExamplesTable 8.29 shows exampl
Debugging for DSP56800ECommand-Line Debugging263Targeting MC56F83xx/DSP5685x Controllers system del *.tmpviewUse the view debugging command to change
Debugging for DSP56800ESystem-Level Connect264Targeting MC56F83xx/DSP5685x ControllerswatchpointUse the watchpoint debugging command to add, remove, o
Debugging for DSP56800EDebugging in the Flash Memory265Targeting MC56F83xx/DSP5685x Controllers NOTE The following procedure explains how to connect i
Debugging for DSP56800EDebugging in the Flash Memory266Targeting MC56F83xx/DSP5685x ControllersThe value for the set_hfmclkd command depends on the fr
Debugging for DSP56800ENotes for Debugging on Hardware267Targeting MC56F83xx/DSP5685x Controllers Size> <progMem> <boot> <interleave
Debugging for DSP56800ENotes for Debugging on Hardware268Targeting MC56F83xx/DSP5685x Controllers• Ensure your Flash data size fits into Flash memory.
269Targeting MC56F83xx/DSP5685x Controllers9High-Speed Simultaneous TransferHigh-Speed Simultaneous Transfer (HSST) facilitates data transfer between
Getting StartedCreating a Project27Targeting MC56F83xx/DSP5685x Controllers b. Method 2: Drag files from the desktop or Windows Explorer to the projec
High-Speed Simultaneous TransferHost-Side Client Interface270Targeting MC56F83xx/DSP5685x ControllersPrototypeHRESULT hsst_open ( const char* channel_
High-Speed Simultaneous TransferHost-Side Client Interface271Targeting MC56F83xx/DSP5685x Controllers hsst_readA host-side client application uses thi
High-Speed Simultaneous TransferHost-Side Client Interface272Targeting MC56F83xx/DSP5685x Controllershsst_writeA host-side client application uses thi
High-Speed Simultaneous TransferHost-Side Client Interface273Targeting MC56F83xx/DSP5685x Controllers hsst_sizeA host-side client application uses thi
High-Speed Simultaneous TransferHost-Side Client Interface274Targeting MC56F83xx/DSP5685x ControllersReturnsS_OK if the call succeeds or S_FALSE if th
High-Speed Simultaneous TransferHost-Side Client Interface275Targeting MC56F83xx/DSP5685x Controllers PrototypeHRESULT hsst_attach_listener ( size_t c
High-Speed Simultaneous TransferHost-Side Client Interface276Targeting MC56F83xx/DSP5685x Controllershsst_set_log_dirA host-side client application us
High-Speed Simultaneous TransferHost-Side Client Interface277Targeting MC56F83xx/DSP5685x Controllers NOTE Before launching the program, the IDE plugi
High-Speed Simultaneous TransferTarget Library Interface278Targeting MC56F83xx/DSP5685x Controllersreturn 0;}Target Library InterfaceThis section desc
High-Speed Simultaneous TransferTarget Library Interface279Targeting MC56F83xx/DSP5685x Controllers Prototypeint HSST_close ( HSST_STREAM *stream )
Getting StartedCreating a Project28Targeting MC56F83xx/DSP5685x Controllers
High-Speed Simultaneous TransferTarget Library Interface280Targeting MC56F83xx/DSP5685x ControllersbufPasses a pointer to an external buffer.modePasse
High-Speed Simultaneous TransferTarget Library Interface281Targeting MC56F83xx/DSP5685x Controllers nmembPasses the number of data elements to write.s
High-Speed Simultaneous TransferTarget Library Interface282Targeting MC56F83xx/DSP5685x ControllersHSST_flushA target application uses this function t
High-Speed Simultaneous TransferTarget Library Interface283Targeting MC56F83xx/DSP5685x Controllers HSST_raw_readA target application uses this functi
High-Speed Simultaneous TransferTarget Library Interface284Targeting MC56F83xx/DSP5685x ControllersPrototypesize_t HSST_raw_write ( void *ptr, size
High-Speed Simultaneous TransferTarget Library Interface285Targeting MC56F83xx/DSP5685x Controllers ParametersstreamPasses a pointer to the communicat
High-Speed Simultaneous TransferTarget Library Interface286Targeting MC56F83xx/DSP5685x Controllers/* Opening channel 1 and 2 from TARGET side */chann
287Targeting MC56F83xx/DSP5685x Controllers10ELF Linker and Command LanguageThe CodeWarrior™ Executable and Linking Format (ELF) Linker makes a progra
ELF Linker and Command LanguageStructure of Linker Command Files288Targeting MC56F83xx/DSP5685x ControllersMemory SegmentIn the memory segment, availa
ELF Linker and Command LanguageStructure of Linker Command Files289Targeting MC56F83xx/DSP5685x Controllers NOTE The closure blocks need to be in plac
29Targeting MC56F83xx/DSP5685x Controllers3Development Studio OverviewThis chapter describes the CodeWarrior™ IDE and explains application development
ELF Linker and Command LanguageLinker Command File Syntax290Targeting MC56F83xx/DSP5685x ControllersListing 10.5 Sample SECTIONS SegmentSECTIONS {.se
ELF Linker and Command LanguageLinker Command File Syntax291Targeting MC56F83xx/DSP5685x Controllers Listing 10.7 Sample ALIGNALL Command Usagefile.c
ELF Linker and Command LanguageLinker Command File Syntax292Targeting MC56F83xx/DSP5685x ControllersDeadstrip PreventionThe M56800E linker removes unu
ELF Linker and Command LanguageLinker Command File Syntax293Targeting MC56F83xx/DSP5685x Controllers Listing 10.11 Accessing a Global Symbol From C P
ELF Linker and Command LanguageLinker Command File Syntax294Targeting MC56F83xx/DSP5685x ControllersDecimal integers are specified as a non-zero numer
ELF Linker and Command LanguageLinker Command File Syntax295Targeting MC56F83xx/DSP5685x Controllers Listing 10.16 Sample Function Selection Using OB
ELF Linker and Command LanguageLinker Command File Syntax296Targeting MC56F83xx/DSP5685x Controllers.main_application :{# .text sections*(.text)*(.rtl
ELF Linker and Command LanguageLinker Command File Syntax297Targeting MC56F83xx/DSP5685x Controllers unsigned short a = 0, b = 0, c = 0;unsigned long
ELF Linker and Command LanguageLinker Command File Keyword Listing298Targeting MC56F83xx/DSP5685x ControllersWRITEB 0x21; // '!'} Linker Co
ELF Linker and Command LanguageLinker Command File Keyword Listing299Targeting MC56F83xx/DSP5685x Controllers Example.data :{*(.data)*(.bss)FSTART_ =
Table of Contents3Targeting MC56F83xx/DSP5685x Controllers Table of Contents1 Introduction 9CodeWarrior IDE . . . . . . . . . . .
Development Studio OverviewDevelopment Process30Targeting MC56F83xx/DSP5685x Controllers• CodeWarrior Compiler for DSP56800E — an ANSI-compliant C com
ELF Linker and Command LanguageLinker Command File Keyword Listing300Targeting MC56F83xx/DSP5685x ControllersNOTE In order to use segmentName with thi
ELF Linker and Command LanguageLinker Command File Keyword Listing301Targeting MC56F83xx/DSP5685x Controllers Example.code :{ALIGNALL(16); // Align co
ELF Linker and Command LanguageLinker Command File Keyword Listing302Targeting MC56F83xx/DSP5685x ControllersKEEP_SECTIONThe KEEP_SECTION directive al
ELF Linker and Command LanguageLinker Command File Keyword Listing303Targeting MC56F83xx/DSP5685x Controllers Examplememory{code (RWX) : ORIGIN = 0x80
ELF Linker and Command LanguageLinker Command File Keyword Listing304Targeting MC56F83xx/DSP5685x ControllersOBJECTThe OBJECT keyword allows control o
ELF Linker and Command LanguageLinker Command File Keyword Listing305Targeting MC56F83xx/DSP5685x Controllers sectionName is the section name for the
ELF Linker and Command LanguageLinker Command File Keyword Listing306Targeting MC56F83xx/DSP5685x ControllersExampleSECTIONS {.text : { F_textSegmentS
ELF Linker and Command LanguageLinker Command File Keyword Listing307Targeting MC56F83xx/DSP5685x Controllers SIZEOFWThe SIZEOFW function returns the
ELF Linker and Command LanguageDSP56800E Command-Line Tools308Targeting MC56F83xx/DSP5685x ControllersWRITEWThe WRITEW command inserts 4 bytes of data
ELF Linker and Command LanguageDSP56800E Command-Line Tools309Targeting MC56F83xx/DSP5685x Controllers Also, available are environment variables. Thes
Development Studio OverviewDevelopment Process31Targeting MC56F83xx/DSP5685x Controllers Figure 3.1 CodeWarrior IDE Application DevelopmentCompile Pr
ELF Linker and Command LanguageDSP56800E Command-Line Tools310Targeting MC56F83xx/DSP5685x ControllersSample Build ScriptThis following is a sample of
ELF Linker and Command LanguageDSP56800E Command-Line Tools311Targeting MC56F83xx/DSP5685x Controllers # display helpusage # show usage information[no
ELF Linker and Command LanguageDSP56800E Command-Line Tools312Targeting MC56F83xx/DSP5685x Controllers# zero means no maximum; default is 0-msgstyle k
ELF Linker and Command LanguageDSP56800E Command-Line Tools313Targeting MC56F83xx/DSP5685x Controllers -dis[assemble] # global; passed to all tools;#
ELF Linker and Command LanguageDSP56800E Command-Line Tools314Targeting MC56F83xx/DSP5685x Controllers# filename extension-nosyspath # global; treat #
ELF Linker and Command LanguageDSP56800E Command-Line Tools315Targeting MC56F83xx/DSP5685x Controllers -char keyword # set sign of 'char'sig
ELF Linker and Command LanguageDSP56800E Command-Line Tools316Targeting MC56F83xx/DSP5685x Controllers# allowing extra commas,# ignoring casts to the
ELF Linker and Command LanguageDSP56800E Command-Line Tools317Targeting MC56F83xx/DSP5685x Controllers -O # same as '-O2'-O+keyword[,...] #
ELF Linker and Command LanguageDSP56800E Command-Line Tools318Targeting MC56F83xx/DSP5685x Controllersdisplay|dump # display complete list of active#
ELF Linker and Command LanguageDSP56800E Command-Line Tools319Targeting MC56F83xx/DSP5685x Controllers [no]err[or] | # passed to all tools;[no]iserr[o
Development Studio OverviewDevelopment Process32Targeting MC56F83xx/DSP5685x ControllersProject FilesA CodeWarrior project consists of source-code, li
ELF Linker and Command LanguageDSP56800E Command-Line Tools320Targeting MC56F83xx/DSP5685x Controllers# search paths have global scope over the# comma
ELF Linker and Command LanguageDSP56800E Command-Line Tools321Targeting MC56F83xx/DSP5685x Controllers unix # Unix ('\n')#
ELF Linker and Command LanguageDSP56800E Command-Line Tools322Targeting MC56F83xx/DSP5685x Controllers------------------------------------------------
ELF Linker and Command LanguageDSP56800E Command-Line Tools323Targeting MC56F83xx/DSP5685x Controllers # default#Assembler----------------------------
ELF Linker and Command LanguageDSP56800E Command-Line Tools324Targeting MC56F83xx/DSP5685x Controllers
325Targeting MC56F83xx/DSP5685x Controllers11Libraries and Runtime CodeYou can use a variety of libraries with the CodeWarrior™ IDE. The libraries inc
Libraries and Runtime CodeMSL for DSP56800E326Targeting MC56F83xx/DSP5685x ControllersCodeWarrior\M56800E Support\msl\MSL_C\DSP_56800E\projects\MSL C
Libraries and Runtime CodeMSL for DSP56800E327Targeting MC56F83xx/DSP5685x Controllers NOTE DSP56800E stationery creates new projects with LDM and SDM
Libraries and Runtime CodeMSL for DSP56800E328Targeting MC56F83xx/DSP5685x ControllersAllocating Stacks and Heaps for the DSP56800EStationery linker c
Libraries and Runtime CodeRuntime Initialization329Targeting MC56F83xx/DSP5685x Controllers DefinitionsStackThe stack is a last-in-first-out (LIFO) da
Development Studio OverviewDevelopment Process33Targeting MC56F83xx/DSP5685x Controllers A CodeWarrior project is analogous to a collection of makefil
Libraries and Runtime CodeRuntime Initialization330Targeting MC56F83xx/DSP5685x ControllersThe starting point for a program is set in the Entry Point
Libraries and Runtime CodeRuntime Initialization331Targeting MC56F83xx/DSP5685x Controllers section rtlibXREF F_stack_addrorg p:GLOBAL Finit_M56852_SU
Libraries and Runtime CodeEOnCE Library332Targeting MC56F83xx/DSP5685x Controllersnoinc:tfra r0,sp ; set stack pointer toomove.w #0,r1nopmove.w r1,x:(
Libraries and Runtime CodeEOnCE Library333Targeting MC56F83xx/DSP5685x Controllers To use the EOnCE library, you must include it in your project. The
Libraries and Runtime CodeEOnCE Library334Targeting MC56F83xx/DSP5685x Controllers• Trace Buffer Capture Options• Trace Buffer Full Options• Miscellan
Libraries and Runtime CodeEOnCE Library335Targeting MC56F83xx/DSP5685x Controllers _eonce_SetTriggerSets a trigger condition used to halt the processo
Libraries and Runtime CodeEOnCE Library336Targeting MC56F83xx/DSP5685x ControllersReturnsError code as defined in the sub-section “Definitions.”_eonce
Libraries and Runtime CodeEOnCE Library337Targeting MC56F83xx/DSP5685x Controllers counter2unsigned longSpecifies the value used to pre-load the count
Libraries and Runtime CodeEOnCE Library338Targeting MC56F83xx/DSP5685x Controllers_eonce_GetCountersRetrieves the values in the two counter registers.
Libraries and Runtime CodeEOnCE Library339Targeting MC56F83xx/DSP5685x Controllers *counterIsStopped )ParameterscounterIsZero char *Returns a 1 if th
Development Studio OverviewDevelopment Process34Targeting MC56F83xx/DSP5685x ControllersNOTE Figure 3.3 shows a floating editor window. Alternatively,
Libraries and Runtime CodeEOnCE Library340Targeting MC56F83xx/DSP5685x Controllers_eonce_GetTraceBufferRetrieves the contents of the trace buffer.Prot
Libraries and Runtime CodeEOnCE Library341Targeting MC56F83xx/DSP5685x Controllers ParametersNone.RemarksThis function clears the trace buffer and is
Libraries and Runtime CodeEOnCE Library342Targeting MC56F83xx/DSP5685x ControllersParametersNone.RemarksCauses the trace buffer to immediately stop ca
Libraries and Runtime CodeEOnCE Library343Targeting MC56F83xx/DSP5685x Controllers Prototypeint _eonce_EnableLimitTrigger( char enable )Parametersenab
Libraries and Runtime CodeEOnCE Library344Targeting MC56F83xx/DSP5685x ControllersReturn CodesEvery function except _eonce_Initialize returns one of t
Libraries and Runtime CodeEOnCE Library345Targeting MC56F83xx/DSP5685x Controllers B1PA_THEN_B2PF_NB2PF_N_THEN_B1PAB2PF_THEN_B1PA_NB1XA_N_THEN_B2PFB1X
Libraries and Runtime CodeEOnCE Library346Targeting MC56F83xx/DSP5685x ControllersCounter Trigger ModesThe following triggers generate a Counter Stop
Libraries and Runtime CodeEOnCE Library347Targeting MC56F83xx/DSP5685x Controllers B1PA_SC_B2PF_HCB2PF_SC_B1PA_HCData Selection ModesIf the trigger mo
Libraries and Runtime CodeEOnCE Library348Targeting MC56F83xx/DSP5685x ControllersCounter Function ModesOne of the defined identifiers in Table 11.8 m
Libraries and Runtime CodeEOnCE Library349Targeting MC56F83xx/DSP5685x Controllers Counter Unit Action OptionsThis list of options describes the actio
Development Studio OverviewDevelopment Process35Targeting MC56F83xx/DSP5685x Controllers Figure 3.4 CodeWarrior Build SystemThis architecture means t
Libraries and Runtime CodeEOnCE Library350Targeting MC56F83xx/DSP5685x ControllersOne of the defined identifiers in Table 11.12 must be OR’ed into the
Libraries and Runtime CodeEOnCE Library351Targeting MC56F83xx/DSP5685x Controllers Trace Buffer Capture OptionsThe options in Table 11.14 determine wh
Libraries and Runtime CodeEOnCE Library352Targeting MC56F83xx/DSP5685x ControllersTrace Buffer Full OptionsThe options in Table 11.15 describe what ac
353Targeting MC56F83xx/DSP5685x ControllersAPorting IssuesThis appendix explains issues relating to successfully porting code to the most current vers
Porting IssuesRemoving "illegal object_c on pragma directive" Warning354Targeting MC56F83xx/DSP5685x ControllersRemoving "illegal objec
355Targeting MC56F83xx/DSP5685x ControllersBDSP56800x New Project Stationery Wizard This appendix explains the high-level design of the new project s
DSP56800x New Project Stationery WizardHigh-Level Design356Targeting MC56F83xx/DSP5685x Controllers• Resulting Target Rules• Rule NotesClick on the fo
DSP56800x New Project Stationery WizardHigh-Level Design357Targeting MC56F83xx/DSP5685x Controllers Page RulesThe page rules governing the wizard page
DSP56800x New Project Stationery WizardHigh-Level Design358Targeting MC56F83xx/DSP5685x ControllersTable B.4 Page Rules for the DSP56852, DSP56853, D
DSP56800x New Project Stationery WizardHigh-Level Design359Targeting MC56F83xx/DSP5685x Controllers Resulting Target RulesThe rules governing possible
Development Studio OverviewDevelopment Process36Targeting MC56F83xx/DSP5685x ControllersThe IDE uses linker command files to control the linker, so yo
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface360Targeting MC56F83xx/DSP5685x ControllersRule
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface361Targeting MC56F83xx/DSP5685x Controllers Inv
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface362Targeting MC56F83xx/DSP5685x ControllersNew
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface363Targeting MC56F83xx/DSP5685x Controllers Tar
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface364Targeting MC56F83xx/DSP5685x ControllersFigu
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface365Targeting MC56F83xx/DSP5685x Controllers Fig
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface366Targeting MC56F83xx/DSP5685x ControllersFigu
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface367Targeting MC56F83xx/DSP5685x Controllers NOT
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface368Targeting MC56F83xx/DSP5685x ControllersFigu
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface369Targeting MC56F83xx/DSP5685x Controllers Dat
37Targeting MC56F83xx/DSP5685x Controllers4Target SettingsEach build target in a CodeWarrior™ project has its own settings. This chapter explains the
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface370Targeting MC56F83xx/DSP5685x ControllersExte
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface371Targeting MC56F83xx/DSP5685x Controllers Fin
DSP56800x New Project Stationery WizardDSP56800x New Project Stationery Wizard Graphical User Interface372Targeting MC56F83xx/DSP5685x Controllers
373Targeting MC56F83xx/DSP5685x ControllersCPragmas for the DSP56800 and DSP56800E You can configure the compiler globally for a project by changing t
Pragmas for the DSP56800 and DSP56800EPragma Scope374Targeting MC56F83xx/DSP5685x Controllers#include <smallfuncs.h>#pragma profile reset // If
Pragmas for the DSP56800 and DSP56800EPragma Reference375Targeting MC56F83xx/DSP5685x Controllers Pragma ReferenceClick any of the links in Table C.1
Pragmas for the DSP56800 and DSP56800EPragma Reference376Targeting MC56F83xx/DSP5685x Controllersalways_inlineControls the use of inlined functions.Pr
Pragmas for the DSP56800 and DSP56800EPragma Reference377Targeting MC56F83xx/DSP5685x Controllers Listing C.2 Unnamed Argumentsvoid f(int ) {} /* OK
Pragmas for the DSP56800 and DSP56800EPragma Reference378Targeting MC56F83xx/DSP5685x ControllersRemarksFor each file that has assembly output activat
Pragmas for the DSP56800 and DSP56800EPragma Reference379Targeting MC56F83xx/DSP5685x Controllers RemarksUse this pragma for extra validation of gener
Target SettingsTarget Settings Overview38Targeting MC56F83xx/DSP5685x Controllers• Links identify the panels specific to DSP56800E projects. Click the
Pragmas for the DSP56800 and DSP56800EPragma Reference380Targeting MC56F83xx/DSP5685x Controllersconst_stringsControls the const-ness of string litera
Pragmas for the DSP56800 and DSP56800EPragma Reference381Targeting MC56F83xx/DSP5685x Controllers extern void f();extern void g();main(){f(); // will
Pragmas for the DSP56800 and DSP56800EPragma Reference382Targeting MC56F83xx/DSP5685x Controllers<istring>Section name string for initialized da
Pragmas for the DSP56800 and DSP56800EPragma Reference383Targeting MC56F83xx/DSP5685x Controllers Prototype#pragma dollar_identifiers on | off | reset
Pragmas for the DSP56800 and DSP56800EPragma Reference384Targeting MC56F83xx/DSP5685x ControllersPrototype#pragma dont_reuse_strings on | off | resetR
Pragmas for the DSP56800 and DSP56800EPragma Reference385Targeting MC56F83xx/DSP5685x Controllers Listing C.7 Example of Enumerations the Same as Siz
Pragmas for the DSP56800 and DSP56800EPragma Reference386Targeting MC56F83xx/DSP5685x ControllersNOTE The pragmas explicit_zero_data and initializedze
Pragmas for the DSP56800 and DSP56800EPragma Reference387Targeting MC56F83xx/DSP5685x Controllers gcc_extensionsControls the acceptance of GNU C langu
Pragmas for the DSP56800 and DSP56800EPragma Reference388Targeting MC56F83xx/DSP5685x ControllersThis pragma does not correspond to any setting in the
Pragmas for the DSP56800 and DSP56800EPragma Reference389Targeting MC56F83xx/DSP5685x Controllers RemarksBottom-up function inlining tries to expand u
Target SettingsTarget Settings Overview39Targeting MC56F83xx/DSP5685x Controllers Changing Target SettingsTo change target settings:1. Select Edit >
Pragmas for the DSP56800 and DSP56800EPragma Reference390Targeting MC56F83xx/DSP5685x ControllersPrototype#pragma inline_depth(n)#pragma inline_depth(
Pragmas for the DSP56800 and DSP56800EPragma Reference391Targeting MC56F83xx/DSP5685x Controllers Prototype#pragma interrupt [called|warn|saveall[warn
Pragmas for the DSP56800 and DSP56800EPragma Reference392Targeting MC56F83xx/DSP5685x Controllers– You can use this argument on the function prototype
Pragmas for the DSP56800 and DSP56800EPragma Reference393Targeting MC56F83xx/DSP5685x Controllers In Table C.2, the advantages and disadvantages of th
Pragmas for the DSP56800 and DSP56800EPragma Reference394Targeting MC56F83xx/DSP5685x Controllers• Emit an RTI for the return statement depending upon
Pragmas for the DSP56800 and DSP56800EPragma Reference395Targeting MC56F83xx/DSP5685x Controllers Listing C.12 Sample Code - #pragma interrupt on | o
Pragmas for the DSP56800 and DSP56800EPragma Reference396Targeting MC56F83xx/DSP5685x ControllersData1+=Data2;return;}void ISR1(void){/* This is an in
Pragmas for the DSP56800 and DSP56800EPragma Reference397Targeting MC56F83xx/DSP5685x Controllers line_prepdumpShows #line directives in preprocessor
Pragmas for the DSP56800 and DSP56800EPragma Reference398Targeting MC56F83xx/DSP5685x ControllersmessageIssues a text message to the user.Prototype#pr
Pragmas for the DSP56800 and DSP56800EPragma Reference399Targeting MC56F83xx/DSP5685x Controllers This pragma corresponds to the Map newlines to CR se
Table of Contents4Targeting MC56F83xx/DSP5685x ControllersC/C++ Preprocessor . . . . . . . . . . . . . . . . . .
Target SettingsTarget Settings Overview40Targeting MC56F83xx/DSP5685x ControllersFigure 4.1 Target Settings WindowThe left side of the Target Setting
Pragmas for the DSP56800 and DSP56800EPragma Reference400Targeting MC56F83xx/DSP5685x ControllersPrototype#pragma notonceRemarksIf you enable this pra
Pragmas for the DSP56800 and DSP56800EPragma Reference401Targeting MC56F83xx/DSP5685x Controllers Prototype#pragma only_std_keywords on | off | resetR
Pragmas for the DSP56800 and DSP56800EPragma Reference402Targeting MC56F83xx/DSP5685x Controllersopt_dead_assignmentsControls the use of dead store op
Pragmas for the DSP56800 and DSP56800EPragma Reference403Targeting MC56F83xx/DSP5685x Controllers Prototype#pragma opt_lifetimes on | off | resetRemar
Pragmas for the DSP56800 and DSP56800EPragma Reference404Targeting MC56F83xx/DSP5685x ControllersRemarksIf you enable this pragma, the compiler replac
Pragmas for the DSP56800 and DSP56800EPragma Reference405Targeting MC56F83xx/DSP5685x Controllers that the optimization is only applied when the array
Pragmas for the DSP56800 and DSP56800EPragma Reference406Targeting MC56F83xx/DSP5685x ControllersFor more information on the optimization the compiler
Pragmas for the DSP56800 and DSP56800EPragma Reference407Targeting MC56F83xx/DSP5685x Controllers RemarksIf you enable this pragma, integer longs wit
Pragmas for the DSP56800 and DSP56800EPragma Reference408Targeting MC56F83xx/DSP5685x ControllersRemarksIf you enable this setting, the compiler colle
Pragmas for the DSP56800 and DSP56800EPragma Reference409Targeting MC56F83xx/DSP5685x Controllers If you are writing new code and need to set a pragma
Target SettingsTarget Settings Overview41Targeting MC56F83xx/DSP5685x Controllers Exporting and Importing Panel Options to XML FilesThe CodeWarrior ID
Pragmas for the DSP56800 and DSP56800EPragma Reference410Targeting MC56F83xx/DSP5685x ControllersIf you enable this pragma, the compiler generates an
Pragmas for the DSP56800 and DSP56800EPragma Reference411Targeting MC56F83xx/DSP5685x Controllers <sectname>Identifier by which this user-define
Pragmas for the DSP56800 and DSP56800EPragma Reference412Targeting MC56F83xx/DSP5685x ControllersRemarksBy default, the preprocessor adds comments abo
Pragmas for the DSP56800 and DSP56800EPragma Reference413Targeting MC56F83xx/DSP5685x Controllers RemarksIf you enable this pragma, the compiler does
Pragmas for the DSP56800 and DSP56800EPragma Reference414Targeting MC56F83xx/DSP5685x ControllersNOTE If you enable this pragma, your code might not b
Pragmas for the DSP56800 and DSP56800EPragma Reference415Targeting MC56F83xx/DSP5685x Controllers use_rodataControls the section where constant data i
Pragmas for the DSP56800 and DSP56800EPragma Reference416Targeting MC56F83xx/DSP5685x Controllers#pragma use_rodata onconst Int16 d[]={0xdddd};const I
Pragmas for the DSP56800 and DSP56800EPragma Reference417Targeting MC56F83xx/DSP5685x Controllers warn_any_ptr_int_convControls if the compiler genera
Pragmas for the DSP56800 and DSP56800EPragma Reference418Targeting MC56F83xx/DSP5685x Controllerswarn_emptydeclControls the recognition of declaration
Pragmas for the DSP56800 and DSP56800EPragma Reference419Targeting MC56F83xx/DSP5685x Controllers This pragma corresponds to the Extra Commas setting
Target SettingsCodeWarrior IDE Target Settings Panels42Targeting MC56F83xx/DSP5685x ControllersCodeWarrior IDE Target Settings PanelsTable 4.2 lists a
Pragmas for the DSP56800 and DSP56800EPragma Reference420Targeting MC56F83xx/DSP5685x ControllersPrototype#pragma warn_filenamecaps_system on | off |
Pragmas for the DSP56800 and DSP56800EPragma Reference421Targeting MC56F83xx/DSP5685x Controllers warn_impl_f2i_convControls the issuing of warnings f
Pragmas for the DSP56800 and DSP56800EPragma Reference422Targeting MC56F83xx/DSP5685x ControllersPrototype#pragma warn_impl_i2f_conv on | off | resetR
Pragmas for the DSP56800 and DSP56800EPragma Reference423Targeting MC56F83xx/DSP5685x Controllers RemarksIf you enable this pragma, the compiler issue
Pragmas for the DSP56800 and DSP56800EPragma Reference424Targeting MC56F83xx/DSP5685x ControllersRemarksIf you enable this pragma, the compiler issues
Pragmas for the DSP56800 and DSP56800EPragma Reference425Targeting MC56F83xx/DSP5685x Controllers RemarksIf you enable this pragma, the compiler issue
Pragmas for the DSP56800 and DSP56800EPragma Reference426Targeting MC56F83xx/DSP5685x Controllerswarn_no_side_effectControls the issuing of warnings f
Pragmas for the DSP56800 and DSP56800EPragma Reference427Targeting MC56F83xx/DSP5685x Controllers This pragma corresponds to the Non-Inlined Functions
Pragmas for the DSP56800 and DSP56800EPragma Reference428Targeting MC56F83xx/DSP5685x ControllersThis pragma corresponds to the Pad Bytes Added settin
Pragmas for the DSP56800 and DSP56800EPragma Reference429Targeting MC56F83xx/DSP5685x Controllers Listing C.29 Example for #pragma warn_ptr_int_conv#
Target SettingsDSP56800E-Specific Target Settings Panels43Targeting MC56F83xx/DSP5685x Controllers DSP56800E-Specific Target Settings PanelsThe rest o
Pragmas for the DSP56800 and DSP56800EPragma Reference430Targeting MC56F83xx/DSP5685x Controllerswarn_undefmacroControls the detection of undefined ma
Pragmas for the DSP56800 and DSP56800EPragma Reference431Targeting MC56F83xx/DSP5685x Controllers RemarksIf you enable this pragma, the compiler issue
Pragmas for the DSP56800 and DSP56800EIllegal Pragmas432Targeting MC56F83xx/DSP5685x ControllersThis pragma corresponds to the Treat All Warnings as E
Pragmas for the DSP56800 and DSP56800EChecking Settings433Targeting MC56F83xx/DSP5685x Controllers #endif lists all the setting names you can use in t
Pragmas for the DSP56800 and DSP56800EChecking Settings434Targeting MC56F83xx/DSP5685x Controllersonly_std_keywordsANSI Keywords Only setting in the C
Pragmas for the DSP56800 and DSP56800EChecking Settings435Targeting MC56F83xx/DSP5685x Controllers trigraphsExpand Trigraphs setting in the C/C++ Lang
Pragmas for the DSP56800 and DSP56800EChecking Settings436Targeting MC56F83xx/DSP5685x Controllerswarn_ptr_int_conv Pragma warn_ptr_int_convwarn_resul
TMP–437Targeting MC56F83xx/DSP5685x ControllersIndexSymbols#include directivegetting path 386#line directive 397#pragma statementillegal 432syntax 373
TMP–438 Targeting MC56F83xx/DSP5685x Controllersconfig 238–240copy 240debug 241dir 241, 242disassemble 242, 243display 243–245evaluate 245exit 246go 2
TMP–439Targeting MC56F83xx/DSP5685x Controllers Don’t Inline option 433dont_inline pragma 383dont_reuse_strings pragma 384DSP56800E command line tools
Target SettingsDSP56800E-Specific Target Settings Panels44Targeting MC56F83xx/DSP5685x ControllersM56800E TargetUse the M56800E Target panel (Figure 4
TMP–440 Targeting MC56F83xx/DSP5685x Controllershsst_block_mode 273, 274HSST_close 278, 279hsst_close 270hsst_detach_listener 275HSST_flush 282hsst_no
TMP–441Targeting MC56F83xx/DSP5685x Controllers div_s4q 156extract_h 153extract_l 153, 154ffs_l 165, 166ffs_s 164fractional arithmetic 142, 143impleme
TMP–442 Targeting MC56F83xx/DSP5685x Controllerslog debugging command 254ls debugging command 241, 242MM5600E target panel 44, 45M56800E assembler pan
TMP–443Targeting MC56F83xx/DSP5685x Controllers section 410syntax 373#pragma statementsyntax 373pragmasasmoutput 377check_inline_asm_pipeline 378, 379
TMP–444 Targeting MC56F83xx/DSP5685x ControllersshlftNs intrinsic function 169, 170shlfts intrinsic function 170, 171shr intrinsic function 171shr_r i
TMP–445Targeting MC56F83xx/DSP5685x Controllers warn_unusedarg pragma 430warn_unusedvar pragma 431warning_errors pragma 431warningsillegal pragmas 432
TMP–446 Targeting MC56F83xx/DSP5685x Controllers
Target SettingsDSP56800E-Specific Target Settings Panels45Targeting MC56F83xx/DSP5685x Controllers NOTE Be sure to name libraries with the extension .
Target SettingsDSP56800E-Specific Target Settings Panels46Targeting MC56F83xx/DSP5685x ControllersNOTE Always disable these options, which do not appl
Target SettingsDSP56800E-Specific Target Settings Panels47Targeting MC56F83xx/DSP5685x Controllers ANSI Strict checkboxChecked — Disables CodeWarrior
Target SettingsDSP56800E-Specific Target Settings Panels48Targeting MC56F83xx/DSP5685x ControllersC/C++ PreprocessorThe C/C++ Preprocessor (Figure 4.5
Target SettingsDSP56800E-Specific Target Settings Panels49Targeting MC56F83xx/DSP5685x Controllers Figure 4.5 The C/C++ Preprocessor PanelTable 4.6 p
Table of Contents5Targeting MC56F83xx/DSP5685x Controllers User Stack Allocation . . . . . . . . . . . . . . . . .
Target SettingsDSP56800E-Specific Target Settings Panels50Targeting MC56F83xx/DSP5685x ControllersC/C++ WarningsUse the C/C++ Warnings panel (Figure 4
Target SettingsDSP56800E-Specific Target Settings Panels51Targeting MC56F83xx/DSP5685x Controllers Figure 4.6 C/C++ Warnings PanelTable 4.7 C/C++ Wa
Target SettingsDSP56800E-Specific Target Settings Panels52Targeting MC56F83xx/DSP5685x ControllersExtended Error Checking checkboxChecked — Compiler i
Target SettingsDSP56800E-Specific Target Settings Panels53Targeting MC56F83xx/DSP5685x Controllers Missing ‘return’ StatementsChecked — Compiler check
Target SettingsDSP56800E-Specific Target Settings Panels54Targeting MC56F83xx/DSP5685x ControllersM56800E AssemblerUse the M56800E Assembler panel (Fi
Target SettingsDSP56800E-Specific Target Settings Panels55Targeting MC56F83xx/DSP5685x Controllers Table 4.8 M56800E Assembler Panel ElementsElement
Target SettingsDSP56800E-Specific Target Settings Panels56Targeting MC56F83xx/DSP5685x ControllersM56800E ProcessorUse the M56800E Processor panel (Fi
Target SettingsDSP56800E-Specific Target Settings Panels57Targeting MC56F83xx/DSP5685x Controllers Table 4.9 M56800E Processor Panel ElementsElement
Target SettingsDSP56800E-Specific Target Settings Panels58Targeting MC56F83xx/DSP5685x ControllersThe compiler generates hardware DO loops for two sit
Target SettingsDSP56800E-Specific Target Settings Panels59Targeting MC56F83xx/DSP5685x Controllers 2. Counted loops in C, provided that the loop count
Table of Contents6Targeting MC56F83xx/DSP5685x ControllersFill Memory . . . . . . . . . . . . . . . . . . . .
Target SettingsDSP56800E-Specific Target Settings Panels60Targeting MC56F83xx/DSP5685x ControllersTable 4.10 ELF Disassembler Panel ElementsElement P
Target SettingsDSP56800E-Specific Target Settings Panels61Targeting MC56F83xx/DSP5685x Controllers M56800E LinkerUse the M56800E Linker panel (Figure
Target SettingsDSP56800E-Specific Target Settings Panels62Targeting MC56F83xx/DSP5685x ControllersFigure 4.10 M56800E Linker PanelTable 4.11 M56800E
Target SettingsDSP56800E-Specific Target Settings Panels63Targeting MC56F83xx/DSP5685x Controllers List Unused Objects checkboxChecked — Linker includ
Target SettingsDSP56800E-Specific Target Settings Panels64Targeting MC56F83xx/DSP5685x ControllersCheck the Show Transitive Closure checkbox to have t
Target SettingsDSP56800E-Specific Target Settings Panels65Targeting MC56F83xx/DSP5685x Controllers Listing 4.2 Link Map File: List of main( ) referen
Target SettingsDSP56800E-Specific Target Settings Panels66Targeting MC56F83xx/DSP5685x ControllersRemote DebuggingUse the Remote Debugging panel (Figu
Target SettingsDSP56800E-Specific Target Settings Panels67Targeting MC56F83xx/DSP5685x Controllers M56800E Target (Debugging)Use the debugging M56800E
Target SettingsDSP56800E-Specific Target Settings Panels68Targeting MC56F83xx/DSP5685x ControllersIf you click the Yes button, the previous breakpoint
Target SettingsDSP56800E-Specific Target Settings Panels69Targeting MC56F83xx/DSP5685x Controllers An initialization file consists of text instruction
Table of Contents7Targeting MC56F83xx/DSP5685x Controllers 10 ELF Linker and Command Language 287Structure of Linker Command Files . . . . .
Target SettingsDSP56800E-Specific Target Settings Panels70Targeting MC56F83xx/DSP5685x Controllers1. In the debugging M56800E Target panel, check the
Target SettingsDSP56800E-Specific Target Settings Panels71Targeting MC56F83xx/DSP5685x Controllers Remote Debug OptionsUse the Remote Debug Options pa
Target SettingsDSP56800E-Specific Target Settings Panels72Targeting MC56F83xx/DSP5685x ControllersFigure 4.14 Remote Debug Options
Target SettingsDSP56800E-Specific Target Settings Panels73Targeting MC56F83xx/DSP5685x Controllers Table 4.15 Remote Debug Options Panel ElementsElem
Target SettingsDSP56800E-Specific Target Settings Panels74Targeting MC56F83xx/DSP5685x Controllers
75Targeting MC56F83xx/DSP5685x Controllers5Processor Expert InterfaceYour CodeWarrior™ IDE features a Processor Expert™ plug-in interface, for rapid d
Processor Expert InterfaceProcessor Expert Overview76Targeting MC56F83xx/DSP5685x Controllers• Target CPU window — This window depicts the target micr
Processor Expert InterfaceProcessor Expert Overview77Targeting MC56F83xx/DSP5685x Controllers 4. Starting code design (that is, building the applicati
Processor Expert InterfaceProcessor Expert Overview78Targeting MC56F83xx/DSP5685x ControllersProcessor Expert BeansBeans encapsulate the most-required
Processor Expert InterfaceProcessor Expert Overview79Targeting MC56F83xx/DSP5685x Controllers Figure 5.3 Bean InspectorUsing the Bean Inspector to se
Table of Contents8Targeting MC56F83xx/DSP5685x ControllersRemoving "illegal object_c on pragma directive" Warning . . . . . . .
Processor Expert InterfaceProcessor Expert Overview80Targeting MC56F83xx/DSP5685x ControllersTable 5.1 Processor Expert Menu SelectionsItem Subitem A
Processor Expert InterfaceProcessor Expert Overview81Targeting MC56F83xx/DSP5685x Controllers Peripherals Usage InspectorOpens the Peripherals Usage I
Processor Expert InterfaceProcessor Expert Overview82Targeting MC56F83xx/DSP5685x ControllersEmbedded Beans CategoriesOpens the first page of a descri
Processor Expert InterfaceProcessor Expert Windows83Targeting MC56F83xx/DSP5685x Controllers Processor Expert WindowsThis section illustrates importan
Processor Expert InterfaceProcessor Expert Windows84Targeting MC56F83xx/DSP5685x ControllersClick the two buttons at the bottom of the window to activ
Processor Expert InterfaceProcessor Expert Windows85Targeting MC56F83xx/DSP5685x Controllers • Item names — Items to be set. Double-click on group nam
Processor Expert InterfaceProcessor Expert Windows86Targeting MC56F83xx/DSP5685x ControllersTarget CPU WindowThe Target CPU window (Figure 5.6) depict
Processor Expert InterfaceProcessor Expert Windows87Targeting MC56F83xx/DSP5685x Controllers Use the control buttons at the left edge of this window t
Processor Expert InterfaceProcessor Expert Windows88Targeting MC56F83xx/DSP5685x ControllersIn such a case, you can click the Always show internal per
Processor Expert InterfaceProcessor Expert Windows89Targeting MC56F83xx/DSP5685x Controllers Click the Show MCU Block Diagram to change the picture to
9Targeting MC56F83xx/DSP5685x Controllers1IntroductionThis manual explains how to use the CodeWarrior™ Integrated Development Environment (IDE) to dev
Processor Expert InterfaceProcessor Expert Windows90Targeting MC56F83xx/DSP5685x ControllersNOTE As you move your cursor over bean icons, peripherals,
Processor Expert InterfaceProcessor Expert Windows91Targeting MC56F83xx/DSP5685x Controllers Memory Map WindowThe Memory Map window (Figure 5.10) depi
Processor Expert InterfaceProcessor Expert Windows92Targeting MC56F83xx/DSP5685x Controllers• Cyan — FLASH memory or EEPROM• Black — External memory.P
Processor Expert InterfaceProcessor Expert Windows93Targeting MC56F83xx/DSP5685x Controllers Resource MeterThe Resource Meter window (Figure 5.12) sho
Processor Expert InterfaceProcessor Expert Windows94Targeting MC56F83xx/DSP5685x ControllersInstalled Beans OverviewThe Installed Beans Overview windo
Processor Expert InterfaceProcessor Expert Windows95Targeting MC56F83xx/DSP5685x Controllers Peripherals Usage InspectorThe Peripherals Usage window (
Processor Expert InterfaceProcessor Expert Tutorial96Targeting MC56F83xx/DSP5685x ControllersProcessor Expert TutorialThis tutorial exercise generates
Processor Expert InterfaceProcessor Expert Tutorial97Targeting MC56F83xx/DSP5685x Controllers h. Click the OK button. The IDE:• Opens the project win
Processor Expert InterfaceProcessor Expert Tutorial98Targeting MC56F83xx/DSP5685x Controllersa. Click the project window’s Processor Expert tab. The P
Processor Expert InterfaceProcessor Expert Tutorial99Targeting MC56F83xx/DSP5685x Controllers NOTE If new bean icons do not appear in the Processor Ex
Commentaires sur ces manuels