Manuale d’uso / di manutenzione del prodotto Microcontrollers del fabbricante Freescale Semiconductor
Vai alla pagina of 892
Micr ocontr oller s D e b u gg er M anu a l Revised : 22 Octobe r 2007.
Free scale ™ and the Frees cale log o are tradema rks of Fr eesca le Semico nducto r, Inc. Co deWarri or is a trad emark or re g- istered trad emark of Freescale Semicon ductor, Inc . in the United Sta tes and/o r other coun tries. All othe r product or se r- vice n ames are the p ropert y of their respect ive owne rs.
3 Microc ontrollers Debugger M anual Table of Conte nts Intr oduction Manual Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Book I - Deb ug g er Engine Book I Conten ts . . . . . . . . . .
Table of Contents 4 Microco ntrolle rs Debugger Manua l Component W indo ws Object Info Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Component Contex t Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 5 Microc ontrollers Debugger M anual Breakpoints T ab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Multiple Selections in List Box. . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 6 Microco ntrolle rs Debugger Manua l Inspecting T ask State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 T ask Description Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 7 Microc ontrollers Debugger M anual Ho w to V iew Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Ho w to Communicate with the App lication . . . . . . . . . . . . . . . . . . . .
Table of Contents 8 Microco ntrolle rs Debugger Manua l Loading the Full C hip Simulation Connectio n . . . . . . . . . . . . . . . . . . . . . . 246 Loading the P&E Multilink/Cyclone Pro Connection . . . . . . . . . . . . . . . . . 248 Loading the HC(S)08 or RS08 Open So urce BDM Co nnection .
Table of Contents 9 Microc ontrollers Debugger M anual Cycle Po wer Radio Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 T arget MC U Security Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 10 Microco ntrolle rs Debugger Manua l From W i thin an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 97 inDart-HC08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 11 Microc ontrollers Debugger M anual Connection (HCS08 FCS) Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 Peripheral Modules Co mmands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 12 Microco ntrolle rs Debugger Manua l Monitor Setup W indow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 93 Deri vati ve Selection Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 13 Microc ontrollers Debugger M anual DBG Module Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 T rigger Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 14 Microco ntrolle rs Debugger Manua l 26 RS08 Open Sour ce BDM Connection 561 RS08 Open Sour ce BDM T echnical Consideration s . . . . . . . . . . . . . . . . . . . . . 561 CodeW arrior IDE and RS08 Open Source BDM Conn ection . . .
Table of Contents 15 Microc ontrollers Debugger M anual FCS V isualization Utili ties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Analog Meter Compon ent . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 16 Microco ntrolle rs Debugger Manua l P&E Multilink/Cyclone Pro Setup Dialog Box . . . . . . . . . . . . . . . . . . . . . . 674 Connection Manager Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 Set Deriv ative Dialog Box .
Table of Contents 17 Microc ontrollers Debugger M anual Advan ced Options: Erase Pre ven tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 NVMC Graphical User In terface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 18 Microco ntrolle rs Debugger Manua l Book VIII - En vir onment V ariables Book VIII Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839 35 Debug ger Engine En vironment V ariab les 841 Debug ger En vironment .
Table of Contents 19 Microc ontrollers Debugger M anual 38 Le gacy T arget Interf aces Remo ved 867 39 HC(S)08 Full-Chip Sim ulator Components No Long er Support ed 869 List of HC(S)08 FCS Components No L onger Supported . . . . . . . . . . . . . . . .
Table of Contents 20 Microco ntrolle rs Debugger Manua l.
21 Microc ontrollers Debugger M anual Introduction Manual Conten ts The Mi crocon trollers Debugg er Man ual consists of th e following books: Book 1: Deb ugger en gine - de fines the HC0 8 and HC(S) 08 commo n and bas e features , their functi onality , and a descri ption of the co mponent s that are avai lable in the d ebugger.
Manual Content s 22 Microco ntrolle rs Debugger Manua l • HCS08 On-Chip DBG Module Book 4: RS08 Debu g Connectio ns • RS08 Full Ch ip Simula tion • RS08 P&E M ultilink/Cy clone Pro Connecti on • RS08 Open Source BDM Conn ection • SofTec RS08 Conn ection Book 5: C oldFir e V1.
23 Microc ontrollers Debugger M anual Book I - Debugger Engine Book I Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the environ ment.
Book I Con tents 24 Microco ntrolle rs Debugger Manua l.
25 Microc ontrollers Debugger M anual 1 Introduction This sectio n is an in troducti on to the Debugg er from Freesca le used in 8/1 6 bit embedd ed applica tions. Freescale Debugge r The Debu gger is a me mber of the tool family fo r Embedded De velopment .
Introduction Debug ger Features 26 Microco ntrolle rs Debugger Manua l Debugger Features • True 32-bi t application • Powerfu l fe atures for e mbedde d de buggin g • Special features for real t.
27 Microc ontrollers Debugger M anual 2 Debugger Interface This chapter de scribes the Debu gger Graphi cal User Interface (GUI). Topic s include: • Introd uction • Applicatio n Progra ms • Star.
Debugger Interfac e Startin g the Debug ger 28 Microco ntrolle rs Debugger Manua l The follo wing list is a n overview o f file s that the Co deWarrior IDE uses for C/C++ debu gging: • hiwave.exe De bugge r exec utab le f ile • hibase.dll De bugge r main f uncti on dll • elfload.
Debugger Interface Starting the Debugg er 29 Microc ontrollers Debugger M anual Starting Debug from the Main Window Menu Bar You can a lso start the d ebugg er from t he main menu bar of the CodeW arrior I DE. To start the debugg er from the main men u bar, select Debug from the Project menu: ( Project > Debug .
Debugger Interfac e Startin g the Debug ger 30 Microco ntrolle rs Debugger Manua l Command L ine Options DOS comm and lin e opti ons are: -T=<time>: Test mode The debugge r terminates after t he specified time (in seconds). The de fault valu e is 300 seconds.
Debugger Interface Starting the Debugg er 31 Microc ontrollers Debugger M anual -Nodefaults This prevent s the deb ugger from loadi ng the defa ult layo ut.
Debugger Interfac e Debug ger Main Window 32 Microco ntrolle rs Debugger Manua l NOTE The f uncti on Op en in the File m enu in terprets any file without a n .ini extensio n as a comma nd file and not a project fi le. Exam ple C:Program FilesFreescaleCodeWarrior for Microcontrollers V6.
Debugger Interface Debug ger Main Window 33 Microc ontrollers Debugger M anual Debug ger Main Window Toolb ar The De bugge r Main Wi ndow t oolbar is the de fault toolbar. Most of the M ain Wind ow menu comman ds have a rela ted sho rtcut icon on t his too lbar.
Debugger Interfac e Debug ger Main Window 34 Microco ntrolle rs Debugger Manua l File Menu The File menu shown i n Figu re 2.7 is d edicate d to t he debu gger pr oject. Figure 2.7 File Menu T ab le 2.1 Desc ription of th e Main Men u T oolba r Entries Menu entry Descript ion File Contains entries to mana ge debugger configuration f iles.
Debugger Interface Debug ger Main Window 35 Microc ontrollers Debugger M anual Table 2.2 descr ibes File Men u entries. You can sh ortcu t some o f the se funct ions by clicking too lbar icons (refer to the Debugger Mai n Window Toolb ar section). T ab le 2.
Debugger Interfac e Debug ger Main Window 36 Microco ntrolle rs Debugger Manua l Configuration Wind ow Open the Con figu ration wi ndow by sel ecting Configu ration fro m the Files me nu. With this window ( Figure 2.8 ) it is possible to set up environment variables for the current project.
Debugger Interface Debug ger Main Window 37 Microc ontrollers Debugger M anual Command Buttons: • OK : Changes are co nfirmed and saved in curre nt proje ct file. • Cancel : Cl oses di alog bo x withou t saving change s. • Help : Opens the help file.
Debugger Interfac e Debug ger Main Window 38 Microco ntrolle rs Debugger Manua l View Menu I n t h e Ma i n W i n d o w V i e w me n u ( Figur e 2.10 ) you can c hoose to show or hide the too lbar, status bar, win dow compon ent titles and head lines (see the Compon ent Wind ows O bject Info Bar ).
Debugger Interface Debug ger Main Window 39 Microc ontrollers Debugger M anual Figure 2.11 Customize T oolbar Dialog Bo x • Select th e desired sho rtcut butto n in the Availab le buttons lis t box an d click A dd to install it in the toolba r. • Select a bu tton in the Toolbar buttons list box and click Rem ove to rem ove it from the toolbar.
Debugger Interfac e Debug ger Main Window 40 Microco ntrolle rs Debugger Manua l Figure 2.13 Component W indow with out Title and Headline Figu re 2.14 shows a compo nent windo w without a ti tle and head line, and with a small border. Figure 2.14 Component W indow with out Title and Headline, an d with Small Border Figu re 2.
Debugger Interface Debug ger Main Window 41 Microc ontrollers Debugger M anual Figure 2.15 Component W indow with out Headline a nd Small Bor der Run Menu The Main Window R un menu, s hown in Figur e 2.16 i s associat ed with the de bug session . You can monitor a sim ulation or debug sessi on from this men u.
Debugger Interfac e Debug ger Main Window 42 Microco ntrolle rs Debugger Manua l T ab le 2.4 Run M enu D escription Menu entry Description Start/Continue Starts or continues exec ution of the loaded a.
Debugger Interface Debug ger Main Window 43 Microc ontrollers Debugger M anual You can p rovide sho rtcut s for so me of thes e functio ns usin g the toolba r. Refer t o the Debugger Mai n Windo w Tool bar and Custom izing the Toolbar section s for details.
Debugger Interfac e Debug ger Main Window 44 Microco ntrolle rs Debugger Manua l Loading an Execut able File Use the Connect ion m enu to l oad a debu gger connectio n: • Choos e Conn ection > Load The Lo ad Execut able Fi le wind ow shown in Figure 2.
Debugger Interface Debug ger Main Window 45 Microc ontrollers Debugger M anual Load Options Buttons These three bu ttons allow you to select which part of the executa ble file to load: • Load Code Button : Loads the ap plication code only. Lo ads only the application into the targe t system.
Debugger Interfac e Debug ger Main Window 46 Microco ntrolle rs Debugger Manua l Figure 2.19 Connect ion Command F ile Windo w The comman d file in the edit box is executed when the corre spond ing event occu rs. Click the Browse button to set the path and n ame of the c ommand file.
Debugger Interface Debug ger Main Window 47 Microc ontrollers Debugger M anual The defa ult setting s enable the STARTUP.CMD file l ocated in the current p roject d irectory as the current Startup c omman d file. Reset Command File The reset.cmd command file is a Debugg er system comm and file.
Debugger Interfac e Debug ger Main Window 48 Microco ntrolle rs Debugger Manua l Figure 2.20 Component M enu Table 2.6 de scribes the Co mponent Menu e ntries . NOTE For a rea dable displ ay, w e recommen d usin g a prop orti onal font (e. g., Co urier, Terminal, etc.
Debugger Interface Debug ger Main Window 49 Microc ontrollers Debugger M anual Figure 2.21 Set Connectio n Dialog Bo x 6. Use the Processor list menu to select t he desired proc essor. 7. Use the connection li st me nu to sele ct the desir ed con nectio n.
Debugger Interfac e Debug ger Main Window 50 Microco ntrolle rs Debugger Manua l Window Menu In this me nu, shown in Figure 2. 22 , you can set the compo nent windows gen eral arrangement. The Submenu Wind ow > O ptions is shown in Figu re 2.23 and the S ubmen u Window > Layou t in Figure 2.
Debugger Interface Debug ger Main Window 51 Microc ontrollers Debugger M anual NOTE Autosi ze and Comp onent M enu are che cked by defau lt. Help Menu This is the Debugger Mai n window Help m enu ( Fi gure 2.25 ). Table 2. 8 sh ows m enu entries. Figure 2.
Debugger Interfac e Comp onen t Ass ocia ted Men us 52 Microco ntrolle rs Debugger Manua l About Box Select Help > About to display the Abo ut box. Th e about box lists directorie s for the current proje ct, syst em inform ation , program informa tion, versio n numbe r and copy right.
Debugger Interface Compo nent Asso ciated Me nus 53 Microc ontrollers Debugger M anual Component Fi les Each compo nent is a wind ows file with a .wnd extension Component Wind ows Object Info Bar The object info b ar of the de bugge r windo w, as shown in Fi gure 2.
Debugger Interfac e Highl ights of t he User I nterface 54 Microco ntrolle rs Debugger Manua l Highligh ts of the User Interface This section desc ribes some of the m ain features of th e Debu gger user in terface. Activating Services with Drag and Drop You can ac tivat e servic es by drag ging objects from on e componen t wind ow to anot her.
Debugger Interface Highl ights of t he User Interface 55 Microc ontrollers Debugger M anual To Drag and D rop an Object To drag an obj ect from one compo nent windo w to another: 1. Sel ect the co mponent contai ning the ob ject yo u want to dra g. 2.
Debugger Interfac e Highl ights of t he User I nterface 56 Microco ntrolle rs Debugger Manua l Dragging from Data Componen t Window Table 2.10 summarizes dragging from the Data Componen t. NOTE It is not pos sible to drag an expressi on defi ned with the Ex pressi on Editor .
Debugger Interface Highl ights of t he User Interface 57 Microc ontrollers Debugger M anual Dragging from Source Co mponent Wi ndow Table 2.11 summarizes draggi ng from the Sourc e Component .
Debugger Interfac e Highl ights of t he User I nterface 58 Microco ntrolle rs Debugger Manua l Dragging from the Memo ry Comp onent Windo w Table 2.12 summarizes dragging from the Memory Comp onent. Dragging from Procedure Com ponent Win dow Table 2.13 summarizes dragging from the Procedure Component .
Debugger Interface Highl ights of t he User Interface 59 Microc ontrollers Debugger M anual Dragging from Module Co mponent Window Table 2.15 s umma rizes draggin g from the Re gist er Com ponen t. Selection Dialog Box This dial og box i s used in the Debugg er for op ening ge neral co mpone nts or sour ce files.
Debugger Interfac e Highl ights of t he User I nterface 60 Microco ntrolle rs Debugger Manua l.
61 Microc ontrollers Debugger M anual 3 Debugger Components This chapter ex plains how the d ifferent compo nents of the Debug ger work. This chap ter contain s the following sectio ns: • Compone nt.
Debugger Compo nents Compone nt Introduc tion 62 Microco ntrolle rs Debugger Manua l Conn ecti on Co mponent s Different debu gger connec tions are avail able. For exa mple, you can set a CPU awarenes s to simulat e your .ABS appli cation files, and also set a backgr ound debu gger.
Debugger Components Comp onent Intro duction 63 Microc ontrollers Debugger M anual Figure 3.2 Open Windo w Component Windo w 3. In t he O pen Wind ow Compo nent win dow, u se the mouse to se lect a compon ent. 4. Click the OK button t o open the selected component .
Debugger Compo nents General Debugg er Compone nts 64 Microco ntrolle rs Debugger Manua l General Debugger Components This s ection d escri bes the vario us featu res an d usa ge of t he de bugger compo nents. Assembly Comp onent The A ssembly window , show n in Figur e 3.
Debugger Components General D ebugger Compon ents 65 Microc ontrollers Debugger M anual Assembly Menu The Assembly me nu show n in Fi gure 3.4 contains all funct ions associat ed with the assembly compon ent. Tabl e 3.1 d escribes these menu entries. Figure 3.
Debugger Compo nents General Debugg er Compone nts 66 Microco ntrolle rs Debugger Manua l Set ting Break poi nts Breakpo int s can be set , edit ed and de leted whe n usin g the cont ext menu . Rig ht-cli ck on any state ment in the Source component win dow, then ch oose Set Brea kpoint, De lete Breakpoint , etc.
Debugger Components General D ebugger Compon ents 67 Microc ontrollers Debugger M anual T ab le 3.2 Assembly Context Men u Descriptio n Menu Entry Descripti on Set Breakpoint Appears only in the contex t menu if no breakpoint is set or disabled on the pointed t o instruction.
Debugger Compo nents General Debugg er Compone nts 68 Microco ntrolle rs Debugger Manua l Retri eving Source Statem ent • Point to an instructio n in the Assemb ly component wi ndow, dra g and dro p it into the Source co mponent win dow.
Debugger Components General D ebugger Compon ents 69 Microc ontrollers Debugger M anual Demo Version Limitations No limitation Associate d Commands Following commands are asso ciated with the Assembl y component : ATTRIBUTES , SM EM , SPC . Command L ine Com ponent The Comman d Line wind ow shown in Figure 3.
Debugger Compo nents General Debugg er Compone nts 70 Microco ntrolle rs Debugger Manua l Keying In Commands You can ty pe Debu gger c ommand s afte r the in> term inal prompt in the Com mand L ine Compon ent wind ow.
Debugger Components General D ebugger Compon ents 71 Microc ontrollers Debugger M anual Closing the Command Line During Execution When a comm and is execu ted from a Comma nd Line comp onent, it cannot be closed.
Debugger Compo nents General Debugg er Compone nts 72 Microco ntrolle rs Debugger Manua l Cache Size Select Cach e Size in th e menu to brin g up the Size of the Cache di alog bo x and set the cache size in li nes for the Comm and Line windo w, as shown i n Figure 3.
Debugger Components General D ebugger Compon ents 73 Microc ontrollers Debugger M anual Demo Version Limitations Only 20 comman ds can be entered and then comma nd comp onent is closed and it is no longer possi ble to open a new on e in the same Debu gger sessio n.
Debugger Compo nents General Debugg er Compone nts 74 Microco ntrolle rs Debugger Manua l Figure 3.11 Split Vie ws Coverage Operations Click the fo lded/unf olded icons to unfo ld/fol d the so urce m odule an d disp lay/hid e the funct ions def ined. Coverage Menu The C overa ge menu and su bmenu s are shown i n Figur e 3.
Debugger Components General D ebugger Compon ents 75 Microc ontrollers Debugger M anual Output F ile You can re direct Cover age comp onent resul ts to an ou tput file by select ing Output File > Save As i n the menu or cont ext menu . Output Fil e Filter Select Output Filter to d isplay th e dialo g box sh own in Figur e 3.
Debugger Compo nents General Debugg er Compone nts 76 Microco ntrolle rs Debugger Manua l Split View Associated Context Menu The context menu for the split view ( Figu re 3.14 ) contai ns the Delete e ntry, which is u sed to remov e the split view. Figure 3.
Debugger Components General D ebugger Compon ents 77 Microc ontrollers Debugger M anual DA-C Link Operation When yo u load th e DA-C Link com ponent, commu nication is e stablished with DA-C (if open) in o rder t o exchange synchr onizat ion in forma tion.
Debugger Compo nents General Debugg er Compone nts 78 Microco ntrolle rs Debugger Manua l Connection Specification Dialog B ox In the Co nnecti on Speci ficat ion dia log box you can set t he DA-C debu gger name. Figure 3.17 Connect ion Speci fication Dia log Bo x The DA-C debugger name mu st be the same as t he one selected i n the DA-C IDE.
Debugger Components General D ebugger Compon ents 79 Microc ontrollers Debugger M anual Data Compo nent The Data window sh own in F igur e 3.18 conta ins the na mes, valu es and typ es of glo bal or local variables . Figure 3.18 Data Win dow The Data wind ow shows all var iables pr esent i n the current source modu le or pro cedure.
Debugger Compo nents General Debugg er Compone nts 80 Microco ntrolle rs Debugger Manua l • Select a variable in th e Data compo nent, and left mouse bu tton + W k ey to set a Writ e watc hpoi nt on th e selecte d variab le.
Debugger Components General D ebugger Compon ents 81 Microc ontrollers Debugger M anual Exam ple: With two variabl es variabl e_1 , variab le_2 ; expressio n entered: ( variab le_1 <<vari able_ 2)+ 0xF F) <= 0x10 00 results i n a bo olean type.
Debugger Compo nents General Debugg er Compone nts 82 Microco ntrolle rs Debugger Manua l Scope Submenu The Sc ope Sub menu is activate d by h ighlight ing the Sc ope ent ry on the Data m enu: Figure 3.21 Scope Subme nu Table 3. 9 d escribes the Sc ope submen u entries.
Debugger Components General D ebugger Compon ents 83 Microc ontrollers Debugger M anual In Local Sco pe, if the Data com ponen t is in Locked o r Periodical mode, valu es of the display ed local va riables may b e invalid (sinc e these var iables are no longer de fined in the stack).
Debugger Compo nents General Debugg er Compone nts 84 Microco ntrolle rs Debugger Manua l Mode Submen u The Mode Subme nu is acti vated by high lighti ng th e Mod e entry on the Data menu: Figure 3.24 Mode Subm enu Table 3.12 describes th e Mode subme nu entr ies.
Debugger Components General D ebugger Compon ents 85 Microc ontrollers Debugger M anual NOTE In Locked a nd Fro zen mode, variables fro m a specific mo dule are di splayed in the data component. The same v ariables are al ways displayed in the data compone nt.
Debugger Compo nents General Debugg er Compone nts 86 Microco ntrolle rs Debugger Manua l Pointer as Arra y Option In the Data menu’s Option s submenu , choose Options > Pointer as Array to open the dialo g box shown i n Figur e 3 .27 . Figure 3.
Debugger Components General D ebugger Compon ents 87 Microc ontrollers Debugger M anual Associated Context Menu This section describes the context menus associat ed with each d ebug compo nent. Menu contents v ary when the DBG mo dule is avai lable. Figure 3.
Debugger Compo nents General Debugg er Compone nts 88 Microco ntrolle rs Debugger Manua l SUBMENU Open Module The di alog bo x show n in Figu re 3.31 lists all sou rce files bou nd to th e applicati on. Glob al variables fro m the selec ted module a re display ed in the data component .
Debugger Components General D ebugger Compon ents 89 Microc ontrollers Debugger M anual NOTE It is i mportan t to dis tinguish b etween draggi ng a va riabl e name an d dra gging a variable v alue. Both opera tions are possib le. Dragging t he name drags the address o f th e varia ble.
Debugger Compo nents General Debugg er Compone nts 90 Microco ntrolle rs Debugger Manua l Associate d Commands ADDXPR , ATTRIBUTES , DUMP , PTRARRAY , SMOD , SPROC , UPDATERATE , ZOOM .
Debugger Components General D ebugger Compon ents 91 Microc ontrollers Debugger M anual NOTE Memory va lues that have ch anged since the last refres h status are dis played in red. Howeve r, if a mem ory item is edite d or rewr itten with th e same value, th e display for thi s memory item rema ins black.
Debugger Compo nents General Debugg er Compone nts 92 Microco ntrolle rs Debugger Manua l Banked/Window Paged Memory: Physical/ Local vs. Logical display This se ction a pplies o nly to devi ces ha ving on -chip p rogram pages or da ta pag es.
Debugger Components General D ebugger Compon ents 93 Microc ontrollers Debugger M anual • Hol d down the left mouse butt on + A key to ju mp to a memor y addre ss. The pointed to value is interpreted a s an address and the memory component dumps memory starting at this address.
Debugger Compo nents General Debugg er Compone nts 94 Microco ntrolle rs Debugger Manua l Word Size Submenu With t he Wor d Si ze subme nu sh own in Figure 3. 35 , you can se t the memo ry display unit. Table 3.17 describes the menu entries. Figure 3.
Debugger Components General D ebugger Compon ents 95 Microc ontrollers Debugger M anual Format Submenu With the Format S ubmenu shown i n Figur e 3.36 , you can set the memory display format. Table 3.18 d escribes the me nu entries. Figure 3.36 Format S ubmenu Mode Submenu With th e Mode su bmenu shown in Fi gure 3.
Debugger Compo nents General Debugg er Compone nts 96 Microco ntrolle rs Debugger Manua l Display Submenu With the Displa y submenu shown in Fi gure 3 .38 , you can se t th e memor y disp lay (address/ASCII). Tabl e 3.20 describes the menu entries. Figure 3.
Debugger Components General D ebugger Compon ents 97 Microc ontrollers Debugger M anual Fill Memo ry The Fi ll Memor y dialog box show n in F igure 3.39 allows you to fill a memory range ( from Add ress edit box and to Address edit box) with a bit patt ern ( value edit box) .
Debugger Compo nents General Debugg er Compone nts 98 Microco ntrolle rs Debugger Manua l Cop yMem Subm enu The C opyMem dial og box shown in Figu re 3.
Debugger Components General D ebugger Compon ents 99 Microc ontrollers Debugger M anual Refresh Select the Refresh menu entry to refresh the Memory wind ow current data ca che. The debugge r refreshes the data ca che as if t he debugg er was halted or stepped.
Debugger Compo nents General Debugg er Compone nts 100 Microco ntrolle rs Debugger Manua l Memory Context Menu The Memory Con text menu al lows you to ex ecute memo ry associated commands. Figure 3.44 sho ws the Memory Context me nu and Tab le 3.21 describes the menu entries.
Debugger Components General D ebugger Compon ents 101 Microc ontrollers Debugger M anual Drag Out Table 3.22 describes the drag act ions possib le from the M emory compo nent. Show Watchpoints When selected, brings up the Controlpoints Configuration Window - Watchpoints Tab.
Debugger Compo nents General Debugg er Compone nts 102 Microco ntrolle rs Debugger Manua l Drop Into Table 3.23 shows the drop actions possible in the Memory component. Demo Version Limitations No limitati on Associate d Commands ATTRIBUTES , FIL L , SMEM , SMO D , SPC , UPDATERATE .
Debugger Components General D ebugger Compon ents 103 Microc ontrollers Debugger M anual The Modul e componen t displays al l source files (so urce modules) bo und to the applica tion. The Module win dow displa ys all mod ules in the order they appear i n the absolute file.
Debugger Compo nents General Debugg er Compone nts 104 Microco ntrolle rs Debugger Manua l Procedure Comp onent The P rocedur e win dow s hown in Figur e 3.46 displa ys the list of pr ocedur e or func tion calls t hat h ave be en mad e up to th e momen t the pro gram was ha lted.
Debugger Components General D ebugger Compon ents 105 Microc ontrollers Debugger M anual Drag Out Table 3.26 shows the drag actio ns possible from the Procedure co mpone nt. Drop Into Nothing ca n be dropp ed into the Procedure co mpon ent. Demo Version Limitations Only th e last two p rocedu res are displaye d.
Debugger Compo nents General Debugg er Compone nts 106 Microco ntrolle rs Debugger Manua l Profiler C omponent The Profi ler window sh own in F igure 3.48 prov ides i nformati on on th e appli cation pro file. NOTE In cases of ad vanced code op timiz ations (like link er over lappi ng ROM/cod e areas), the p rofiler output /data is affected .
Debugger Components General D ebugger Compon ents 107 Microc ontrollers Debugger M anual Profiler Operati ons Clic k the fold /unfo ld icon to unf old/ fold the sour ce module. Profiler Menu Figu re 3.50 shows the Pro filer Menu e ntries, with the Details submenu and the Base submenu.
Debugger Compo nents General Debugg er Compone nts 108 Microco ntrolle rs Debugger Manua l Split Vie w Associ ated Context M enu Figu re 3.52 shows the Pro filer contex t menu, the Delete a nd Gr aphic s menu ent ries are descr ibed in Tabl e 3.28 . Figure 3.
Debugger Components General D ebugger Compon ents 109 Microc ontrollers Debugger M anual Output File Save The Save As entry opens a Sa ve As d ialog box wher e yo u can spe cify t he o utput f ile n ame and locati on. Associa ted Context M enu Identical to menu.
Debugger Compo nents General Debugg er Compone nts 110 Microco ntrolle rs Debugger Manua l An animati on occurs durin g recording , replayin g and pausi ng. The current acti on (record, play or pau se) and path of the involve d file are disp layed in the Object Info bar of the window.
Debugger Components General D ebugger Compon ents 111 Microc ontrollers Debugger M anual In Listin g 3.2 , an .abs file is loaded, a breakpoint is set, the assemb ly component is configure d to display the code a nd addresses. The Data1 componen t display is switch ed to local variabl es, and the ap plication starts and sto ps at the breakp oint.
Debugger Compo nents General Debugg er Compone nts 112 Microco ntrolle rs Debugger Manua l TIP Many more registers and registers information might by provided by the Inspector Component , in the IO Registers field. Status Register Bits Set bi ts are displaye d dark, whe reas reset bits are displayed g ray.
Debugger Components General D ebugger Compon ents 113 Microc ontrollers Debugger M anual Drag Out Table 3.31 c ontain s the drag ac tion s poss ible from the Regist er w indow. Drop Into Table 3.32 shows the drop actions possibl e in to the R egister co mpone nt.
Debugger Compo nents General Debugg er Compone nts 114 Microco ntrolle rs Debugger Manua l Demo Version Limitations No limitati on Associate d Commands ATTRIBUTES . T ab le 3.32 Reg ister Compo nent Dr op P ossibilities Source Co mponent Window Action Assembler Loads the destination register with the P C of the select ed inst ruct ion .
Debugger Components General D ebugger Compon ents 115 Microc ontrollers Debugger M anual Sour ce Compon ent The Sourc e window sho wn in Figur e 3.58 displays the sou rce code of y our pro gram, i.
Debugger Compo nents General Debugg er Compone nts 116 Microco ntrolle rs Debugger Manua l to the Control Points chapt er. If execu tion stops, the current position is marked in the source co mponent by highligh ting t he corresp onding statemen t.
Debugger Components General D ebugger Compon ents 117 Microc ontrollers Debugger M anual • Holdi ng do wn the le ft mou se but ton and press ing th e T key: Highli ghts a co de ra nge in the Assem bly compone nt window corre sponding to t he first lin e of code selected in the Source compon ent window where the operat ion is perform ed.
Debugger Compo nents General Debugg er Compone nts 118 Microco ntrolle rs Debugger Manua l Setting Pe rman ent Breakpo ints • Point to an in structi on in th e Sour ce com ponen t Wind ow and cli ck the righ t mou se button . The Source Com ponen t contex t menu is display ed.
Debugger Components General D ebugger Compon ents 119 Microc ontrollers Debugger M anual Figure 3.63 Sour ce Ass ociated Conte xt Men u T ab le 3.33 Sou rce A ssociated Co ntext M enu Descr iption Men.
Debugger Compo nents General Debugg er Compone nts 120 Microco ntrolle rs Debugger Manua l Run To Cursor When selected, sets a t emporary breakpoint at the nearest code position and continues program exec ution immediately. Disabling a permanent breakpoint at this po sition disables the temporary breakpoint and prevents the progr am from halting.
Debugger Components General D ebugger Compon ents 121 Microc ontrollers Debugger M anual NOTE If some statements do not show mark s although the mark display is switch ed on, the following re asons may b e the cau se: - The statem ent did not produce any code du e to optimiza tions d one by the compiler.
Debugger Compo nents General Debugg er Compone nts 122 Microco ntrolle rs Debugger Manua l Go to Line This menu entry is only ena bled if a sourc e file is loaded.
Debugger Components General D ebugger Compon ents 123 Microc ontrollers Debugger M anual NOTE If an item (singl e word or source sect ion) has been se lected in the Source compone nt wind ow befor e openin g the Fi nd dial og box, t he first line of the selection is cop ied into the Find what edit box.
Debugger Compo nents General Debugg er Compone nts 124 Microco ntrolle rs Debugger Manua l Drag Out Table 3.35 shows the drag actions possible from the Source component.
Debugger Components General D ebugger Compon ents 125 Microc ontrollers Debugger M anual Drop Into Table 3.36 shows the drop actions possible into the Source compon ent. Demo Version Limitations Only on e source file of the currently loaded app lication can be disp layed.
Debugger Compo nents General Debugg er Compone nts 126 Microco ntrolle rs Debugger Manua l You can use a virt ual SCI (Serial Comm unicatio n Interface) po rt provided by the framework fo r communication with the target, but it is also p ossible to use the keyboard, the display, some files or even the serial po rt of your computer as I/ O-devices.
Debugger Components General D ebugger Compon ents 127 Microc ontrollers Debugger M anual You can simp ly choos e one of the de fault con fig uratio ns in the De fault Configuration comb o box. In the Conne ctions section all active co nnection s are listed in a list box .
Debugger Compo nents General Debugg er Compone nts 128 Microco ntrolle rs Debugger Manua l ESC is the ESC Ch aracter (ASCII code 27 decimal). These command s can be given i n the data stream sen t from the serial port or virtual SCI port, b ut not from th e input file or the k eyboard.
Debugger Components General D ebugger Compon ents 129 Microc ontrollers Debugger M anual • TERM_APPEND_BO TH : append outp ut to f ile and wi ndow • TERM_APPEND_FILE : appe nd outpu t to file fileName See also terminal.
Debugger Compo nents General Debugg er Compone nts 130 Microco ntrolle rs Debugger Manua l Trace Compon ent The Trace wi ndow shown in Figur e 3.73 records and displays instruction frames and time or cycles.
Debugger Components General D ebugger Compon ents 131 Microc ontrollers Debugger M anual Figure 3.74 T ra ce Menu Associated Context Menu The Trace co ntext menu shown i n Figu re 3.75 allows you to specify t race search conditio ns. Table 3.39 describes the menu items.
Debugger Compo nents General Debugg er Compone nts 132 Microco ntrolle rs Debugger Manua l Figure 3.75 T ra ce Associate d Conte xt Men u Figure 3.76 T race S ear ch Setup D ialog Bo x Drag Out Nothin g can be d ragged o ut. Drop Into Nothin g can be d ropped in.
Debugger Components Vis ualizati on Utilitie s 133 Microc ontrollers Debugger M anual Demo Version Limitations The numb er of frames i s limi ted to 50 .
Debugger Compo nents Visuali zation Utilities 134 Microco ntrolle rs Debugger Manua l In the figure abo ve, for exampl e, the Object P ool is exp anded. The Object Pool co ntains the Target Object, which contains t he Leds and Swap peripheral dev ices.
Debugger Components Vis ualizati on Utilitie s 135 Microc ontrollers Debugger M anual Symbol Table The sym bol table shown in Figur e 3.80 displays a ll loaded sym bol table in formation in raw format. There ar e no stack frames associ ated with fun ctions.
Debugger Compo nents Visuali zation Utilities 136 Microco ntrolle rs Debugger Manua l Figure 3.82 Inspector Wi ndow Ex ceptions Ic on Events a re only used i n th e HC(S)08 Freescale Full Chip Simulator. This informatio n is used for si mulat ion I/O devi ce de velopme nt.
Debugger Components Vis ualizati on Utilitie s 137 Microc ontrollers Debugger M anual IO Regist ers The IO Registers icon shown in Figur e 3.84 shows all the IO Re gisters and Core Reg isters referen ced by the debugg er data base. T he Inspe ctor can therefo re prov ide many mo re registers in formation th an th e regu lar Re gister window.
Debugger Compo nents Visuali zation Utilities 138 Microco ntrolle rs Debugger Manua l Values can be ente red in hexade cimal (with p receding 0x ), in decimal, in octal (with precedin g 0 ), or i n binar y (wit h precedin g & ). To see th e IO_Led in the Inspector, as shown in Fi gure 3.
Debugger Components Vis ualizati on Utilitie s 139 Microc ontrollers Debugger M anual Inspector Menu The Inspecto r menu con tains entries described i n Tabl e 3.40 . Associated Context Menu Commands i n the Inspecto r context menu depen d on the selected item.
Debugger Compo nents Visuali zation Utilities 140 Microco ntrolle rs Debugger Manua l Drag Out Items that ca n be dragg ed, depen ds on which icon is select ed. T able 3. 42 gives a b rief descri ption . Drop Into Nothin g can be d ropped in. Demo Version Limitations Only 5 items ca n be exp anded at each l ocation.
Debugger Components Vis ualizati on Utilitie s 141 Microc ontrollers Debugger M anual Visualization Tool Compo nent The Vi sualiza tion To ol compo nent is a very convenie nt tool for pr esent ing your data. Fo r software demonstr atio n, or for you r own debu gging session , take adv anta ge of all its virtua l instr uments .
Debugger Compo nents Visuali zation Utilities 142 Microco ntrolle rs Debugger Manua l Instrument Selec tion You can sel ect a sing le inst rument by left click ing the mous e on i t, and c hang e the select ion b y press ing the tab-ke y. To make multiple selecti ons, hold d own the control key and le ft-click on t he desired instruments.
Debugger Components Vis ualizati on Utilitie s 143 Microc ontrollers Debugger M anual Associated Context Menu The contex t men u of the Vi sualiza tionToo l depe nds on th e curr ent sele ction. It can con tain the entri es described in Table 3.4 4 . : Load Layout Loads a Visualiz ationTool-Layout ( *.
Debugger Compo nents Visuali zation Utilities 144 Microco ntrolle rs Debugger Manua l Paste Edit m ode Adds instrumen ts, which are temporary s tored in the clipboard, to the workspac e. Shortcut: Ctrl + V Send to Back At least one selection Sends current instrument to the back of the Z-order.
Debugger Components Vis ualizati on Utilitie s 145 Microc ontrollers Debugger M anual VisualizationTool Pro perties Like othe r instruments, the Visualizat ionTool itself h as Properties. There are several configura tion possibi lities for the Visua lizationToo l, shown in Tabl e 3.
Debugger Compo nents Visuali zation Utilities 146 Microco ntrolle rs Debugger Manua l Instrume nts When you first ad d an instrume nt, it is in “move mode ”. Place it at th e desired loc ation on the workspace. All new instrument s are set to their default attributes .
Debugger Components Vis ualizati on Utilitie s 147 Microc ontrollers Debugger M anual Analog Inst rument The Analog ins trument ( Fi gure 3. 89 ) re presents th e class ical pointer i nstrument, also known as speedo meter or vo ltage me ter. Figure 3.
Debugger Compo nents Visuali zation Utilities 148 Microco ntrolle rs Debugger Manua l Bitmap Instrument You can use the Bitma p instrume nt to giv e a specia l look to y our visuali zation, o r to displa y a warnin g pic ture. Addition ally, it can also be u sed as a b itmap anim ation.
Debugger Components Vis ualizati on Utilitie s 149 Microc ontrollers Debugger M anual flasher is on, while bit 1 says that th e brake ligh t is on. So for y our simple applica tion you need the follow.
Debugger Compo nents Visuali zation Utilities 150 Microco ntrolle rs Debugger Manua l LED Instrument The LED instrumen t is used for observing one definite bit of one by te ( Fig ure 3. 93 ). There are only two stat es: On and Off. Figure 3.93 Led Instrume nt LED instrum ent attrib utes are show n in Tabl e 3.
Debugger Components Vis ualizati on Utilitie s 151 Microc ontrollers Debugger M anual 7-Segm ent Display instr ument at tributes ar e shown in Ta ble 3.
Debugger Compo nents Visuali zation Utilities 152 Microco ntrolle rs Debugger Manua l Text Instrument The Te xt instr ument ha s severa l funct ions: S tatic Te xt, Value , Relat ive Valu e, and Command ( Figu re 3. 96 ). Figure 3.96 T ext Ins trument Use Text Mode to switch between the five avai lable mode s.
Debugger Components Vis ualizati on Utilitie s 153 Microc ontrollers Debugger M anual Static Text is used for add ing descrip tions on the work space. Its att ributes are sho wn in Table 3.56 . Value is used for displaying a value in differen t ways (decimal, hexadec imal, octal, or binary).
Debugger Compo nents Visuali zation Utilities 154 Microco ntrolle rs Debugger Manua l Command : Use this instr ument mo de to speci fy a com mand t o execut e by cli cking on th is field. For more information a bout commands, read Debugge r Engine Comma nds .
Debugger Components Vis ualizati on Utilitie s 155 Microc ontrollers Debugger M anual Drop Into In Edit mode, the d rag and drop function ality supp lies a very e asy way to a utomatically configur e an instrumen t. To assign a variable, simply drag it from the Da ta Window o nto the instru ment.
Debugger Compo nents Visuali zation Utilities 156 Microco ntrolle rs Debugger Manua l.
157 Microc ontrollers Debugger M anual 4 Control Points This chapter pro vides an ov erview of the deb ugger cont rol points: Break points, Watchpoin ts, and Markp oints.
Control Points Breakpoi nts 158 Microco ntrolle rs Debugger Manua l • Enabl e/disabl e a selecte d control po int by ch ecking o r unchecki ng the rel ated checkbo x. • Enabl e/disa ble mu ltiple contro l poi nts by che ckin g or unche ckin g the rela ted checkbo x.
Control Points Breakpoint s 159 Microc ontrollers Debugger M anual Breakpoints a re controlled thro ugh the Breakpo ints tab of the Contro lpoints Config uration window. Th is window can b e opened through th e Source Wind ow Context men u, as described below: Figure 4.
Control Points Breakpoi nts 160 Microco ntrolle rs Debugger Manua l Figure 4.2 Contr olpoints Config urati on W in dow (Br ea kpo ints T ab ) Breakpoints Tab The Co ntrolpoin ts Confi guration Window .
Control Points Breakpoint s 161 Microc ontrollers Debugger M anual • Update button to Update a ll modificatio ns in the dialog b ox. • Add button to add new break points. Specify the Ad dress (in he xadecima l when Hex format is check ed, or as an exp ression when Hex f ormat is un checked).
Control Points Breakpoi nts 162 Microco ntrolle rs Debugger Manua l Saving Breakpoints The Debugger provi des a way to sto re all defined break points of t he currently loa ded applica tion ( .ABS file) into the mat ching breakpoin ts file. The m atching file has the same name as t he l oaded .
Control Points Breakpoint s 163 Microc ontrollers Debugger M anual The codeSi ze value is an expressio n. It is u sually a consta nt number to specify (fo r security) the code size of a functi on where a breakpoi nt is set. If the size specified does not match t he size of the functi on currently loaded in the .
Control Points Setting Bre akpoints 164 Microco ntrolle rs Debugger Manua l NOTE For more information about this syntax, see BS and SAVEBP com man ds. Setting Breakpoints Breakpoint s may be set in a So urce or Assembl y componen t window.
Control Points Setting Breakpo ints 165 Microc ontrollers Debugger M anual Temporary Breakpo ints Temporary br eakpoint s are activa ted next time the instructio n is execut ed. A temporary breakp oint is recogni zed by th e followi ng icon : Set ting Tempor ary Break poi nts Using the Source Window C ontext Menu: 1.
Control Points Setting Bre akpoints 166 Microco ntrolle rs Debugger Manua l Holding down the left mouse button and pressing the P key: 1. Point a t a C statem ent in the Source wind ow, hold down the le ft mouse bu tton an d press the P ke y. 2. A pe rmanent brea kpoint mark is display ed in front of th e selected st atement.
Control Points Setting Breakpo ints 167 Microc ontrollers Debugger M anual 5. Se lect the bre akpoi nt you wan t to modi fy by clic king on the cor respon ding ent ry in the list of define d breakp oints at t he top of t he tab. 6. In th e Coun ter: gro up of this ta b specify the inte rva l for the brea kpoint dete ction in the Inte rval : field .
Control Points Setting Bre akpoints 168 Microco ntrolle rs Debugger Manua l Using the Source Window C ontext Menu: 1. Point at a C statement in the Source Compo nent window and right-cli ck. The Source Cont ext Menu is dis play ed. 2. Sel ect Set BreakPoint from the Con text Me nu.
Control Points Setting Breakpo ints 169 Microc ontrollers Debugger M anual Choosing Show Breakpoints from Source Context M enu 1. Point in the Source Component window and rig ht-click. T he Source Con text Menu is disp layed . 2. Ch oose Show Br eakpoi nts fro m the cont ext me nu.
Control Points Watchpo ints 170 Microco ntrolle rs Debugger Manua l Watchpoints Watchp oints are co ntrol poin ts a ssocia ted wi th a memo ry rang e. P rogram execut ion st ops when the me mory ra nge define d by th e watchpoin t has bee n accessed.
Control Points Watchpo ints 171 Microc ontrollers Debugger M anual Figure 4.4 Memory Conte xt Menu Figure 4.5 Data Context M enu.
Control Points Watchpo ints 172 Microco ntrolle rs Debugger Manua l Figure 4.6 Contr olpoints Configu ration Windo w (W atc hpoints T ab) Watc hpoint s Tab The Watchp oints tab of th e Contr olpoint s Configur ation window con tains: • List bo x that disp lays the list of currently d efined watchp oints.
Control Points Watchpo ints 173 Microc ontrollers Debugger M anual NOTE Current a nd Interv al values are limited to 2,147 ,483,64 7. A beep o ccurs and th e character is not appende d, if a nu mber greater t han this valu e is entered. NOTE When the In terval value is chang ed, the C ounter value i s automati cally set to the Interval valu e.
Control Points Setting W atchpoint s 174 Microco ntrolle rs Debugger Manua l Setting Watchpoints Watchp oints ma y be set i n a Data or Memory wi ndow. NOTE Due to ha rdware restrictio ns, the watch point func tion migh t not be implem ented on hardware co nnecti ons.
Control Points Setting Wa tchpoint s 175 Microc ontrollers Debugger M anual Setting a Writ e Watch point A red vertical bar is displayed in fron t of a variable asso ciated with a writ e access watchp oint. The De bugge r provide s two w ays to define a write access w atchpoin t: Using the Data Context Menu: 1.
Control Points Setting W atchpoint s 176 Microco ntrolle rs Debugger Manua l Using the Left Mouse Button a nd Pressing the B Key: 1. Point at a variable in th e Data windo w, hold down th e left mouse button a nd press the B key. 2. A read/ write access watc hpoint i s defined for the se lected vari able.
Control Points Setting Wa tchpoint s 177 Microc ontrollers Debugger M anual stops. Current is reloaded with th e value stored in th e interval field to en able t he coun ting watc hpoint ag ain. Defining a Co ndition al Watchpo int A conditio n can be associated with any ty pe of watch point describ ed previously (re ad, write, read/write).
Control Points Setting W atchpoint s 178 Microco ntrolle rs Debugger Manua l Deleting a W atchpoint The Debug ger provi des three way s to dele te a watchpoi nt: Use Delete Breakpoint from Context Menu: 1. In the Data wind ow, poin t to a varia ble where a watchp oint has be en defi ned and r ight- click.
Control Points Markp oin ts 179 Microc ontrollers Debugger M anual 4. You can enter the co mmand in the Command field . The c ommand i s a single debugger c ommand. At this level, the comman ds G , GO and ST OP are not allowed. A command fil e can be associat ed with a watc hpoint usi ng the comma nds CALL or CF (Example CF brea kCmd.
Control Points Markpoi nts 180 Microco ntrolle rs Debugger Manua l Figure 4.7 Sour ce Window Conte xt Menu Figure 4.8 Memory Context Me nu.
Control Points Markp oin ts 181 Microc ontrollers Debugger M anual Figure 4.9 Data Context M enu Figure 4.10 Contr olpoints Conf ig uration Windo w (Mark points T ab) Markpoints Tab The Mark points tab of the Controlp oints Con figura tion window contai ns: • List bo x that disp lays the list of currently defined markpoints.
Control Points Setting M arkpoints 182 Microco ntrolle rs Debugger Manua l • Markpoint : group box that di splays t he ad dress of t he cu rrently selected markpo int, size of the markpoint, n ame of the procedure o r variable on which the markpoint ha s been set, an d type of the mark point.
Control Points Setting M arkpoints 183 Microc ontrollers Debugger M anual Setting a Data Ma rkpoin t A blue letter L is displayed in fro nt of a variable associa ted with a markpoint. To defin e a data range mark point: Use the Da ta Context M enu: 1.
Control Points Haltin g on a Cont rol Poin t 184 Microco ntrolle rs Debugger Manua l Deleting a Markpo int To delete a markpoin t: Using the Left Mouse Button a nd Pressing the D Key: 1. Point at the markpoint varia ble in the Data wind ow, the memory ra nge in the Memo ry window, or the code lin e in the Sou rce windo w: 2.
185 Microc ontrollers Debugger M anual 5 Real Time Kernel Awareness The Debu gger allo ws you to load and c ontrol applica tions on th e target system, or applicatio ns simulated on the host.
Real Time K ernel Aw areness Task D escripti on Langu age 186 Microco ntrolle rs Debugger Manua l Inspecting T ask State Each multitas king ope rating syst em stores the con text of eac h task at a specifi c location, usually called the task descrip tor.
Real Time Kernel Awar eness Task Descrip tion Lang uage 187 Microc ontrollers Debugger M anual Assignment = Ident ':=' Expression. ErrorMsg = 'MSG' ':=' String. IfStatemen = 'IF' BoolExpr 'THEN' Stat Sequence {ELSIFPart} [ELSEPart] 'END'.
Real Time K ernel Aw areness Applica tion Exam ple 188 Microco ntrolle rs Debugger Manua l Application Example Listin g 5.1 shows an exam ple of a OSPARAM.PRM file fo r SOOM System /REM. Listing 5.1 OSP ARAM.PRM File { File OSParam.PRM, implementation for SOOM System/REM } { R0.
Real Time Kernel Awar eness Inspecting Kernel Data St ructures 189 Microc ontrollers Debugger M anual Inspecting Kernel D ata Structures To allow the debu gger to displ ay the da ta structures of the operati ng system, the correspond ing symbol informatio n has to be avai lable.
Real Time K ernel Aw areness OSEK Kernel Aware ness 190 Microco ntrolle rs Debugger Manua l END PLACEMENT ... OS_DATA INTO RTK_SEC; ... END The source file (for exa mple: rtk.c ) has to be compiled and li sted in the NAMES section o f the linker p arameter fi le.
Real Time Kernel Awar eness OSEK Kernel Awaren ess 191 Microc ontrollers Debugger M anual OSEK Run Time Interface The OSEK Run Time Interfac e (ORTI) is an interface for deve lopment t ools to the OSEK Operating S ystem. It is a part of the OSEK stan dard (refer to www.
Real Time K ernel Aw areness OSEK Kernel Aware ness 192 Microco ntrolle rs Debugger Manua l combin ation with th e dynamic data. The dynamic data give s information about t he current status o f the s ystem. The information given to t he CodeWarrior IDE is represented in a text file (ORTI-File).
Real Time Kernel Awar eness OSEK Kernel Awaren ess 193 Microc ontrollers Debugger M anual OSEK RTK Inspe ctor Comp onent OSEK awareness is described through the CodeWarrior RTK Inspector component as shown in Fi gure 5.
Real Time K ernel Aw areness OSEK Kernel Aware ness 194 Microco ntrolle rs Debugger Manua l The fol lowing sectio ns offe r a desc ription of typi cal obje cts al ong wit h their a ttribut es and how th ey are p resent ed.
Real Time Kernel Awar eness OSEK Kernel Awaren ess 195 Microc ontrollers Debugger M anual Inspector Stac k The Stack sh own in Fi gure 5.4 displays the current state of OSEK stack trac e.
Real Time K ernel Aw areness OSEK Kernel Aware ness 196 Microco ntrolle rs Debugger Manua l • Current Value : displays the c urrent value o f the system time r. • Activated Alarm : displays assoc iated alarm s. Insp ect or A lar m The Alarm shown in Figu re 5.
Real Time Kernel Awar eness OSEK Kernel Awaren ess 197 Microc ontrollers Debugger M anual Inspector Message The Message sho wn in Figur e 5 .7 displa ys the current stat e of OSEK message t race.
Real Time K ernel Aw areness OSEK Kernel Aware ness 198 Microco ntrolle rs Debugger Manua l.
199 Microc ontrollers Debugger M anual 6 How To... This chapter pro vides answe rs to frequentl y asked questio ns. Topics include: • How To Configu re the Debugger • Starting Debugger from CodeW .
How To... Starting D ebugger from CodeWa rrior IDE 200 Microco ntrolle rs Debugger Manua l Defining the Default Directory in the MCUTOOLS.INI When s tartin g from t he desk top or S tart me nu, th e workin g direc tory ca n be set in t he configura tion file MCU TOOLS.
How To... Automatin g Debug ger Startup 201 Microc ontrollers Debugger M anual Automating Deb ugger Startup Often the sam e tasks ha ve to be per formed af ter starti ng th e Debugger . These tasks can be automa ted by writin g a com mand file th at contai ns all comm ands to be execu ted after startup of the Deb ugger, as sho wn in Li sting 6.
How To... How To L oad an App lication 202 Microco ntrolle rs Debugger Manua l this file (for ex ample, CALL INIT.CMD ), it automatically executes when th e connect ion comp onent is l oaded. NOTE Refer to Starting Debugger from CodeWarrior IDE . How To Lo ad an A pplica tion 1.
How To... How to St op an Appl icatio n 203 Microc ontrollers Debugger M anual How to Stop an Application There are two ways t o stop program ex ecution: • Choos e Ru n >Hal t • Click on the Halt icon in t he debu gger to ol ba r HALTED in the sta tus line ind icates that e xecution has been stop ped.
How To... How to St ep in the Ap plicatio n 204 Microco ntrolle rs Debugger Manua l On the Next Source Instruction The D ebugge r prov ides two w ays of step ping to the ne xt sour ce inst ruction: .
How To... How to Work o n Variable s 205 Microc ontrollers Debugger M anual STOPPE D ( STOP ) in the status line indic ates that the appli cation is stoppe d by a step out funct ion. If the appli cation was previ ously s topped in a func tion, a Step Out stops th e applicati on on the so urce instru ction following the func tion invoca tion.
How To... How to W ork on Variabl es 206 Microco ntrolle rs Debugger Manua l • Doubl e-cl ick Double-cli ck a functio n nam e in the Pro cedure co mponent. The Data component (for local tha t is neit her frozen or lock ed) displays t he list of variable s defined i n the select ed function with their va lues and type.
How To... How to Work o n Variable s 207 Microc ontrollers Debugger M anual Change Form at for Variable Value Disp lay The Debu gger allows you to see the value o f variables in different fo rmats. This is set b y entries in th e Fo r ma t menu ( Ta ble 6.
How To... How to W ork on Variabl es 208 Microco ntrolle rs Debugger Manua l Modify a Variable Value The D ebugge r allow s you to chang e the value of a var iable, as show n in Figure 6. 3 . Figure 6.3 Modifyi ng a V ariable V alue Double- click on a var iable.
How To... How to Work on the Reg ister 209 Microc ontrollers Debugger M anual Inspect Memory Starting at a Variable Location Ad dress The Debugger provi des two way s to dump the memory starting at a variab le allocati on address. • Using Drag and Drop Drag a variabl e name from the Data Co mponent to Mem ory compone nt.
How To... How to W ork on the Regi ster 210 Microco ntrolle rs Debugger Manua l Modify a Register Con tent The D ebugge r allow s you to chang e the conten t of in dexes, accumu lator s or bit registe rs. Modify Index or Accumulator Regi ster Content Double-click a register.
How To... How to Work on the Reg ister 211 Microc ontrollers Debugger M anual Start Memory Dum p at Address Where Register is Pointin g The Debugger pro vides two way s to dump memory starti ng at the add ress to which a register po ints. Using Drag and Drop • Drag a register from the Register co mponent to Memory compone nt.
How To... Modify C ontent of M emory Addres s 212 Microco ntrolle rs Debugger Manua l Modify Content of Memory Address The Debu gger allo ws you to change the content of a memory a ddress. Doubl e-click the memory a ddress you wa nt to modify . Content from the current memory loc ation is highlig hted and ca n be ed ited.
How To... How to View Code 213 Microc ontrollers Debugger M anual How to View Code The Debugger allows you to view the co de associated with each assem bler instructio n. Figure 6.6 Viewin g Code Ass ociated wit h Assemb ler inst ruction Online disa ssembly can b e performed in one of the following ways: Using Context Menu 1.
How To... How to Comm unicate with the Appl ication 214 Microco ntrolle rs Debugger Manua l How to Communicate wi th the Application The Debu gger has a pse udo-terminal faci lity. Use the Te s t Te r m or Te r m i n a l com ponent window to communicate with the app lication us ing specific f unctions defi ned in the TERMINAL.
215 Microc ontrollers Debugger M anual 7 CodeWarrior IDE Integration This chap ter provid es information on how to use and c onfigure the Simulato r/Debugge r within the CodeWarrior IDE u sing the follo wing software: • CodeW arrior IDE - CW08 versi on 3.
CodeWarrior ID E Integration Debug ger Configuratio n 216 Microco ntrolle rs Debugger Manua l Figure 7.1 IDE T ar get Window - Bui ld Extras P a nel.
217 Microc ontrollers Debugger M anual 8 Debugger DDE Capabilities Intr oduct ion The DDE is a form of interpro cess commun ication tha t uses shared me mory to exchan ge data between applicati ons.
Debugger DDE Capa bilities 218 Microco ntrolle rs Debugger Manua l 3. Push the Con nect button of th e DDEClient. Th e following message appea rs in DDECLient: Conn ected to H I-WAVE|Com mand . 4. In th e Exec field o f DDECLient t ype a Debugg er command, for example open recorder and click the Exec button.
219 Microc ontrollers Debugger M anual 9 Synchronized Debugging Through DA-C IDE This chapt er provides information on how to use and confi gure Frees cale tools with in the Development Assistant for C (DA-C) IDE. Fo r more information o n DA-C, refer to the Development A ssistant for C documentat ion v 3.
Synchronized Debugging Thr ough DA-C IDE Config uring DA-C IDE for Free scale Tool Kit 220 Microco ntrolle rs Debugger Manua l current i nstallation. An example c onfigur ation for the M68k CPU is p rovided, wh ich can be adapted t o each CPU supp orted by Freesca le.
Synchronized Debugging Through DA-C IDE Config uring DA-C IDE for Freesc ale Tool Kit 221 Microc ontrollers Debugger M anual Referential Projec t Root Directory If not e mpty, this text b ox specifies an alternate Pro ject Root P ath for searching files not found in the orig inal proje ct path.
Synchronized Debugging Thr ough DA-C IDE Config uring DA-C IDE for Free scale Tool Kit 222 Microco ntrolle rs Debugger Manua l Configure Library Path An additio nal conf iguratio n path mu st be defin ed to spe cify the location of library header files (needed for DA-C symbo l analysis).
Synchronized Debugging Through DA-C IDE Config uring DA-C IDE for Freesc ale Tool Kit 223 Microc ontrollers Debugger M anual Preprocess or - Header D irectories This text b ox determines the list of dire ctories that are to be searched for files name d within the #include direc tive.
Synchronized Debugging Thr ough DA-C IDE Config uring DA-C IDE for Free scale Tool Kit 224 Microco ntrolle rs Debugger Manua l Adding Files to Pr oject In the Pr oject W indow t he Explor er View Ta b repla ces the Wind ow's Ex plore r and supplies y ou with additiona l information on directo ries containing project fil es.
Synchronized Debugging Through DA-C IDE Config uring DA-C IDE for Freesc ale Tool Kit 225 Microc ontrollers Debugger M anual Building The Database Developmen t Assistant for C provi des the static cod e analysis of C source files, as wel l as gene rating v arious d ata ba sed on the resu lts.
Synchronized Debugging Thr ough DA-C IDE Config uring DA-C IDE for Free scale Tool Kit 226 Microco ntrolle rs Debugger Manua l Figure 9.6 Logical View T ab Double-c lick on Fibo.c f ile to ope n it. Configuring The Tools We wi ll now confi gure the com piler and mak er in the DA-C IDE.
Synchronized Debugging Through DA-C IDE Config uring DA-C IDE for Freesc ale Tool Kit 227 Microc ontrollers Debugger M anual Compiler Configuratio n In Menu "St art" Actio ns , cli ck on new and fill in t he New Action bo x with " C&om pile", then press ENTER ( Figure 9.
Synchronized Debugging Thr ough DA-C IDE Config uring DA-C IDE for Free scale Tool Kit 228 Microco ntrolle rs Debugger Manua l Clic k on OK to va lidate these set tings. Select the Fibo.c fil e. Click on the Compiler button (or from the main menu of DA-C select Start > Compile ).
Synchronized Debugging Through DA-C IDE Config uring DA-C IDE for Freesc ale Tool Kit 229 Microc ontrollers Debugger M anual Maker Configuratio n In the same wa y, you can n ow configure th e maker as illust rated in Figu re 9.
Synchronized Debugging Thr ough DA-C IDE Debug ger Interface 230 Microco ntrolle rs Debugger Manua l Debugger Interface DA-C v3.5 current ly integrates a DAPI interface (Deb ugging support Application Progra mming Interfac e). Through t his interface DA-C is enabled to exchange m essages with the De bugger.
Synchronized Debugging Through DA-C IDE Debug ger Interface 231 Microc ontrollers Debugger M anual Figure 9.10 Comm unication bet ween D A-C IDE and Deb ugger Communicatio n DLL Installatio n As descri bed prev iously , the Debu gger need s the nDAPI communi cation DLL (provi ded by DA-C IDE).
Synchronized Debugging Thr ough DA-C IDE Debug ger Interface 232 Microco ntrolle rs Debugger Manua l Figure 9.11 D A-C Debugger Options Di alog Bo x In the De bugger combo-box, sel ect the correspo nding debugger: HI-WAVE 6.0 . Now specif y th e binary fil e to be opened: in ou r ex ample we want t o de bug th e fibo.
Synchronized Debugging Through DA-C IDE Synchr onized De buggin g 233 Microc ontrollers Debugger M anual Figure 9.13 D A-C Compone nt Opening The Debugger DAC wind ow, which is need ed for communi cation with the DA-C IDE is now ope ned ( Figu re 9.14 ).
Synchronized Debugging Thr ough DA-C IDE Troub leshooting 234 Microco ntrolle rs Debugger Manua l Figure 9.15 D A-C toolbar NOTE If changes are mad e to your source co de, don' t forget to rebui ld the Database when gene ratin g new bin ary files t o avoid m isalignm ent be tween th e Debugg er and DA-C source po sitions .
Synchronized Debugging Through DA-C IDE Troubles hooting 235 Microc ontrollers Debugger M anual Open th e set up dia log box in th e Debug ger by clic king on the DA- C Link compo nent a nd choose DA-C L ink > Se tup from the ma in men u. The Conn ection Specif icati on di alog box opens ( Figu re 9 .
Synchronized Debugging Thr ough DA-C IDE Troub leshooting 236 Microco ntrolle rs Debugger Manua l.
237 Microc ontrollers Debugger M anual Book II - HC08 Debug Connections Book II Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the enviro nment .
Book II Co ntents 238 Microco ntrolle rs Debugger Manua l.
239 Microc ontrollers Debugger M anual 10 Microcontroller De bugging First Steps Since th e initial steps f or creating a project are sim ilar, the fo llowing informati on provides an example of t he first few steps of the New Proje ct wizard that appl y to creating an HC(S)08, HC08 or RS08 pro ject.
Microcontroller Debugging First Steps Technic al Con sideratio ns 240 Microco ntrolle rs Debugger Manua l has a totally di fferent simulation en gine to accu rately simulat e the memory range s, I/O, and p eriph erals for a ny give n deriv ative.
Microcontroller Debugging First St eps Debugg ing First Steps Using the Wiza rd 241 Microc ontrollers Debugger M anual Refer to the inDART®- HC08 In-C ircuit Debugger/P rogrammer for Moto rola HC08 Family FLASH Devices User ’s Manual from SofTec for communication h ardware requireme nts and SofTec produc t installation.
Microcontroller Debugging First Steps Debug ging First Steps Usin g the W izard 242 Microco ntrolle rs Debugger Manua l Figure 10.2 Pr oject P arame ters Screen.
Microcontroller Debugging First St eps Debugg ing First Steps Using the Wiza rd 243 Microc ontrollers Debugger M anual 6. Ch oose th e lang uages to be suppor ted. • Assembly - If only Assembly is selected , you can later choo se to use absolu te/single file assembly a pplication or relo catable assembly.
Microcontroller Debugging First Steps Debug ging First Steps Usin g the W izard 244 Microco ntrolle rs Debugger Manua l Figure 10.4 Pr ocessor E xpert Screen 11. Selec t a Rapi d Appl ication Develo pment option. 12. Depending o n sel ected CPU deriv ative this m ay be last t he scree n.
Microcontroller Debugging First St eps Debugg ing First Steps Using the Wiza rd 245 Microc ontrollers Debugger M anual 13. Depen ding on CP U deriva tive selec ted, additi onal scree ns may app ear; selec t startup code , memory model , and float ing po int format.
Microcontroller Debugging First Steps Switc hin g Co nne ction s 246 Microco ntrolle rs Debugger Manua l 17. In the IDE main window toolbar Project me nu, cho ose Project > Make . 18. Now ch oose Project > Debug to start the d ebugger. Figure 10.
Microcontroller Debugging First St eps Switchin g Connecti ons 247 Microc ontrollers Debugger M anual 1. Fr om the Debu gger mai n menu, sel ect Component | Set C onnect ion , as shown below. Figure 10.8 Component M enu The Set Co nnecti on dialog box now appear s.
Microcontroller Debugging First Steps Switc hin g Co nne ction s 248 Microco ntrolle rs Debugger Manua l 3. Press the OK button. The De bugger main menu entry b ar fo r the con nection n ow changes to HC0 8FCS. Figure 10.10 HC0 8 FCS Men u You have succe ssfully switche d con nectio ns t o the FCS c onnecti on.
Microcontroller Debugging First St eps Switchin g Connecti ons 249 Microc ontrollers Debugger M anual The Set Co nnecti on dialog box now appear s. Figure 10.
Microcontroller Debugging First Steps Switc hin g Co nne ction s 250 Microco ntrolle rs Debugger Manua l The menu se lect ion M ultilinkCyclo nePro > Connec t take s you to the P &E ICD connec tion ma nager dial og bo x.
Microcontroller Debugging First St eps Switchin g Connecti ons 251 Microc ontrollers Debugger M anual Loading the H C(S)08 or RS08 Open Sou rce BDM Connectio n To switch to either the HC(S )08 or RS08 Open Source BDM Connec tion fol low these steps: 1.
Microcontroller Debugging First Steps Switc hin g Co nne ction s 252 Microco ntrolle rs Debugger Manua l 3. Press the OK butto n. The Debu gger mai n menu entry bar for the connecti on now chan ges to RS08 Open Source BDM. Figure 10.18 RS 08 Open So urce B DM Men u You ha ve suc cessful ly swi tche d conne ction s.
253 Microc ontrollers Debugger M anual 11 HC08 Full Chip Simulation Full Chi p Simulation (FCS) connectio n runs a c omplete simula tion of all processor peripherals and I/O on the use r's Personal Co mputer. Becau se of this it d oes not require an MCU deve lopm ent bo ard to be connec ted to yo ur PC.
HC08 Full Chip Simulation Config uration Proc edure 254 Microco ntrolle rs Debugger Manua l Figure 11.2 Connection (HCS0 8FCS) List Menu.
HC08 Full Chip Simulation Configu ration Procedu re 255 Microc ontrollers Debugger M anual Select Device Option The Device op tion on the HC08 FCS menu allows y ou to select th e particul ar Freescale processo r that yo u wish to use.
HC08 Full Chip Simulation Config uration Proc edure 256 Microco ntrolle rs Debugger Manua l This comman d is extremely useful for verifying speci fic timings of a give n event, running until a g iven .
HC08 Full Chip Simulation Configu ration Procedu re 257 Microc ontrollers Debugger M anual viewed an d their values mo dified, and the valu es can be store d back into d ebugger memory.
HC08 Full Chip Simulation Config uration Proc edure 258 Microco ntrolle rs Debugger Manua l ADC Module Optio n In Full Chip Simula tion Mode (FCS), thi s option lets you simula te all the function ali.
HC08 Full Chip Simulation Configu ration Procedu re 259 Microc ontrollers Debugger M anual For more information o n ADC configura tion, refer to the Freescale Manu al for your microprocessor. ADC User Commands The follo wing ADC comm ands are ava ilable on the HC08 p rocessor in F ull Chip Simulatio n mode.
HC08 Full Chip Simulation Config uration Proc edure 260 Microco ntrolle rs Debugger Manua l Examp le >ADCLR Clear the input buffer for ADC simulation.
HC08 Full Chip Simulation Configu ration Procedu re 261 Microc ontrollers Debugger M anual Figure 11.1 1 Freque ncy Displ ay Once the CGM is prope rly configu red, the us er can monito r the status of th e PLL by polling th e correspon ding flag.
HC08 Full Chip Simulation Config uration Proc edure 262 Microco ntrolle rs Debugger Manua l Certain periph erals that run direct ly from the XTA L run at different sp eeds than those th at run from the bus clock.
HC08 Full Chip Simulation Configu ration Procedu re 263 Microc ontrollers Debugger M anual Figure 11.1 3 Memory Comp onent Windo w If you enable th e Shu tdown pin on t he HRP module , you can obs erve the SHTIF F lag vi a the Memory wind ow once the S hutdown eve nt takes place.
HC08 Full Chip Simulation Config uration Proc edure 264 Microco ntrolle rs Debugger Manua l CYCLES Command The CYCLES comman d changes the val ue of the cycle s counter. The cyc les counter counts the number of process or cycles that hav e passed d uring executi on.
HC08 Full Chip Simulation Configu ration Procedu re 265 Microc ontrollers Debugger M anual SHTDWN Command When you enable t he Shutdo wn pin in the High Reso lution PW M Control Re gister (HRPCTRL), you can us e this command to cha nge the stat e of the SHTDWN pin .
HC08 Full Chip Simulation Config uration Proc edure 266 Microco ntrolle rs Debugger Manua l Figure 11.1 5 Sim ulated P or t Inputs Dialog Box Using the Simulated Port Inputs d ialog box , the input value to any I/O port can be reconfigur ed. The INPUT S comman d can be use d to recon figure th e output values on any releva nt I/O port.
HC08 Full Chip Simulation Configu ration Procedu re 267 Microc ontrollers Debugger M anual INPUT<x> Command The INPUT<x> comm and sets the simulated input s to port <x>. The CPU reads this input value wh en port <x> is set as an inpu t port.
HC08 Full Chip Simulation Config uration Proc edure 268 Microco ntrolle rs Debugger Manua l Examp le >INPUTS Show I/ O port input values. External Interrupt Module In Full Chip Simula tion (FCS ) Mode, thi s option lets you simulate th e input, f lag polling and i nterrupt func tionality o f the Exter nal Interrupt ( IRQ) module.
HC08 Full Chip Simulation Configu ration Procedu re 269 Microc ontrollers Debugger M anual INPUTS Command In Full Chip Simulatio n and CPU-On ly Simulat ion mode, th e INPUTS comma nd opens the Sim ulated P ort Inp uts di alog bo x show n in Figur e 11.
HC08 Full Chip Simulation Config uration Proc edure 270 Microco ntrolle rs Debugger Manua l the INPUTS command to bring up the Simulated Port Inputs for all general I/O ports.
HC08 Full Chip Simulation Configu ration Procedu re 271 Microc ontrollers Debugger M anual INPUT<x> Command The INPUT<x> comm and sets the simulated input s to port <x>. The CPU reads this input value wh en port <x> is set as an inpu t port.
HC08 Full Chip Simulation Config uration Proc edure 272 Microco ntrolle rs Debugger Manua l Examp le >INPUTS Show I/ O port input values. Multi-Master Inte r-Integrate d Circuit Module In Full Chip.
HC08 Full Chip Simulation Configu ration Procedu re 273 Microc ontrollers Debugger M anual The MMIIC d ata inpu t/output lo g buffer simu lation al lows the user to gain a ccess to the past 25 6 MMIIC d ata byte s that ha ve been sh ifted in and out of the modul e.
HC08 Full Chip Simulation Config uration Proc edure 274 Microco ntrolle rs Debugger Manua l Multi-Master I nter-Integrated Circuit Module Comma nds The follo wing comma nds are av ailable for m ulti-master in ter-integrate d circuit manipul atio n.
HC08 Full Chip Simulation Configu ration Procedu re 275 Microc ontrollers Debugger M anual The next two data bytes read are 22 and 23. If the micropro cessor attemp ts to read anoth er byt e, it gets an $FF va lue f ollowed by a NACK sig nal (NACK be cause nothing re mains in the in put buffer).
HC08 Full Chip Simulation Config uration Proc edure 276 Microco ntrolle rs Debugger Manua l IICDO The IICDO com mand disp lays a wind ow, which shows dat a shifted in as well as shifted out of the IIC peripheral. An arro w is used to point to the last outp ut value transmitted/ received.
HC08 Full Chip Simulation Configu ration Procedu re 277 Microc ontrollers Debugger M anual FCSMSCAN08 Background and Assembly Example The MSCAN08 peripheral is a scalable co ntrol ar ea network (CAN) 2. 0 compl iant devic e that allo ws microcon trollers to exc hange da ta between themsel ves at high speeds.
HC08 Full Chip Simulation Config uration Proc edure 278 Microco ntrolle rs Debugger Manua l RomStart equ $8000 ; start of Flash1 for AZ60 VectorStart equ $FFCC ; start of Vectors for AZ60 $Include 'az60regs.
HC08 Full Chip Simulation Configu ration Procedu re 279 Microc ontrollers Debugger M anual db $02 ; Mess age 3 Length db $55 ; Data Byte 1 db $AA ; Data Byte 2 M3Desc_End: ****************************.
HC08 Full Chip Simulation Config uration Proc edure 280 Microco ntrolle rs Debugger Manua l lda 1,x ; get next byte in message address and #$E0 lsra lsra lsra lsra lsra ora CT0IDR0 sta CT0IDR0 lda 1,x.
HC08 Full Chip Simulation Configu ration Procedu re 281 Microc ontrollers Debugger M anual lda 7,x ; get the message data sta CT0DSR1 lda 8,x ; get the message data sta CT0DSR2 lda 9,x ; get the messa.
HC08 Full Chip Simulation Config uration Proc edure 282 Microco ntrolle rs Debugger Manua l and #$7F lsla sta CT1IDR2 lda 3,x ; get next byte in message address and #$80 rola rola ora CT1IDR2 sta CT1I.
HC08 Full Chip Simulation Configu ration Procedu re 283 Microc ontrollers Debugger M anual lda 1,x ; get next byte in message address and #$03 lsla ora CT2IDR1 sta CT2IDR1 lda 2,x ; get next byte in m.
HC08 Full Chip Simulation Config uration Proc edure 284 Microco ntrolle rs Debugger Manua l * after a RESET. * ************************************** ************************** MAIN_INIT: rsp ldhx #Pa.
HC08 Full Chip Simulation Configu ration Procedu re 285 Microc ontrollers Debugger M anual sta CRFLG ; rese t receive flag rti ************************************** ************************ * DUMMY_ISR - Dummy Interrupt Service Routine. * * Just does a return from interrupt.
HC08 Full Chip Simulation Config uration Proc edure 286 Microco ntrolle rs Debugger Manua l which g ive the addre sses of perip heral re giste rs on th e microc ontrolle r. Fol lowing th is comes the variabl e declaration s for pointers, cou nters, and bu ffers for the received d ata.
HC08 Full Chip Simulation Configu ration Procedu re 287 Microc ontrollers Debugger M anual Figure 11.26 CAN I N Display Inpu t packets can be ad ded by dou ble-clic king in the windo w where th e packet is to go or by selectin g the row fo r the packe t and clic king the OK button.
HC08 Full Chip Simulation Config uration Proc edure 288 Microco ntrolle rs Debugger Manua l Figure 11.2 8 CAN Example Input P ack et Once the DATA pack et information i s entered, the CANIN window loo ks as shown in Figu re 11.
HC08 Full Chip Simulation Configu ration Procedu re 289 Microc ontrollers Debugger M anual key to break the ex ecution. Now type the CANOUT comman d. Figu re 11 .31 sh ows the result, where all three outpu t packe ts are seen . Select the first p acket b y doubl e clicki ng on it.
HC08 Full Chip Simulation Config uration Proc edure 290 Microco ntrolle rs Debugger Manua l FCSMSCAN Commands You can us e the f ollowi ng FCSMSCAN command s with t he HC08 pr ocessor. CANCLR Command You can use the CA NCLR co mman d to flush the inp ut and output buffe rs for CAN simulation.
HC08 Full Chip Simulation Configu ration Procedu re 291 Microc ontrollers Debugger M anual Where <n > is the va lue to be entered in to the ne xt location in the inp ut buffer. Examp le >CANIN $55 Set the ne xt input CAN value to $55 >CAN Pull up t he data wind ow with al l the input p ackets.
HC08 Full Chip Simulation Config uration Proc edure 292 Microco ntrolle rs Debugger Manua l Figure 11.3 4 Memory Comp onent Windo w If the PIT interrupt is enabled, the FCS ju mps to an appropri ate subrou tine as long as the PIT in terrupt v ector is prop erly de fined.
HC08 Full Chip Simulation Configu ration Procedu re 293 Microc ontrollers Debugger M anual Figure 11.35 SCI IN Buffer Display SCI Data Outpu t Buffer simula tion allows the us er to gai n access t o the past 256 SCI da ta values transmitted out of th e module.
HC08 Full Chip Simulation Config uration Proc edure 294 Microco ntrolle rs Debugger Manua l The user can also observe diffe rent SCI fla gs in the Mem ory wind ow. If the mo dule is run in Flag Pollin g mode, poll t he flag corresp ondi ng to the expec ted SC I event .
HC08 Full Chip Simulation Configu ration Procedu re 295 Microc ontrollers Debugger M anual Synta x >SCDI [<n>] Where: <n> The value to be entered into the next locatio n in th e input bu ffer Examp le >SCDI $55 Set the ne xt input v alue to t he SCI to $55 >SCDI Pull up t he data wind ow with al l the inpu t values.
HC08 Full Chip Simulation Config uration Proc edure 296 Microco ntrolle rs Debugger Manua l Figure 11.39 SCI O UT Buffer D ispla y FCS Slave LIN In terface Controller Mod ule In FCS Mode , this modu l.
HC08 Full Chip Simulation Configu ration Procedu re 297 Microc ontrollers Debugger M anual Figure 11.4 0 SLIC IN Buff er Displa y Figure 11.4 1 SLIC Input Data Configuration Dia log Bo x The SLIC data output buffer simula tion allows th e user to gain access to the past 256 S LIC data by tes transmitted o ut of the m odule.
HC08 Full Chip Simulation Config uration Proc edure 298 Microco ntrolle rs Debugger Manua l After the sim ulated SLIC in put is receiv ed, the fi rst queued-in packet is passe d from th e data buffer into the corresponding S LIC module registers. It can be observed in the Memory Window b y displa ying the appr opri ate regist er loc ation the re.
HC08 Full Chip Simulation Configu ration Procedu re 299 Microc ontrollers Debugger M anual Examp le >SLCCLR Clear input and output buffer fo r SLC simulation SLCDI C ommand The SLCDI co mmand is used to simulate SLIC inpu t packets. T he first inpu t must be o f type “identi fier.
HC08 Full Chip Simulation Config uration Proc edure 300 Microco ntrolle rs Debugger Manua l SLCO UT Co mman d The SL COUT c ommand displa ys the o utput b uffer from the SLIC. A w indow is ope ned that shows a ll the data that the SLIC h as shifted out , in either Byt e Transfer or SL IC Mode.
HC08 Full Chip Simulation Configu ration Procedu re 301 Microc ontrollers Debugger M anual Figure 11.4 6 SPI IN Buff er Displa y SPI data output bu ffer simulation allows the u ser to gain access to the past 256 SPI d ata values transmitted out of th e module.
HC08 Full Chip Simulation Config uration Proc edure 302 Microco ntrolle rs Debugger Manua l int erru pts ar e en able d, th e FCS jum ps to a n ap propri at e sub rout ine as lon g as t he S PI channel in terrupt vectors are properl y defined. To simulate the frequ ency of the SPI slav e input clock, use th e SPFREQ <n> command.
HC08 Full Chip Simulation Configu ration Procedu re 303 Microc ontrollers Debugger M anual Synta x >SPDI [<n>] Where: <n> The value to be entered into the next locati on in th e input bu ffer Examp le >SPDI $55 Set the ne xt input v alue to t he SPI to $ 55 >SPDI Pull up t he data wind ow with al l the inpu t values.
HC08 Full Chip Simulation Config uration Proc edure 304 Microco ntrolle rs Debugger Manua l Figure 11.50 SPI O UT Buffer Di spla y SPFRE Q Comman d The SPFREQ comm and lets the user set the frequency of the SPI slave inpu t clock.
HC08 Full Chip Simulation Configu ration Procedu re 305 Microc ontrollers Debugger M anual • Flag p olling • Int errupt enable d mode o f opera tion. FCS mod e uses th e simu late d port inputs to t rigg er the i nput captur e on a given time r channel.
HC08 Full Chip Simulation Config uration Proc edure 306 Microco ntrolle rs Debugger Manua l If the Timer module is con figured for an Ou tput Compare event, once the event takes place the same CHxF Flag can be observed vi a the Memory win dow.
HC08 Full Chip Simulation Configu ration Procedu re 307 Microc ontrollers Debugger M anual FCS Timer Interface Module Commands The following F CS timer int erface module co mmands are av ailable fo r use with the HC0 8 processor. CYCLES Command The CYCLES comman d changes the v alue of the cycle s counter.
HC08 Full Chip Simulation Config uration Proc edure 308 Microco ntrolle rs Debugger Manua l INPUT<x> Command The INPUT <x> command sets the si mulated inp uts to po rt <x>. The CPU reads thi s input value wh en port <x> is set as an inpu t port.
HC08 Full Chip Simulation Configu ration Procedu re 309 Microc ontrollers Debugger M anual Synta x >INPUTS Examp le >INPUTS Show I/ O port input values. FCS Universal Serial B us (USB) Module Some of the microcon trollers in the MC68HC08 family cont ain USB complia nt peripheral devices.
HC08 Full Chip Simulation Config uration Proc edure 310 Microco ntrolle rs Debugger Manua l ; (C)opyright P&E Microcomputer System s, 2005 ; ; You may use this code freely as long as this copyright notice ; and website address is included. Vis it us at www.
HC08 Full Chip Simulation Configu ration Procedu re 311 Microc ontrollers Debugger M anual * The following des criptors give the information to the PC what type of * USB device this is and what its capa bilities are. They are retrieved * during the configuration phase.
HC08 Full Chip Simulation Config uration Proc edure 312 Microco ntrolle rs Debugger Manua l db $03 ; Clas s Code (HID) db $00 ; Subc lass Code db $00 ; Prot ocol Code db $00 ; Inde x to String Descrip.
HC08 Full Chip Simulation Configu ration Procedu re 313 Microc ontrollers Debugger M anual db $26,$FF,$00 ; Logi cal Maximum ($FF) db $75,$08 ; Repo rt Size (8 bits) db $95,$01 ; Repo rt Count (1 fiel.
HC08 Full Chip Simulation Config uration Proc edure 314 Microco ntrolle rs Debugger Manua l ldhx #0 ; clea r H:X pointer lda wValueH ; chec k which descriptor is wanted cbeqa #$1,GETDEVDESC ; is i t d.
HC08 Full Chip Simulation Configu ration Procedu re 315 Microc ontrollers Debugger M anual cpx #8 ; all descriptors more than 8 bytes bne GETREPDESC ldhx #RDesc_End ; stor e end location of the descri.
HC08 Full Chip Simulation Config uration Proc edure 316 Microco ntrolle rs Debugger Manua l ldhx #8 SAVE_SETUP: lda {UE0D0-1},x ; save data to array sta {Setup_packet-1},x ; Setu p_packet holds info d.
HC08 Full Chip Simulation Configu ration Procedu re 317 Microc ontrollers Debugger M anual sthx buffptr ; save index to data buffer ldhx descptr ; is i t last descriptor byte? cphx descendptr beq LAST.
HC08 Full Chip Simulation Config uration Proc edure 318 Microco ntrolle rs Debugger Manua l cli ; Allo w interrupts to happen main_loop: bra main_loop ************************************** ************************ * USB_ENDP_ISR - USB Endpoint Interrup t Service Routine.
HC08 Full Chip Simulation Configu ration Procedu re 319 Microc ontrollers Debugger M anual rti ************************************** ************************ * USB_SYS_ISR - USB System Interrupt S ervice Routine. * * Interrupts here if USB sus pend, resume, reset, * * config_chg, start of frame , or setup event * * occurs.
HC08 Full Chip Simulation Config uration Proc edure 320 Microco ntrolle rs Debugger Manua l * Vectors - Specifying Reset and USB I nterrupt Routines * ************************************** **********.
HC08 Full Chip Simulation Configu ration Procedu re 321 Microc ontrollers Debugger M anual In the FLASH, the descri ptor tables are crea ted, which describe the type of USB d evice, the configurat ion, the interface, HID specific informat ion, the end points, and report ing information .
HC08 Full Chip Simulation Config uration Proc edure 322 Microco ntrolle rs Debugger Manua l Now we can use the USBIN co mmand to speci fy USB packets tha t come across the USB bus from the h ost. When a u ser types th is command i n the simul ator, the USB IN w indow appears a s shown in Figure 11.
HC08 Full Chip Simulation Configu ration Procedu re 323 Microc ontrollers Debugger M anual To replic ate this sta ge in the sim ulator, enter th e SETUP p acket as show n in Figur e 11.5 6 and the DATA0 p acket as shown in Figure 11.58 , using the USBIN command.
HC08 Full Chip Simulation Config uration Proc edure 324 Microco ntrolle rs Debugger Manua l Figure 11.5 7 USB P acke t Exchange Dia gram.
HC08 Full Chip Simulation Configu ration Procedu re 325 Microc ontrollers Debugger M anual Figure 11.5 8 USB P acke t Setup Full Figure 11.59 USB IN Data Buffer Figure 11.
HC08 Full Chip Simulation Config uration Proc edure 326 Microco ntrolle rs Debugger Manua l Figure 11.62 USB OUT Buffer Notice in Fig ure 11.63 the DATA0 pack et output during the da ta stage. This packet contai ns the data found in the devi ce de scriptor ta ble in the code.
HC08 Full Chip Simulation Configu ration Procedu re 327 Microc ontrollers Debugger M anual Figure 11.64 USB IN Buffer Figure 11.65 USBOUT Buffe r Now th at we have gone thr ough this devi ce de scripto r exch ange, the ho st has a n idea of what typ e of USB sla ve device i t is, an d next needs to gi ve it an address.
HC08 Full Chip Simulation Config uration Proc edure 328 Microco ntrolle rs Debugger Manua l Figure 11.66 Set Ad dress P acket Exc hange USB Commands The following US B commands are av ailable for us e with the HC08 proce ssor. USBCLR Command Use the USBCLR comma nd to flush the input and o utput buffers fo r USB simulation.
HC08 Full Chip Simulation Configu ration Procedu re 329 Microc ontrollers Debugger M anual USBIN Command The USBIN command al lows the user to create packe ts for input into the USB. If y ou specify pa cket pa rameters, t his comma nd places the packet int o the next sl ot in the USB input buf fer.
HC08 Full Chip Simulation Config uration Proc edure 330 Microco ntrolle rs Debugger Manua l Figure 11.67 USB IN Buffer Displa y USBOUT Command The U SBOUT comman d disp lays the output buffe r from the USB . A w indow is opene d that shows all the data th at the USB has shifte d out.
HC08 Full Chip Simulation Configu ration Procedu re 331 Microc ontrollers Debugger M anual USBRESET Command The USB RESET comma nd simulates a US B reset from the USB c onnection. If the URSTD bit is clear in the CONFIG register, then a reset of the MCU occurs just as with a RESET comman d.
HC08 Full Chip Simulation Config uration Proc edure 332 Microco ntrolle rs Debugger Manua l.
333 Microc ontrollers Debugger M anual 12 MON08 Interface Connection The MON08 connection setting perm its a conn ection to Cla ss 1-4 device s. Refer to th e descriptions below for a definition of e ach interface clas s.
MON08 Interface Connection Conne ction Procedu re 334 Microco ntrolle rs Debugger Manua l Figure 12.2 P&E Connection Manager Win dow - Co nnect to T arget T ab 3. Acc ess th e Inte rface Se lect ion dial og box by c lic king t he Ad d A Connection b utton in the Conn ection Manage r windo w’s - Conne ct Ta rget Ta b.
MON08 I nterface Connect ion Conne ction Procedu re 335 Microc ontrollers Debugger M anual 4. Defi ne th e proper communi catio n por t and baud rate settin g in the Co nnect ion Manager . 5. To remove a pre-co nfigured MON08 Interface connecti on, proceed t o th e Remove section of t he connectio n manager.
MON08 Interface Connection Conne ction Procedu re 336 Microco ntrolle rs Debugger Manua l for a short time after th e supply has been switched off, but the sup ply voltage m ust reach less than 0.1 v before it is turned back on if a Power-On reset is to occur .
MON08 I nterface Connect ion Conne ction Procedu re 337 Microc ontrollers Debugger M anual Power Up and Power Down Radio Bu ttons This is the default op tion and work s for most, if not all, ICS 08/Target Bo ard solutions. It requir es the user go throug h two dial og box st ages, and requires more time t han simpl y cycl ing the power .
MON08 Interface Connection Conne ction Procedu re 338 Microco ntrolle rs Debugger Manua l Turn Target Power Off and Leave Target Power On Radio Buttons This option works for many ICS boards as well , .
MON08 I nterface Connect ion Conne ction Procedu re 339 Microc ontrollers Debugger M anual Figure 12.8 P&E Con nection Ma nager Windo w - MON08 1 6-Pin Header Signals T ab The MON08 16-Pin Hea der.
MON08 Interface Connection Conne ction Procedu re 340 Microco ntrolle rs Debugger Manua l STATUS Area The s tatus area o f the MO N08 16 -Pin He ader Si gnal s tab consists of on e stat us str ing following th e Status: label, an d seven i tems which list th e state of th e last attempt t o connect to a targe t and pass secu rity.
MON08 I nterface Connect ion Conne ction Procedu re 341 Microc ontrollers Debugger M anual – The part did not star t the mon itor mode secu rity c heck on r eset . Si gnals t o fo rce monit or mode ma y be incor rect . – The baud rate speci fied was incorrect .
MON08 Interface Connection Conne ction Procedu re 342 Microco ntrolle rs Debugger Manua l • 6 – R OM is accessibl e (un-secure d): If the device properly entered monitor mod e (4), the software reads locations $FFF6- $FFFF to de termine if the pro cessor pass es the security che ck.
MON08 I nterface Connect ion Conne ction Procedu re 343 Microc ontrollers Debugger M anual Advanced Programming/Debug Options The Advan ced Progr amming/ Debug Opt ions menu entry takes you t o the Advan ced Options dial og box, w here you can confi gure the softwa re settings for the Flash prog rammin g proc edur e.
MON08 Interface Connection Conne ction Procedu re 344 Microco ntrolle rs Debugger Manua l NOTE The Non- Volatile Mem ory Preserva tion and Custom Tr im functio nality are only avai lable for the M68HCS08 d evices, and as such these op tions are disa bled for al l M68H C08 device s.
MON08 I nterface Connect ion Conne ction Procedu re 345 Microc ontrollers Debugger M anual View Register Fil es Option The Vie w Register Files menu optio n also gi ves th e user t he option of run ning t he regi ster file viewer/edi tor.
MON08 Interface Connection Devic e Clas s Descri ption 346 Microco ntrolle rs Debugger Manua l Device Class Desc ription The followin g device info rmation summ arizes the diffe rent class es of boards avail able to the user. Deta iled informat ion abou t specific de vices is avai lable from Frees cale.
MON08 I nterface Connect ion Devi ce Clas s Desc riptio n 347 Microc ontrollers Debugger M anual mode check and access the Flash o n the pro cessor. A simple re set is not enoug h; to pass the security check, you must first force the processo r to encounter a POR (power-on reset) which r equire s that the pro cessor's v oltage dip belo w 0.
MON08 Interface Connection Devic e Clas s Descri ption 348 Microco ntrolle rs Debugger Manua l.
349 Microc ontrollers Debugger M anual 13 ICS MON08 Interface Connection ICS Mode In-Circuit Si mulation (ICS) Mode is a P &E Microc omputer Syste ms mode of operation that is a h ybrid between In-Circuit Debu gging, and Full Chip simulation.
ICS MON08 Interface Connection Conne ction Procedu re 350 Microco ntrolle rs Debugger Manua l Connection Procedure To select the ICS MON08 In terface connection: 1. Choos e the ICS M ON08 Interface optio n from the set connect ion dialo g box, as shown in Figure 13.
ICS M ON08 In terface Co nnection Conne ction Procedu re 351 Microc ontrollers Debugger M anual 3. Access t he Interface Sel ection Man ager assistant by clickin g on the Add A Connection button in th e P&E Con nection M anager Window ( Figu re 13.
ICS MON08 Interface Connection Conne ction Procedu re 352 Microco ntrolle rs Debugger Manua l Advanced Settin gs Tab The P&E Con nection Mana ger wind ow’s Advan ced Setti ngs tab allows the user to set specific protocol settin gs. The foll owing is a n explana tion of each part of th e advanced settings tab.
ICS M ON08 In terface Co nnection Conne ction Procedu re 353 Microc ontrollers Debugger M anual Target Has RESET Button In Class III boards, t he software occasionally needs to get control of the target. For a detailed definition of bo ard clas ses, see Device Class Description .
ICS MON08 Interface Connection Conne ction Procedu re 354 Microco ntrolle rs Debugger Manua l Figure 13.5 P o wer Down Dialog Bo x 3. Software autom atically powers up the IC S, whic h conf igures the pr ocess or’s MO N08 config uration pins . 4. Soft ware asks t he user to po wer up the board as foll ows: Figure 13.
ICS M ON08 In terface Co nnection Conne ction Procedu re 355 Microc ontrollers Debugger M anual Serial Port Stop Bits Seri al Po rt Stop Bits al low us ers of C lass 1- 4 devi ces th at ar e exper ienci ng unr elia ble communi cation to in crease the nu mber of stop b its to 2.
ICS MON08 Interface Connection Conne ction Procedu re 356 Microco ntrolle rs Debugger Manua l This status indicates whether or not the first echo ed character fro m the hardware loopback was receiv ed when on e of the security by tes was tran smitted.
ICS M ON08 In terface Co nnection Conne ction Procedu re 357 Microc ontrollers Debugger M anual check was suc cessfully pass ed. If a break charact er is not received from the processor, this flag returns an ‘N’. Reasons for this include: – The baud rate speci fied was incorrect .
ICS MON08 Interface Connection Conne ction Procedu re 358 Microco ntrolle rs Debugger Manua l Active Mode Co nnectio n Menu Opt ions When the microp rocessor is con nected, more Connecti on menu entr ies beco me availabl e to the u ser.
ICS M ON08 In terface Co nnection Conne ction Procedu re 359 Microc ontrollers Debugger M anual Prompt on Flash Program Checkbox Checking Always Erase a nd Progr am Fl ash witho ut aski ng lets the software transparen tly program the microproces sor.
ICS MON08 Interface Connection Conne ction Procedu re 360 Microco ntrolle rs Debugger Manua l Figure 13.1 0 PR OG08SZ Pr ogrammer Windo w View Register Files Option The Vie w Register Files me nu opti on also give s the us er the opt ion of r unning the re gister file viewer/edito r.
ICS M ON08 In terface Co nnection Devi ce Clas s Desc riptio n 361 Microc ontrollers Debugger M anual Figure 13.1 2 Timer Inte rface Module Register Listing Selecting a file brin gs up the Reg ister Window (see Fi gure 13 .13 ), which disp lays the values and si gnificance for each bit in the regi ster.
ICS MON08 Interface Connection Devic e Clas s Descri ption 362 Microco ntrolle rs Debugger Manua l Class 2 Device ICS Board withou t processor, connect ed to the user’s microp rocessor syst em via MON08 Cable . In th is con figur atio n, ther e is no processo r resi dent in any of t he sock ets of t he ICS board it self.
ICS M ON08 In terface Co nnection Devi ce Clas s Desc riptio n 363 Microc ontrollers Debugger M anual Figure 13.1 4 Reset Conne ction In this con figuration, b ecause the software does not d irectly cont rol power to the processo r, the user i s prompt ed to tu rn the pr ocessor' s power supp ly on a nd off.
ICS MON08 Interface Connection Devic e Clas s Descri ption 364 Microco ntrolle rs Debugger Manua l.
365 Microc ontrollers Debugger M anual 14 HC08 P&E Multilink/Cyclone Pro Connection The HC08 P &E Multilink /Cyclone Pro Connecti on setting pe rmits a connectio n to Cla ss 5, 7 or 8 de vices. See Device Class Description for a definiti on of each inte rface class.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 366 Microco ntrolle rs Debugger Manua l Figure 14.2 P&E Connection Manager Wind ow - Connec t to T ar get T ab 4.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 367 Microc ontrollers Debugger M anual 7. To ad d a serial/par allel port P&E devi ce such as Cy clone Pro Serial, MON0 8 Mult.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 368 Microco ntrolle rs Debugger Manua l Advanced Settin gs Tab The Advan ced Setting s tab of the P&E Co nnection Ma nager window allo ws the user to set specific protocol settin gs.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 369 Microc ontrollers Debugger M anual Target Has RESET Button Checkbox With Class III boards, th e software occasionally needs to get control of the target.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 370 Microco ntrolle rs Debugger Manua l 3. Software autom atically powers up the IC S, whic h configu res the pr ocess or’s MON 08 config uration pins . 4. Soft ware asks t he user to po wer up the board as foll ows: Figure 14.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 371 Microc ontrollers Debugger M anual Pulse IRQ on Stop The IRQ on Stop allo ws the users to execute a me chanism t o stop a runni ng HC08 microprocessor. For more information, r efer to the Stop a Runn ing HC 908 Tar get.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 372 Microco ntrolle rs Debugger Manua l monitor mo de communic ations regardle ss of the sec urity status. As long as the Baud and Port are correc t, and the devi ce has been pro perly powered, monitor mod e entry is allowed.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 373 Microc ontrollers Debugger M anual – No Power to the ICS. If this status bit retu rns an ‘N’, you must correct this before analyzing the rest of the status bits .
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 374 Microco ntrolle rs Debugger Manua l – The pr ocess or did not p ower al l the way do wn becaus e powe r was bein g supplie d to the pro cessor through e ither the po rt pins, IRQ li ne, RESET lin e, or power pins.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 375 Microc ontrollers Debugger M anual Figure 14.1 3 HC08 De vice Extended M enus Connect Option The Connect option initi ates an attem pt to communi cate with the devi ce chosen under the device sec tion of t he menu.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 376 Microco ntrolle rs Debugger Manua l Advanced Programming/Debug Options The Advanced Programm ing/Debug Options menu entry open s the Advan ced Options dialog bo x, where you can conf igure sof tware se ttings for t he FLASH p rogrammi ng procedure.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 377 Microc ontrollers Debugger M anual NOTE The Non- Volatile Mem ory Preserva tion and Custom Tri m functiona lity are only avai lable for the M68HCS08 devices, and as such these op tions are disa bled f or al l M68H C08 device s.
HC08 P&E Multilink/Cyclone Pro Connection Conne ction Procedure 378 Microco ntrolle rs Debugger Manua l View Register Files Option The View Registe r Files menu select ion al so gives t he user th e optio n of runni ng the register file viewer/edito r.
HC08 P&E Multilink/ Cyclone P ro Connection Conne ction Procedure 379 Microc ontrollers Debugger M anual Debugging Limitat ions The follo wing limitati ons are inhe rent in MON08 d ebugging. Ob serve these restrictions carefully. 1. Do n ot st ep a co mmand that b ranches to i tself.
HC08 P&E Multilink/Cyclone Pro Connection Devic e Clas s Descri ption 380 Microco ntrolle rs Debugger Manua l Device Class Desc ription The followin g device info rmation summ arizes the diffe rent class es of boards avail able to the user. Deta iled informat ion abou t specific de vices is avai lable from Frees cale.
381 Microc ontrollers Debugger M anual 15 HC08 ICS P&E Multilink/ Cyclone Pro Connections In-Circuit Si mulation (ICS) Mode is a P &E Microc omputer Syste ms mode of operation that is a hybrid be twee n In-Cir cuit De buggin g and Fu ll Chip simul ation .
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 382 Microco ntrolle rs Debugger Manua l Connection P rocedure 1. Choose t he ICS P&E Multilink /Cyclone Pr o option fr om the set connectio n dialo g box, as sh own in Figu re 15.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Conne ction Procedure 383 Microc ontrollers Debugger M anual 3. The dev ice power selec tion in the Power/Clock De tails area allo ws the user to sp.
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 384 Microco ntrolle rs Debugger Manua l Figure 15.5 Remo ve A Man uall y Configured Mu ltilink/Cyc lone Pr o Interface Advanced Settin gs Tab The Advan ced Setting s tab of the P&E Co nnection Ma nager window allo ws the user to set specific protoc ol settings.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Conne ction Procedure 385 Microc ontrollers Debugger M anual Tpu and Tpd Timing Textboxes Tpu and Tpd set t he power-u p and po wer-down de lay (re spectivel y) that is observed wh en power-cyclin g a target for entry in to Monit or Mode.
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 386 Microco ntrolle rs Debugger Manua l Power Up/Down Radio Bu ttons Power Down I CS prompt s the user to powe r down the bo ard. Power Up ICS prompts the user to po wer up th e boa rd.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Conne ction Procedure 387 Microc ontrollers Debugger M anual Cycle Power Up/ Down Radio Buttons Cycle Power ICS asks the user to power cycle the bo ard.
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 388 Microco ntrolle rs Debugger Manua l ‘N’, which indi cates that the character was no t receive d, it is most li kely due to one of the following reason s: – Wrong Com Port sp ecified.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Conne ction Procedure 389 Microc ontrollers Debugger M anual check was suc cessfully pass ed. If a break charact er is not receiv ed from the processor, this flag returns an ‘N’. Reasons for this include: – The baud rate speci fied was incorrect .
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 390 Microco ntrolle rs Debugger Manua l Active Mode Menu Options When the microp rocessor is connecte d, more Connect ion menu op tions becom e availa ble to the u ser. Figure 15.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Conne ction Procedure 391 Microc ontrollers Debugger M anual Prompt on Flash Program Checkbox Checking Always Erase a nd Progr am Fl ash witho ut aski ng in this dialog b ox lets the software transpa rently progra m the microproc essor.
HC08 ICS P&E Multilink/Cyclone Pro Connections Conne ction Procedure 392 Microco ntrolle rs Debugger Manua l Figure 15.1 2 PR OG08SZ Pr ogrammer Windo w View Register Files Option The View Registe r Files menu select ion al so gives t he user th e optio n of runni ng the register file viewer/edito r.
HC08 ICS P&E M ultilink/Cyclone Pro Connections Devi ce Clas s Desc riptio n 393 Microc ontrollers Debugger M anual Figure 15.1 4 Timer Inte rface Module Register Listing Selecting a file brin gs up the Reg ister Window (see Fi gure 15 .15 ), which disp lays the values and si gnificance for each bit in the regi ster.
HC08 ICS P&E Multilink/Cyclone Pro Connections Devic e Clas s Descri ption 394 Microco ntrolle rs Debugger Manua l Class 8 Device P&E’s Cyclon e Pro communic ates with the PC thro ugh a Serial, Et hernet or USB port.
395 Microc ontrollers Debugger M anual 16 SofTec HC08 Connection This sectio n guides you through the first steps toward d ebugging wi th the Co deWarrior IDE and the SofTec H C08 connec tion. It do es not rep lace all t he addi tional docume ntation provide d in thi s manual , but g ives you a go od sta rtin g point.
SofTec HC08 Conn ection Using the Statio nery Wizard 396 Microco ntrolle rs Debugger Manua l Using the Stationery Wiz ard To take the first steps toward debugging with the CodeWa rrior IDE and the SofTec inDART-HC08 usin g the statione ry Wizard: 1. Ru n the Code Warri or IDE with the sho rtcut cr eated in th e program g roup.
SofTec HC08 Conn ection From Withi n an Existin g Project 397 Microc ontrollers Debugger M anual From With in an Existi ng Projec t To take the first st eps toward debugging with th e CodeWarrior IDE and setting the SofTe c HC08 conn ection fro m within an existing d ebuggin g project: 1.
SofTec HC08 Conn ection From Wit hin an Existing Project 398 Microco ntrolle rs Debugger Manua l Figure 16.3 MCU Configuratio n Dialog Bo x 8. Press the OK bu tton to start debugging . inDart-HC 08 Menu O ptions Once the SofTec HC0 8 connectio n is set, the connectio n menu en try in the d ebugger main toolba r is inDART-HC08 .
SofTec HC08 Conn ection From Withi n an Existin g Project 399 Microc ontrollers Debugger M anual About Option Select the inDART-HC08 > Abou t optio n to display the About Dia log Box . MCU Configu ration Dialo g Box You can ex pand th e Hard ware Model list menu to select an othe r type of d ebug inte rfac e than the SofTec i nDART-HC08.
SofTec HC08 Conn ection From Wit hin an Existing Project 400 Microco ntrolle rs Debugger Manua l Figure 16.6 Comm unication Setti ngs Dialog Bo x NOTE If your hard ware supports stoppin g the applicati on while runnin g, an additio nal interrupt serv ice routine is requir ed for the IRQ vector.
401 Microc ontrollers Debugger M anual 17 HC08 FSICEBASE Emulator This chapt er is intended fo r develope rs, testers, ap plication engineers , and anyon e interested in using the Freescale I n-Circuit Emulato r Base (FSICE BASE) develo pment system.
HC08 FSICEBASE Emula tor FSICEBASE Overview 402 Microco ntrolle rs Debugger Manua l System Requireme nts The FSICEBASE syst em requires a host computer with t he following min imum specifications: •.
HC08 FSICEBASE Em ulator FSICEBASE Overview 403 Microc ontrollers Debugger M anual – 24 ge neral-pu rpose logic cli ps, f ive of wh ich ca n be us ed to t rigger th e bus state analyz er sequencer .
HC08 FSICEBASE Emula tor FSICEBASE Overview 404 Microco ntrolle rs Debugger Manua l clock, an oscilla tor, or any other circuit r y that y ou might use to perform analysis. One end of each cable assembl y has a molded con nector, which fits into the FSICEBASE.
HC08 FSICEBASE Em ulator Setting Up the FSICEBA SE System 405 Microc ontrollers Debugger M anual Setting Up the FSICEBASE System The Freescal e In-Circuit Emulat or Base (FSICEBASE) develop ment system inclu des cables and so ftware. You need to connect the ca bles a nd install t he software in order to us e the FSICE BASE.
HC08 FSICEBASE Emula tor Setting Up the FSICEBASE System 406 Microco ntrolle rs Debugger Manua l c. Conn ect oth er end of USB cable to ho st computer NOTE The host compu ter (PC) must have an assigned IP address and sub net mask that matches the FSICEBA SE.
HC08 FSICEBASE Em ulator Establis hing Co mmunica tion 407 Microc ontrollers Debugger M anual Establishing Communi cation The Freescal e In-Circuit Emul ator Base (FSICEBASE ) allows you to co nnect t.
HC08 FSICEBASE Emula tor Establis hing Commun ication 408 Microco ntrolle rs Debugger Manua l Figure 17.1 Comm unication Dial og Bo x 7. Sel ect TCP/IP 8.
HC08 FSICEBASE Em ulator Setting Up the System 409 Microc ontrollers Debugger M anual 4. Fr om debu gger main me nu, sel ect FSICEBASE-HC08 5. Sel ect Communica tion — Communica tion dial og box ap pears ( Figu re 17 .1 ) 6. Sel ect USB 7. Cl ick OK The debugg er connects to the FSICE BASE through the US B port.
HC08 FSICEBASE Emula tor Setting Up the System 410 Microco ntrolle rs Debugger Manua l 4. Select appropriat e processor from Proce ssor drop-dow n menu 5. Sel ect appropri ate connecti on . To specify the FSICEBASE as the conn ection, select FSICE e mulator .
HC08 FSICEBASE Em ulator Setting Up the System 411 Microc ontrollers Debugger M anual 3. Sel ect Communica tion — The FSICE Co mmuni cation di alog box opens ( Figure 17.
HC08 FSICEBASE Emula tor Setting Up the System 412 Microco ntrolle rs Debugger Manua l The debu gger sa ves the com municat ion inf ormatio n that yo u specif ied. It u ses the communica tion inform ation the ne xt time tha t it connects to the FSI CEBASE.
HC08 FSICEBASE Em ulator Setting Up the System 413 Microc ontrollers Debugger M anual Figure 17.4 FSICEB ASE Configuratio n Utility Windo w 3. Click Conn ect to FSI CEBA SE butto n — FSICEBASE Communicat ion dialo g box appear s, a s show n in Figure 1 7.
HC08 FSICEBASE Emula tor Specify ing a Memory M ap 414 Microco ntrolle rs Debugger Manua l 9. If applicab le, in Default Gateway text box , type the IP addr ess that you wan t the FSICEBASE to use as th e gateway to conne ct to a ne twork.
HC08 FSICEBASE Em ulator Specifyi ng a Mem ory Map 415 Microc ontrollers Debugger M anual If an EM is c onnected to the FSICEBASE, the CodeWa rrior IDE software auto matically loads the d efault personal ity file that cor responds to the EM.
HC08 FSICEBASE Emula tor Specify ing a Memory M ap 416 Microco ntrolle rs Debugger Manua l To Modify a Me mory Map: 1. Start the debugger — the True-time Simulator & Real-time Debugger window appears. 2. Fr om debu gger main me nu, sel ect FSICEBASE-HC08 The F SICEBA SE-H C08 m enu is bet ween t he Ru n me nu and the Compo nent m enu.
HC08 FSICEBASE Em ulator Specifyi ng a Mem ory Map 417 Microc ontrollers Debugger M anual 5. To delete an existi ng range : a. From Me mory list bo x, select po rtion of m ap to de lete b. Click Delete 6. To S ave the def inition s of the me mory map t hat you specified : a.
HC08 FSICEBASE Emula tor Specify ing a Memory M ap 418 Microco ntrolle rs Debugger Manua l Figure 17.8 T ar get Signals Dialog Box 4. Specify clo ck sour ce. F rom MCU Clock sectio n of dial og box, sel ect whet her the clock is con nected ex ternally , on a conne cted emul ator modu le (EM), or FSICE Gener ated.
HC08 FSICEBASE Em ulator Settin g Up Logic Cables and Connector s 419 Microc ontrollers Debugger M anual Emulation System Res et The debu gger allo ws you t o reset the em ulation MCU and set the PC reg ister to the contents o f the reset vector. To reset the FSICEBASE: 1.
HC08 FSICEBASE Emula tor Setting U p Logic Cables an d Connecto rs 420 Microco ntrolle rs Debugger Manua l use th is sour ce, make t he des ired clo ck conn ection to the white p robe tip and use t he OSC command t o select an extern al sour ce. Pod B pin 17 is the external timetag inp ut for the bus stat e analyze r.
HC08 FSICEBASE Em ulator Bus State Ana lyzer (BSA) 421 Microc ontrollers Debugger M anual Bus State Analyzer (BSA) The bus state ana lyzer (BSA) show s the logica l state of the target MCU bus. The BSA takes a snapsho t of the MCU bu s. It also captu res the signal s from the logic cl ips of Pods A, B, an d C of the F SICEBASE (24 lines in total).
HC08 FSICEBASE Emula tor Bus State Analyzer (BSA) 422 Microco ntrolle rs Debugger Manua l To define an ev ent: 1. St art the debugger 2. Load the p rogra m to de bug a. If you launc hed the d ebugg er fr om a proj ect in the Co deWarr ior IDE, the debugge r automatically loads the prog ram ( .
HC08 FSICEBASE Em ulator Bus State Ana lyzer (BSA) 423 Microc ontrollers Debugger M anual 5. Sel ect Term or Range A range co nsists of t wo 32-bit values.
HC08 FSICEBASE Emula tor Bus State Analyzer (BSA) 424 Microco ntrolle rs Debugger Manua l Recording Modes When you define an eve nt, you can specify t he record ing mo de th at the Bus Sta te Analyzer us es to collec t data. This section explai ns how the different modes work.
HC08 FSICEBASE Em ulator Bus State Ana lyzer (BSA) 425 Microc ontrollers Debugger M anual D occurs, the sequen cer starts agai n looking for event A.) Data storage ends after t he specif ied nu mber of post-t rigg er cycl es. If you select this mod e, you must en able even ts A, B, and C.
HC08 FSICEBASE Emula tor Bus State Analyzer (BSA) 426 Microco ntrolle rs Debugger Manua l • External Selects the ext ernal cl ock • Custom se lects the pr ogrammable c lock. • Bus C lock selec ts the emul ator clo ck, the bus cl ock of the emulati ng MCU.
HC08 FSICEBASE Em ulator Bus State Ana lyzer (BSA) 427 Microc ontrollers Debugger M anual 3. To change th e kinds of data and the w ay that data is d isplaye d: a.
HC08 FSICEBASE Emula tor Bus State Analyzer (BSA) 428 Microco ntrolle rs Debugger Manua l.
429 Microc ontrollers Debugger M anual Book III - HCS08 Debug Connections Book III Conten ts Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the enviro nment .
Book III Co ntents 430 Microco ntrolle rs Debugger Manua l.
431 Microc ontrollers Debugger M anual 18 HCS08 Full Chip Simulation Full Chip Si mulation (FCS) do es not involve real in put and output. Beca use of this, it does not require a t arget devic e to be conn ected to your PC.
HCS08 Full Chip Si mulation Config uration Proc edure 432 Microco ntrolle rs Debugger Manua l Conn ectio n (HCS 08FC S) Menu Once you ha ve cho sen Full Chip S imulatio n as yo ur debu gger c onnectio n, th e name of the Conn ection menu is update d and additio n opti ons are added.
HCS08 Full Chip Simulat ion Configu ration Procedu re 433 Microc ontrollers Debugger M anual Device Option The Device selection o f the HCS08F CS menu allo ws the user to se lect the pa rticular Free scal e pro ces sor t hat they wish to u se.
HCS08 Full Chip Si mulation Config uration Proc edure 434 Microco ntrolle rs Debugger Manua l initiali zation doe s not apply to a reset command. W hen you ch ange thi s optio n, the new state take s effect the next time you start HiWav e (or switch Device Mo de/De bug Target).
HCS08 Full Chip Simulat ion Peripheral Modules Command s 435 Microc ontrollers Debugger M anual Figure 18.6 Registe r Windo w Peripheral Modu les Commands If you select a devi ce (see Device Option ), the HCS0 8FCS Menu disp lays a l ist of peripheral mo dules and the associated commands for the device y ou have cho sen.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 436 Microco ntrolle rs Debugger Manua l ADC Module In Full Chip Simulatio n (FCS), this mod ule simulate s all fun ctionality of the Analo g .
HCS08 Full Chip Simulat ion Peripheral Modules Command s 437 Microc ontrollers Debugger M anual When the convers ion is complete, t he FCS sets the appro priate flag. If interrupt s are enabled, the Progra m Counter changes flow to th e interrupt routine (a s defined in the vector space of the MCU).
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 438 Microco ntrolle rs Debugger Manua l Examp le >ADCLR Clear the input buffer for ADC simulation.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 439 Microc ontrollers Debugger M anual Figure 18.1 1 Freque ncy Displ ay Once the ICG is properly config ured, the user can m onitor the status of the PLL by polli ng the correspondin g flag.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 440 Microco ntrolle rs Debugger Manua l speed of simula tion; it does, howe ver, affect the ratio i n which peripheral s receive cycles . Certain peripherals which run directly from the XTAL run at d ifferent speeds than those that run from the bu s clock.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 441 Microc ontrollers Debugger M anual Figure 18.13 IIC Inp ut Buffer D ispla y The IIC da ta input/o utput log buffer simulatio n allows the user to gain access to the past 256 II C data b ytes th at hav e been sh ifte d in an d out of the mo dule .
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 442 Microco ntrolle rs Debugger Manua l IIC interrup ts are enabled, the FCS jumps to an appropriat e subrouti ne as long as the IIC interr upt vector s are prop erly defin ed.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 443 Microc ontrollers Debugger M anual Pulls up th e data window wi th all the input valu es >IICDI 22 33 This is an example of da ta being return ed from a slave de vice. Onc e the MCU transmit s a start signal and t he target addr ess, it receives and ACK from t he slave device.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 444 Microco ntrolle rs Debugger Manua l 3. The data by te $AA co mes in 4. The data byte $22 co mes in 5. A STOP signal comes in IICDO Command The IICDO comman d displays a window, which shows data shifted in as well as shifted out of the IIC periph eral.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 445 Microc ontrollers Debugger M anual the s ame ti me, yo u can us e the INPUTS comman d to bring up the Sim ulated P ort Inputs for all general I/O ports. It display s the current simulated value s to all applicable input ports.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 446 Microco ntrolle rs Debugger Manua l INPUT<x> Command The INPUT<x> comm and sets the simula ted inputs to p ort <x> . The CPU reads this input va lue when port <x> is set a s an input port.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 447 Microc ontrollers Debugger M anual INPUTS Command In FCS and CPU-On ly Simulation m ode, the INPUTS command o pens the S imulated Po rt Inputs dialog bo x shown i n Figur e 1 8.18 . The user may then use this bo x to specify the input s tates o f port pins a nd IRQ.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 448 Microco ntrolle rs Debugger Manua l Figure 18.1 9 Sim ulated P or t Inputs Dialog Box An IRQ even t occu rrence set s the a ppropriate flag in the corresp onding IRQ registe r. The user can poll the IRQ flag if the Polling Mode is simulated.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 449 Microc ontrollers Debugger M anual IRQ Command s The followin g interrupt requ est comman d is availab le for the HCS08. INPUTS Command In FCS and CPU-On ly Simulation m ode, the INPUTS command o pens the S imulated Po rt Inputs dialog bo x shown i n Figur e 1 8.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 450 Microco ntrolle rs Debugger Manua l Keyboard Interru pt Module In FCS, this m odule simulates all functionality of the Keyb oard Interrup t (KBI) module, includ ing the e dge-only , edge a nd level in terrupt, and flag polling modes of o peration.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 451 Microc ontrollers Debugger M anual The user can poll the KBI Interru pt Pendin g flag if th e Polling M ode is simula ted. In Interrupt Mo de, the simul ator branches to an appropriat e interrupt sub routin e as long as the KBI interrupt vector is p roperly configured.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 452 Microco ntrolle rs Debugger Manua l Figure 18.2 4 Sim ulated P or t Inputs Dialog Bo x When usin g In-Circu it Simulati on mode, th e INPUTS command show s the simula ted input values t o any appl icable p ort.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 453 Microc ontrollers Debugger M anual Figure 18.2 5 Memory Comp onent Windo w If the MTIM interr upt is enabled, the FCS jumps to an appropriate sub routine as long as the MT IM interr upt vec tor is p roperly defined .
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 454 Microco ntrolle rs Debugger Manua l Figure 18.26 SCI IN Buffer Display SCI Data Outpu t Buffer simula tion allows the us er to gai n access t o the past 256 SCI da ta values transmitted ou t of the module.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 455 Microc ontrollers Debugger M anual The user can also obser ve diffe rent SCI flags in the Memor y window. If t he modu le is run in Fla g Polli ng mode, poll the flag corr espon ding to the ex pecte d SCI event .
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 456 Microco ntrolle rs Debugger Manua l Examp le >SCDI $55 Set the ne xt input v alue to t he SCI to $55 >SCDI Pull up t he data wind ow with a ll the inpu t values. Figure 18.29 SCI IN buff er displ ay SCDO Co mmand The SCDO co mman d display s the output buffer from the SCI.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 457 Microc ontrollers Debugger M anual Serial Peripheral Interface Modul e In FCS, this module simul ates all functionality of the Serial P eri.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 458 Microco ntrolle rs Debugger Manua l Figure 18.32 SPI O UT Buffer Di spla y At any po int, you can us e the SPCLR command t o flush the inpu t and o utput SPI buff ers.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 459 Microc ontrollers Debugger M anual SPCLR Comma nd Use the SPCLR command to flush the input an d output buffers for SP I simulation .
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 460 Microco ntrolle rs Debugger Manua l Figure 18.3 4 SPI IN Buff er Displa y SPDO Command The SPDO co mmand displays the output buffer from the SPI. A win dow is opened th at shows all the data that the SPI ha s shifted ou t.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 461 Microc ontrollers Debugger M anual SPFRE Q Comman d The SPFREQ command le ts the user set the freq uency o f the SPI sl ave input clo ck. If th e SPI is configu red for the slave mode, th is command allows the u ser to enter the num ber of cycles <n> per on e inpu t cloc k perio d.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 462 Microco ntrolle rs Debugger Manua l Figure 18.3 6 Sim ulated P or t Inputs Dialog Bo x Use the Sim ulated Port Inputs dia log box to reconfi gure the i nput value to any I/O por t.
HCS08 Full Chip Simulat ion Peripheral Modules Command s 463 Microc ontrollers Debugger M anual the user steps thro ugh the co de. To de termi ne the exac t amou nt of cyc les ove r which the event occ urs, one can either observe t he cycle d isplay in the Regi ster wind ow or use th e built in simu lation co mmands.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 464 Microco ntrolle rs Debugger Manua l GOTOCYCLE Command The GOTOCYCLE command execu tes the progra m in the simu lator begi nning at the address in the program c ounter (PC).
HCS08 Full Chip Simulat ion Peripheral Modules Command s 465 Microc ontrollers Debugger M anual INPUTS Command In FCS and CPU-On ly Simulation m ode, the INPUTS command o pens the S imulated Po rt Inputs dialog bo x shown i n Figur e 1 8.39 . The user may then use this bo x to specify the input s tates o f port pins a nd IRQ.
HCS08 Full Chip Si mulation Periphera l Module s Comm ands 466 Microco ntrolle rs Debugger Manua l.
467 Microc ontrollers Debugger M anual 19 HCS08 P&E M ultilink/ Cyclone Pro Connection The HCS08 P&E Mult ilink/Cyclo ne Pro Conn ection settin g permits a conne ction to Multilin k/Cyclone Pro devic es.
HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 468 Microco ntrolle rs Debugger Manua l Figure 19.2 HCS08 Connection A ssistant Inter face Selec tion.
HCS08 P&E Multilink/ Cyclone Pr o Connection Conne ction Procedure 469 Microc ontrollers Debugger M anual Figure 19.3 HCS08 Connection A ssistant In terface Select ed Trim Control The Use custom t.
HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 470 Microco ntrolle rs Debugger Manua l MultilinkCyclonePro Menu Description When you selec t P&E Mu ltilink/Cy clone Pro as your c onnection, the Con nection me nu’s name is c hanged and othe r option s are added .
HCS08 P&E Multilink/ Cyclone Pr o Connection Conne ction Procedure 471 Microc ontrollers Debugger M anual Active Mode Menu Options When the microp rocessor is connect ed, more Conn ection men u options be come ava ilable.
HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 472 Microco ntrolle rs Debugger Manua l Figure 19.7 Adv anced Option s Dialog Bo x Prompt on Flash Program Checkbox Checking Alw ays Er ase and Pr ogram Flash wi thout a skin g in this dialog box lets the software transpa rently progra m the microproc essor.
HCS08 P&E Multilink/ Cyclone Pr o Connection Conne ction Procedure 473 Microc ontrollers Debugger M anual Start Expert Mode Programmer Option The Start Expert M ode Progr ammer option of the Con nection Men u grants the user acce ss to P&E’s graphical Flash programming utility , PROGHCS08.
HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 474 Microco ntrolle rs Debugger Manua l Figure 19.9 Choo se A Regist er Bloc k Windo w If r egister files have be en ins talled on the ho st co mputer , selec ting a block bring s up the Register B lock r egister li sting (s ee Figu re 19 .
HCS08 P&E Multilink/ Cyclone Pr o Connection Conne ction Procedure 475 Microc ontrollers Debugger M anual Bus Trace Option The Bus Tra ce menu opt ion allo ws you to gathe r pertine nt bus d ata by operatin g the bus analyze r in different mode s.
HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 476 Microco ntrolle rs Debugger Manua l.
477 Microc ontrollers Debugger M anual 20 HCS08 Open Source BDM Connection This cha pter gu ides you thr ough t he first steps towa rd debug ging wi th the C odeWar rior IDE a nd t he HCS0 8 Ope n Sour ce BDM connection. It does not replace all the additional docum entatio n provi ded in t his man ual, but gi ves yo u a good s tartin g poi nt.
HCS08 Open S ource BDM Connectio n First Steps Usin g the Statio nery W izard 478 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the f irst ste ps toward debu gging wi th the CodeW arrior IDE and t he HCS08 Op en Sourc e BDM usi ng the S tatio ner y Wiz ard: 1.
HCS08 Open S ource BDM Connection First Ste ps From Withi n an Existin g Project 479 Microc ontrollers Debugger M anual First Steps From With in an Existing Project CAUTION Normally, use the New Project or Change wizard t o change the connect ions . Th is i nfor matio n is prov ided for adv anced users only .
HCS08 Open S ource BDM Connectio n First Step s From Within an Existing Project 480 Microco ntrolle rs Debugger Manua l Figure 20.3 MCU Configuratio n Dialog Bo x 8.
HCS08 Open S ource BDM Connection First Ste ps From Withi n an Existin g Project 481 Microc ontrollers Debugger M anual Sele ct D eriva tiv e Op tion Select HC S08 Open So urce BDM > Select Deriv ative to display the Select Derivative Dialog Box . NOTE If the debu gger reco gnizes on ly one de rivative, th is menu entry is not avail able.
HCS08 Open S ource BDM Connectio n First Step s From Within an Existing Project 482 Microco ntrolle rs Debugger Manua l HCS08 Open Sou rce BDM Setup Dialog Box This dial og box i s used for settin g up commun icati on with a commu nicatio n device. The Communicatio n Device list menu shows which OSBDM cables are plugged into the compute r.
HCS08 Open S ource BDM Connection First Ste ps From Withi n an Existin g Project 483 Microc ontrollers Debugger M anual Select Derivative Dialog Box This dialog bo x is used to set up a derivative . The list m enu gives a list of d erivatives th at match t he target silico n System Device Id entification Re gisters (SDIDH, S DIDL).
HCS08 Open S ource BDM Connectio n First Step s From Within an Existing Project 484 Microco ntrolle rs Debugger Manua l Information Required to Unsecu re the Device To unsecure a dev ice, the de bugge r needs to know th e value of the FC DIV register to correctly mass era se the devi ce and progra m th e security byt e.
HCS08 Open S ource BDM Connection First Ste ps From Withi n an Existin g Project 485 Microc ontrollers Debugger M anual Show Status Dialog Box This dial og box pr ovide s both a rev ision summary of t he HCS08 O pen Source B DM software and hardware, plus technical support information.
HCS08 Open S ource BDM Connectio n First Step s From Within an Existing Project 486 Microco ntrolle rs Debugger Manua l.
487 Microc ontrollers Debugger M anual 21 HCS08 Serial Monitor Connection This sectio n guides you through the first steps toward d ebugging wi th the Co deWarrior IDE a nd t he HCS0 8 Ser ial Mon itor connect ion. It d oes not replace all the additio nal docum entatio n provi ded in t his man ual, but gi ves yo u a good s tart.
HCS08 Ser ial Monitor Co nnection First Steps Usin g the Statio nery W izard 488 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps to ward debu ggin g with Cod eWarr ior IDE and the HCS08 Se rial Monitor c onnection: 1.
HCS08 Ser ial Monitor Connection First Steps from Withi n an Existin g Project 489 Microc ontrollers Debugger M anual First Steps from Within an Existing Project To take the first steps towa rd debugging with CodeWarrio r IDE and setting the HCS08 Seri al Monit or co nnecti on from within an exi sting de buggin g proj ect: 1.
HCS08 Ser ial Monitor Co nnection First Step s from Within an Existing Proj ect 490 Microco ntrolle rs Debugger Manua l Figure 21.3 Monitor Setup Window - M onitor Comm unication T ab 8. Press the OK button. The HCS08 Serial Mo nitor connect ion reads t he dev ice silic on ID.
HCS08 Ser ial Monitor Connection First Steps from Withi n an Existin g Project 491 Microc ontrollers Debugger M anual Figure 21.5 Monitor Setup Window - V ector T able Mirro ring T ab 11. To enabl e this feature, chec k the Enable Vec tor Tabl e Mirroring ch eckbox.
HCS08 Ser ial Monitor Co nnection First Step s from Within an Existing Proj ect 492 Microco ntrolle rs Debugger Manua l MONITOR-H CS08 Menu Opti ons Once the HCS08 Serial Monitor c onnection is set, the MONITOR-HCS0 8 menu en try is is set in the Debugger menu.
HCS08 Ser ial Monitor Connection First Steps from Withi n an Existin g Project 493 Microc ontrollers Debugger M anual Bus Trace Select the MON ITOR- HCS08 > Bus T race opti on to op en the Trace compon ent wind ow within the debugger ma in window. Re fer to the Debugger HCS08 On-chip DB G Module User Interface manual for all related information.
HCS08 Ser ial Monitor Co nnection First Step s from Within an Existing Proj ect 494 Microco ntrolle rs Debugger Manua l Figure 21.9 Monitor Setup Window - V ector T able Mirro ring T ab Vector Table Mirro ring Tab Using the Vecto r Table Mirroring tab, it is po ssible to set t he “Vector Table M irroring” feature.
HCS08 Ser ial Monitor Connection First Steps from Withi n an Existin g Project 495 Microc ontrollers Debugger M anual Derivative Selection Dialog Box Within th is dia log bo x, it is possib le to se l.
HCS08 Ser ial Monitor Co nnection First Step s from Within an Existing Proj ect 496 Microco ntrolle rs Debugger Manua l.
497 Microc ontrollers Debugger M anual 22 SofTec HCS08 Connection This cha pter gu ides you thr ough t he first steps towa rd debug ging wi th the C odeWar rior IDE a nd t he SofTec HCS08 connection. It does not replace all the additional docum entatio n provi ded in t his man ual, but gi ves yo u a good s tartin g poi nt.
SofTec HCS08 Connection First Steps Usin g the Statio nery W izard 498 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps toward debugging with the CodeWa rrior IDE and the SofTec inDART-HCS08 us ing the st ationery Wiz ard: 1.
SofTec HCS 08 Connect ion First Steps from Withi n an Existin g Project 499 Microc ontrollers Debugger M anual First Steps from Within an Existing Project To take the first st eps toward debugging with th e CodeWarrior IDE and setting the SofTe c HCS08 connectio n from within an existing deb ugging projec t: 1.
SofTec HCS08 Connection First Step s from Within an Existing Proj ect 500 Microco ntrolle rs Debugger Manua l Figure 22.3 MCU Configuratio n Dialog Bo x 8.
SofTec HCS 08 Connect ion First Steps from Withi n an Existin g Project 501 Microc ontrollers Debugger M anual Trigger Mod ule Settings Select Sof Tec-HCS 08 > Tr igge r Modul e Se ttin gs to open the Trig ger Mo dul e Se ttin gs dialo g box. R efer to the Deb ugger HCS08 Onchip DBG Module User Interface ma nual for related information.
SofTec HCS08 Connection First Step s from Within an Existing Proj ect 502 Microco ntrolle rs Debugger Manua l specific HCS08 deriv ative. In the ca se of the MC9S08 GB60, for examp le, this const ant clock sourc e is an 8 MHz in ternal clock. Other deriv atives m ay us e the ex tern al crys tal frequency.
503 Microc ontrollers Debugger M anual 23 HCS08 On-Chip DBG Module The HCS08 derivati ves featurin g an on-chi p DBG module requir e a debugge r graphical user inte rface to setup t his module an d take ful l advantag e of this enh anced debu gging feature.
HCS08 On-Chip DBG Mo dule Specific Conne ction Menu O ptions 504 Microco ntrolle rs Debugger Manua l • Real tim e prog ram code p rofiling an d covera ge withi n the Profil er and Coverage window co mpone nts (open t he Profi ler an d/or the Coverage co mpone nts to di splay code pr ofili ng and code co vera ge).
HCS08 On-Chip DBG Module Context M enu Entries in Source , Data, Asse mbly and M emory Windo ws 505 Microc ontrollers Debugger M anual Context Menu Entrie s in Sou rce, Da ta, Assembly and Memory Wind.
HCS08 On-Chip DBG Mo dule Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 506 Microco ntrolle rs Debugger Manua l To set a trigger, sel ect a Set Trigger Address en try at the selected source locatio n/ address.
HCS08 On-Chip DBG Module Context M enu Entries in Source , Data, Asse mbly and M emory Windo ws 507 Microc ontrollers Debugger M anual Figure 23.4 T rig gers Set i n Sour ce and Asse mbly Window s Once a trigge r is set, it can be deleted by opening an y contex t sensitive menu th at contains the Delete Trigge r Address option.
HCS08 On-Chip DBG Mo dule Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 508 Microco ntrolle rs Debugger Manua l Trigger Stored as Markp oints Triggers are stored in the debugger as special markpoint s. Like break points, ma rkpoints can be viewe d by choosin g Show Ma rkpoint s in the menu.
HCS08 On-Chip DBG Module Context M enu Entries in Source , Data, Asse mbly and M emory Windo ws 509 Microc ontrollers Debugger M anual Figure 23.6 Contr olpoints Config uration Windo w - Markpoin ts T ab Editing triggers t hrough the Mark poi nts tab in the Controlpo ints Confi guration window be low is not user friendly.
HCS08 On-Chip DBG Mo dule Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 510 Microco ntrolle rs Debugger Manua l Figu re 23.7 D at a Wind ow Co ntext Menu - Set T ri gge r A Op tion In the Da ta window, in stead of setting a watchpoint , a trigger can be set.
HCS08 On-Chip DBG Module Context M enu Entries in Source , Data, Asse mbly and M emory Windo ws 511 Microc ontrollers Debugger M anual Figure 23.8 T rigger s Set in Data and Memory Wi ndows The trigg er is displayed in the Data wind ow and at th e correspondin g address in the Memory windo w lik e a wa tchpoi nt i con.
HCS08 On-Chip DBG Mo dule Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 512 Microco ntrolle rs Debugger Manua l Expert Triggers The Expe rt Mode ha s a different set of triggers and trigger design s.
HCS08 On-Chip DBG Module Context M enu Entries in Source , Data, Asse mbly and M emory Windo ws 513 Microc ontrollers Debugger M anual Figure 23.1 0 Expert T rigger s in So urce, Assem bly , Memory an.
HCS08 On-Chip DBG Mo dule Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 514 Microco ntrolle rs Debugger Manua l Trigger Setting s The Trigg er Settings option of a context m enu can b e chosen to set all kinds of trigge rs without open ing the Trigg er Module Setting s Window .
HCS08 On-Chip DBG Module DBG Supp ort Status Ba r Item 515 Microc ontrollers Debugger M anual Trigger Module U sage This menu entry can be used t o globally set th e DBG module functionality without openin g the Trigger Module Settings Window to do the DBG M odu le Mode Setup .
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 516 Microco ntrolle rs Debugger Manua l The status bar displays the cu rrent DBG Module Mode S etup (a s show n abo ve) or th e current preset Instruction Triggers , Memory Access Triggers or Capt ure Tri ggers used or the current DBG Modu le Mode Setup .
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 517 Microc ontrollers Debugger M anual DBG Module Mode Setup First of all, th e on-chi p DBG modu le prov ides some ex clusiv e debug ging feat ures. Ope n the top list m enu to display a ll modes and co mplex brea kpoints/watchpoints, that is, kin d of triggers available.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 518 Microco ntrolle rs Debugger Manua l Expert Mode The User ne eds to know t he on-chip DBG module really well to use this mode. It can be seen as a “Do It Yourself ” way t o set th e DBG modu le.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 519 Microc ontrollers Debugger M anual Expert Mode Tab The expert mo de tab gives you an access to most of the on-chip DBG mod ule regist ers. Trigge r types can be dire ctly set from the DBGT - Debugg er Trigger Reg ister list menu.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 520 Microco ntrolle rs Debugger Manua l Figure 23.1 9 Deb ugger Main Wi ndow - Coverage an d Profiler W indows Disabled Mode The user need s to know the on-chip DBG modul e to use this mode.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 521 Microc ontrollers Debugger M anual Memory Access Trigg ers This sectio n describes the various type s of Memory Ac cess Triggers availa ble on the on- chip de bug mod ule.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 522 Microco ntrolle rs Debugger Manua l Memory Access at Address A and Value on Data Bus Match This mode is used to t rigger on a pr ogram instructio n read and/o r write of a sp ecific matching byte value at Address A mem ory location.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 523 Microc ontrollers Debugger M anual Memory Access at Address A and Value on Data Bus Mismatch This mode is use d to trigge r on a program in struction rea d and/or write of a NOT matching byte value at Addre ss A memory locatio n.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 524 Microco ntrolle rs Debugger Manua l Instruction at Address A or Address B is Executed This mod e is used to trig ger on a pr ogram i nstruct ion execu tion (pr ogram counter ) at Address A or at Address B.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 525 Microc ontrollers Debugger M anual Instruction at Address A and Value on Data Bus Match This mod e is used to trig ger on a pr ogram inst ruct ion execu tion (pro gra m counter) at Address A, this instructio n opcode ma tching a spe cific byte value.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 526 Microco ntrolle rs Debugger Manua l Figure 23.26 Memory Access at A ddress A and V alue on D ata Bus Mis match D ialog Bo x The Trigge r Editing dialog box is not ava ilable for the trigger B.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 527 Microc ontrollers Debugger M anual The trig ger ad dress es is ty pically not a program code a ddres s (prog ram co unter), but rather data /memory addre sses. Captured byte data is displayed in th e Trace Co mpone nt Wi ndow and automa tically switched to Recorded Data Display mode.
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 528 Microco ntrolle rs Debugger Manua l • Start recording after trigger hit and DO NOT halt when t he fifo is full : The DBG modu le star ts re cordin g pr ogram f low in forma tio n on tri gger co ndit ion mat ch.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 529 Microc ontrollers Debugger M anual Trigger Editing Typic ally t rigge r addre sses and/ or ty pe can b e set us ing co ntext sensiti ve con text me nus. I t is also possible to modify trigge r addresses and type within th e Trigger M odule Se ttings Wind ow .
HCS08 On-Chip DBG Mo dule Trigg er Module Sett ings Wind ow 530 Microco ntrolle rs Debugger Manua l •T h e Show Lo cation button shows the loc ation of th e trigger (as pr ogram code location or program data) in the Sou rce, Data, Assembly a nd Memory wind ows.
HCS08 On-Chip DBG Module Trigg er Module Sett ings Wind ow 531 Microc ontrollers Debugger M anual Figure 23.3 2 T rigger Settings T ab Inf ormation General Setting s Tab Most of t he time, the re is no reaso n to chang e any of the se settings, which are default settings of the DBG user interface.
HCS08 On-Chip DBG Mo dule Trace Componen t Window 532 Microco ntrolle rs Debugger Manua l • Automatically analyze the FIFO c ontent : When the T race Compo nent Wind ow is open, after the deb ugger .
HCS08 On-Chip DBG Module Trace Co mponent W indow 533 Microc ontrollers Debugger M anual It is not necessary to open the Trace wi ndow/co mponent t o make use of the DBG user interface triggers. Howeve r, several triggers are used t o coll ect code program fl ow information o r access dat a information.
HCS08 On-Chip DBG Mo dule Trace Componen t Window 534 Microco ntrolle rs Debugger Manua l Figu re 23.35 T ra ce W indow - Co ntext M enu O pti ons Selectin g Show L ocation in the Trace window causes a con text sens itive menu to ap pear in Source and Assembly wind ow the frame match ing source a nd assembly code .
HCS08 On-Chip DBG Module Trace Co mponent W indow 535 Microc ontrollers Debugger M anual on-ch ip DBG mod ule. By conse quence , the Textua l display mo de simp ly expands instructio n assembly code in the Trace wi ndow.
HCS08 On-Chip DBG Mo dule Trace Componen t Window 536 Microco ntrolle rs Debugger Manua l Dumping Fram es to File Selectin g Dump in the Trace wi ndow co ntext sen sitive co ntext menu ope ns a small d ialog box to dump/save Trace component frames to a text file.
HCS08 On-Chip DBG Module Trace Co mponent W indow 537 Microc ontrollers Debugger M anual Displa yed colum ns: • FIFO Depth : A numbe r representing the dep th in the DBG/F ifo of the word data value. Th e first frame (Dept h 1) is the oldest valu e in the tim e.
HCS08 On-Chip DBG Mo dule Limi tati ons 538 Microco ntrolle rs Debugger Manua l Limitations The follo wing limita tions app ly in de mo/unregiste red debu gger mode: • In de mo/un register ed debu gger m ode, co de prog ram rec onstruc tion ha s a limited numbe r of fra mes dis played in the Trace wi ndow.
HCS08 On-Chip DBG Module HCS08 DBG V3 New Features 539 Microc ontrollers Debugger M anual Figure 23.43 LOOP1 recor ding mode s election Ability to record until Res et and from Reset The DBG mo dule now ha s the ability to record d ata up unti l a reset occurs, a nd can b egin recording immediately after reset.
HCS08 On-Chip DBG Mo dule HCS08 DBG V3 New Features 540 Microco ntrolle rs Debugger Manua l Figure 23.44 Recor ding a PIN rese t.
HCS08 On-Chip DBG Module HCS08 DBG V3 New Features 541 Microc ontrollers Debugger M anual Figure 23.4 5 Recor ding an illegal opcod e reset Recording from Reset In other cases, including Power On Reset (POR), the DBG module starts recording immedia tely out of re set.
HCS08 On-Chip DBG Mo dule HCS08 DBG V3 New Features 542 Microco ntrolle rs Debugger Manua l Figure 23.4 6 Recor ding out of reset mode sele ction Figure 23.
HCS08 On-Chip DBG Module HCS08 DBG V3 New Features 543 Microc ontrollers Debugger M anual Expert Triggers tab extended The Expert Tri ggers tab has bee n redesign ed and exte nded with t he newest compa rator “C” controls.
HCS08 On-Chip DBG Mo dule HCS08 DBG V3 New Features 544 Microco ntrolle rs Debugger Manua l.
545 Microc ontrollers Debugger M anual Book IV - RS08 Debug Connections Book IV Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the environ ment.
Book IV Con tents 546 Microco ntrolle rs Debugger Manua l.
547 Microc ontrollers Debugger M anual 24 RS08 Full Chip Simulation Full Chip Si mulation (FCS) do es not involve real in put and output. Beca use of this, it does not require a t arget devic e to be conn ected to your PC.
RS08 Full Chip Simul ation Config uration Proc edure 548 Microco ntrolle rs Debugger Manua l Connection (RS08FCS) Me nu Once you ha ve cho sen Full Chip S imulatio n as yo ur debu gger c onnectio n, th e name of the Conn ection menu is update d and additio nal opt ions ar e added.
RS08 Full Chip Simulat ion Configu ration Procedu re 549 Microc ontrollers Debugger M anual Full Chip Simulation Modul e Commands The RS08FCS Men u contains the Full Chip Simu lation comman ds for the modules tha t have speci alty com mands assoc iated wi th them for a chosen device.
RS08 Full Chip Simul ation Config uration Proc edure 550 Microco ntrolle rs Debugger Manua l Show Processor Pins The Proce ssor Pins dialog bo x is a con venient t ool for mo nitorin g the cur rent stat e of the processor pins, as well as the pe ripheral with which a pin may b e associated.
RS08 Full Chip Simulat ion Configu ration Procedu re 551 Microc ontrollers Debugger M anual Run Till Cycle Command This menu opt ion, which corre spond s to t he GOTOCYC LE co mmand, brin gs up an in put dialog bo x which al lows the user to spec ify a give n cycle val ue.
RS08 Full Chip Simul ation Periphera l Module s Comm ands 552 Microco ntrolle rs Debugger Manua l Figure 24.9 Timer Interfac e Module Re gister Listing Selecting a file brin gs up the Reg ister Window (see Fi gure 24 .10 ), which disp lays the value and si gnificance of each bit in the register.
553 Microc ontrollers Debugger M anual 25 RS08 P&E Multilink/Cyclone Pro Connection The RS08 P&E Mul tilink/Cyclone P ro Con nection settin g permits a connect ion to Multilin k/Cyclon e Pro devic es.
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 554 Microco ntrolle rs Debugger Manua l Figure 25.2 RS08 C onnection As sistant Inter face Selec tion Figure 25.3 RS08 C onnection As sistant Inter face Selec ted Hotsync Button The Hotsync button in th e Connection Assistant (see Fi gure 25 .
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 555 Microc ontrollers Debugger M anual MultilinkCyclonePro Menu Description When you hav e selected P&E M ultilin k/Cyclone P ro as your conn ection , the Connecti on menu ’s name is chan ged a nd othe r optio ns are a dded.
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 556 Microco ntrolle rs Debugger Manua l Connect Option The Con nect optio n ini tiates an attem pt to co mmunica te with the dev ice cho sen unde r the Devi ce sec tion of t he me nu.
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 557 Microc ontrollers Debugger M anual Prompt on Flash Program Checkbox Checking Always Erase a nd Progr am Fl ash witho ut aski ng in this dialog b ox lets the software transpa rently progra m the microproc essor.
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 558 Microco ntrolle rs Debugger Manua l Show Processor Pins The Proce ssor Pins dialog bo x is a con venient t ool for mo nitorin g the cur rent stat e of the processor pins, as well as the pe ripheral with which a pin may b e associated.
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 559 Microc ontrollers Debugger M anual Figure 25.1 0 Choose A Reg ister Bloc k Windo w If r egister files have be en ins talled on the ho st co mputer , selec ting a block bring s up the Register B lock r egister li sting (s ee Figu re 25 .
RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 560 Microco ntrolle rs Debugger Manua l.
561 Microc ontrollers Debugger M anual 26 RS08 Open Source BDM Connection This cha pter gu ides you thr ough t he first steps towa rd debug ging wi th the C odeWar rior IDE a nd t he RS08 Open S ource BDM conne ction. It doe s not replace all the addit ional docum entatio n provi ded in t his man ual, but gi ves yo u a good s tartin g poi nt.
RS08 Open Source BDM Connection First Steps Usin g the Statio nery W izard 562 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps toward debugging with the CodeWa rrior IDE and the RS08 Op en Source B DM using the statio nery Wiza rd: 1.
RS08 Open S ource BDM Connectio n First Steps From Within a n Existing Pro ject 563 Microc ontrollers Debugger M anual First Steps From Within an Existing Project To take the first steps towa rd debuggi ng with the Cod eWarrior IDE an d setting th e RS08 Open So urce BD M conne ction fr om with in an exi sting de bugg ing pro ject: 1.
RS08 Open Source BDM Connection First Step s From Within an Existing Project 564 Microco ntrolle rs Debugger Manua l Figure 26.3 MCU Configuratio n Dialog Bo x 8.
RS08 Open S ource BDM Connectio n First Steps From Within a n Existing Pro ject 565 Microc ontrollers Debugger M anual Reset to Normal Mode Option Select RS 08 Op en S ource B DM > Rese t to N ormal Mode to reset the hardwa re CPU to normal mod e.
RS08 Open Source BDM Connection First Step s From Within an Existing Project 566 Microco ntrolle rs Debugger Manua l Select Derivative Dialog Box This d ialog box is a derivat ive setu p dialo g box. The list me nu gives a list of deriv atives that matc h the target silico n System Device Id entification Regist ers (SDIDH, SDIDL).
567 Microc ontrollers Debugger M anual 27 SofTec RS08 Connection This sectio n guides you through the first steps toward d ebugging wi th the Co deWarrior IDE a nd t he SofTec RS08 conne ction . SofTec RS08 Technical Considerations The 8/16 bit deb ugger (and then the CodeWarrior IDE ) might be conn ected to RS08 hardware u sing the SofTec RS08.
SofTec RS08 Connection First Steps Usin g the Statio nery W izard 568 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps toward debugging with the CodeWa rrior IDE and the SofTec inDART-RS08 u sing the stationery Wizard: 1.
SofTec RS 08 Conn ection First Step s Usin g the Statio nery Wiza rd 569 Microc ontrollers Debugger M anual Figure 27.2 IDE Main Win dow - Pr oject Men u 7. Ch oose th e menu op tion Projec t > Make . 8. Ch oose th e menu op tion Pr oject > Debu g to star t the debu gger.
SofTec RS08 Connection First Step s From Within an Existing Project 570 Microco ntrolle rs Debugger Manua l First Steps From Within an Existing Project To take the first st eps toward debugging with th e CodeWarrior IDE and setting the SofTe c RS08 c onnection from within a n existing debugging project: 1.
SofTec RS 08 Conn ection First Steps From Within a n Existing Pro ject 571 Microc ontrollers Debugger M anual Figure 27.4 MCU Configuratio n Dialog Bo x 8. Press the OK bu tton to start debugging . SofTec RS08 Menu Op tions Once the SofTec RS 08 connecti on is set, th e connec tion menu entry in the d ebugge r main toolba r is set to SofTec-RS08 .
SofTec RS08 Connection First Step s From Within an Existing Project 572 Microco ntrolle rs Debugger Manua l MCU Configuration Option Select Sof Tec-RS 08 > MCU C onfigura tion t o display t he MCU Conf igurat ion di alog box . About Option Select the So fTec- RS08 > Abou t option to display the Abo ut dial og bo x.
SofTec RS 08 Conn ection First Steps From Within a n Existing Pro ject 573 Microc ontrollers Debugger M anual Figure 27.7 Comm unication Setti ngs Dialog Bo x About Dialog Bo x This dial og bo x belong s to the Sof Tec GDI DLL an d provi des inf ormatio n about the SofTec_BDC08.
SofTec RS08 Connection First Step s From Within an Existing Project 574 Microco ntrolle rs Debugger Manua l.
575 Microc ontrollers Debugger M anual Book V - ColdFire® V1.0 Debug Connections Book V Conte nts Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the enviro nment .
Book V Con tents 576 Microco ntrolle rs Debugger Manua l.
577 Microc ontrollers Debugger M anual 28 ColdFire V1 Full Chip Simulation Connection The Full Chip Simula tion (FCS) connection ru ns a complete simulation o f all proc essor peripherals and I/O on the user' s Personal Comp uter. No develop ment board is required.
ColdFire V1 Full Chip Simulation Connection 578 Microco ntrolle rs Debugger Manua l Debugger Status Bar w ith Full C hip Simulatio n The status bar ( Figure 28.
ColdFire V1 Full Chip Simulation Connection 579 Microc ontrollers Debugger M anual The status bars show the selec ted simula ted derivative or simulated CORE or cor e SAMPL E and the cu rrent de rivat ive CPU f requenc y in MHz . NOTE Clicking on the CPU frequency opens t he Cloc k Fre quency Setup .
ColdFire V1 Full Chip Simulation Connection 580 Microco ntrolle rs Debugger Manua l Comma nd Fil es Window Figu re 28.5 shows the FCS c onnection Comm and Files window.
ColdFire V1 Full Chip Simulation Connection 581 Microc ontrollers Debugger M anual Memory Configuration Dialog Box Features The memor y conf igura tion di alog bo x ( Fi gure 2 8.
ColdFire V1 Full Chip Simulation Connection 582 Microco ntrolle rs Debugger Manua l Memory Configuration Modes Use the Memory Confi guratio n dialo g box to sel ect the memor y configur atio n mode: auto con figurat ion on access , auto confi gurat ion on load, or manual co nfiguration (user defined) .
ColdFire V1 Full Chip Simulation Connection 583 Microc ontrollers Debugger M anual Manual Confi gura tion: Th e Memor y Confi gurat ion di alog box lists an entry fo r each memo ry bloc k.
ColdFire V1 Full Chip Simulation Connection 584 Microco ntrolle rs Debugger Manua l Memo ry Blo ck Se tt ing You must s et memo ry bl ocks withi n the a vail able mem ory; each block must c over a certain rang e. The start addre ss and end addre ss defin e each memory bl ock.
ColdFire V1 Full Chip Simulation Connection 585 Microc ontrollers Debugger M anual Memory Configuration Dialog Box Command Buttons The Memo ry Config uration dialog bo x contai ns these com mand bu ttons: • Add — Fills a new memory block according to the current data of the Name , Type , Start , End , Bus wi dth , and Access Details cont rols.
ColdFire V1 Full Chip Simulation Connection 586 Microco ntrolle rs Debugger Manua l • To mo dify the value of e ach read or writ e typ e, chan ge the v alue o f the associat ed spin bo x. • The lo west possi ble valu e is 0. • The hig hest pos sible value i s 127.
ColdFire V1 Full Chip Simulation Connection 587 Microc ontrollers Debugger M anual frequency is always the oscillator frequenc y. Two radi o butt ons allo w you t o choose betwee n cycl es or tr ue-tim e displa y in de bugger status bar. Clearing R eset cycles/time make s th e deb ugger accu mul ate cy cles /ti me oth er t han C PU reset.
ColdFire V1 Full Chip Simulation Connection 588 Microco ntrolle rs Debugger Manua l You can ret rieve the foll owing ty pes of informa tio n from th e Trace wi ndow: • Inst ructio ns and instruc tio.
ColdFire V1 Full Chip Simulation Connection 589 Microc ontrollers Debugger M anual FCS Warning (ID 12): reading from unim plemented register at pc = 0x400a'L. Value: 0x0, Memory Address: 0x106. Flash CONTROL module not implemented FCS Warning (ID 12): reading from unim plemented register at pc = 0x400a'L.
ColdFire V1 Full Chip Simulation Connection 590 Microco ntrolle rs Debugger Manua l Example: in>warning_setup none in>warning_setup halt in>warning_setup status WARNING_SETUP STATUS: HALT WARNING_SETUP CLMSG : Warning messages appe ar in th e Command window (deb ugger de fault) .
ColdFire V1 Full Chip Simulation Connection 591 Microc ontrollers Debugger M anual MESSAGE_HIDE_ID Command The MESSAGE_HIDE _ID command h ides a message of a specific ID.
ColdFire V1 Full Chip Simulation Connection FCS and Silicon On -Chip Periphe rals Simu lation 592 Microco ntrolle rs Debugger Manua l Components Debu gger eng ine. Usage MESSAGE_HIDE_RESET Example: in>MESSAGE_HIDE_RESET Displ ays all pre viousl y hidden messages agai n.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 593 Microc ontrollers Debugger M anual You can see the curre nt mode of Simulatio n (SAMPLE, CORE or MCU d erivative) in the status bar. You can access the Set D erivative dialog bo x by doubl e click ing on the FCS supp ort entry in the status bar.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 594 Microco ntrolle rs Debugger Manua l Analog Me ter Componen t Use the Analog Meter wind ow comp onent, shown in Figure 2 8.13 , as a basis for user- provid ed debugg er exten sion compon ents.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 595 Microc ontrollers Debugger M anual IO_LED Compon ent The IO _LED wind ow show n in Figu re 28 .14 contai ns eight LE Ds use d to ma nipulate a nd displa y the val ues of memo ry at an address spe cifie d in the r elate d dialo g box.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 596 Microco ntrolle rs Debugger Manua l IO_L ED M enu The IO LED Men u contain s a single i tem, Setup , that o pens the IO_LED Setup di alog bo x shown in Fi gure 28.15 . Use this dial og box to specify the PORT and DDR add resses.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 597 Microc ontrollers Debugger M anual LED Compon ent The LED wind ow shown i n Figure 28.16 is a visual util ity that disp lays an ar bitrary 8-b it value usin g an LED bar . Figu re 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 598 Microco ntrolle rs Debugger Manua l Click OK to accep t the specified locati on. Click Cancel to d iscard c hanges a nd retain the previous loc ation. Exam ple: If the sp ecified location is TargetObject.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 599 Microc ontrollers Debugger M anual Phone Operations Clic k a phone key and t he matchi ng ASCII char acter of t he label on the key is stored at the config ured m emory cell.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 600 Microco ntrolle rs Debugger Manua l ADC/DAC Comp onent The ADC_DAC win dow show n in Figure 2 8.20 consists of an Analog to Digital (ADC) and a Dig ital to Ana log (DAC) conver ter.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 601 Microc ontrollers Debugger M anual Figure 28.2 1 Internal Con verter Module Or ganization and Coupler Connections The fourth unit show s the value of the init ial analog si gnal and v alue of the DAC output analog sig nal.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 602 Microco ntrolle rs Debugger Manua l DAC The DAC is an 8-bit resolu tion conv erter whose ou tput con nects to the visu alization screen. It is only n ecessary to send a byte into its data p ort to hav e its conversion displayed o n the visualizatio n screen.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 603 Microc ontrollers Debugger M anual ADC/DAC Setup Dialog Box The dialo g box shown in Figu re 28.2 3 allows you to de fine th e por t and ad dress o r select one port of the five proposed.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 604 Microco ntrolle rs Debugger Manua l Display Properties Dialog Box This d ialog box, sho wn in Figure 28.25 , allows you t o modi fy the di splay prop erties from the ADC/DAC comp onent.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 605 Microc ontrollers Debugger M anual IT_Keyboard Co mpone nt The 20-ke y IT_Key board sho wn in Figure 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 606 Microco ntrolle rs Debugger Manua l Scanning is one method to read such keyboa rds. Typica lly, we can pro ceed as follows (t he line b eing in outp ut and th e column in input): • Put a 0 at li ne X4 (X3, X2, X1 , X0 bein g at 1) .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 607 Microc ontrollers Debugger M anual Interr uption Keyboard Setup The Interr upti on Keyboard Setu p dialog bo x shown in Figure 28.29 allows y ou to set the address of the lines port, t he columns po rt, and the nu mber of the i nterrupti on vector.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 608 Microco ntrolle rs Debugger Manua l LCD Compo nent The LCD D isplay compon ent mess age b ox shown in Figure 28.30 is the LCD utili ty, which can displa y one or two lines of 16 char acters a nd show or hi de th e position cu rsor.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 609 Microc ontrollers Debugger M anual Figure 28.32 T he DDRAM Controller The Address Co unter ( AC ) is an interna l register of the display controller which points a t the current address .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 610 Microco ntrolle rs Debugger Manua l Instruction Listi ng Figu re 28.3 3 lists the instructions availabl e for the LCD component.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 611 Microc ontrollers Debugger M anual Cursor or Display Shift • Doesn't change th e DDRAM conten t. • Leaves AC in case of a screen s hift. • Moves and /or shifts the cu rsor to the right or left.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 612 Microco ntrolle rs Debugger Manua l The Initialization Step Initializa tion require s seven steps. Th e Functi on Set instru ction must b e sent three times successiv ely to fix the exch ange data wi dth, and a fou rth time to fi x the number of lin es used.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 613 Microc ontrollers Debugger M anual LCD Display The LCD Disp lay dia log bo x show n in Figure 28 .37 allows you to set the address of the line s port and co lumns port. Figure 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 614 Microco ntrolle rs Debugger Manua l Monitor Component The Moni tor wind ow shown in Fi gure 28 .38 is a basic oscilloscope th at displays the result of debu gger objects . Figure 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 615 Microc ontrollers Debugger M anual Add Channel The Ad d Chann el dialo g box sh own in Figure 28 .40 allows yo u to crea te a new Ch annel in the monito r. Figure 28.40 Add Channel Dialog Bo x .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 616 Microco ntrolle rs Debugger Manua l Change Colors The Chang e Colors di alog bo x shown in Figure 28.42 allows you to chang e the colors from the se lected Channel. Figure 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 617 Microc ontrollers Debugger M anual Push Butto ns Compone nt The Push Buttons window shown in Figur e 28.4 3 is a bas ic in put devi ce. Figure 28.4 3 Push Buttons Windo w Push Buttons Menu Figu re 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 618 Microco ntrolle rs Debugger Manua l Push Buttons Setup The Setup dia log box s hown in Figure 28.45 allows you t o speci fy the port address (in hexadecimal format) or select t he port in the list.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 619 Microc ontrollers Debugger M anual Drag Out: Nothin g can be d ragged o ut. Drop Into: Nothin g can be d ropped in. Demo Version Limitations No limitation s. Programmable IO _Ports Compon ent The Progra mmable I O_Ports wi ndow shown in Figu re 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 620 Microco ntrolle rs Debugger Manua l Programmable IO _Ports Menu Figu re 28.4 8 shows the Progra mmable I O_Ports menu and Table 28.9 d escribes its entry. Figure 28.4 8 The P rogramma ble IO_ P orts Menu Port Address The Port Add ress dial og box sho wn in F igure 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 621 Microc ontrollers Debugger M anual Figure 28.5 0 Coupler Contr ol Register Drag Out: Nothin g can be d ragged o ut. Drop Into: Nothin g can be d ropped in. Demo Version Limitations No limitation s.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 622 Microco ntrolle rs Debugger Manua l Figure 28.5 2 7-Segmen ts Displa y Component Constitution 7-Segments Display Menu Figur e 28. 53 shows the 7-s egment s di splay compone nt me nu and Table 28.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 623 Microc ontrollers Debugger M anual 7-Segments Display Setup The 7-Seg ments Displ ay dialog b ox shown in Figu re 28 .54 allows you to select the displa y and re lated value .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 624 Microco ntrolle rs Debugger Manua l Drop Into: Nothin g can be d ropped in. Demo Version Limitations No limitati ons. Stimulation C omponent The Debugger also supports I /O S tim ula tio n .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 625 Microc ontrollers Debugger M anual Cache S ize The Size of t he Cache d ialog box, shown in Fi gure 28.5 8 , allows you to define th e number of line s display ed in the Sti mulation co mponent.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 626 Microco ntrolle rs Debugger Manua l END 10000000 a = 0; The first line defi nes the st imulate d object.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 627 Microc ontrollers Debugger M anual Table 28.13 describes the bits us ed in the Serial Communic ation Stat us Register.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 628 Microco ntrolle rs Debugger Manua l Use Escape seq uences to hand le redirectio n of the output data stream.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 629 Microc ontrollers Debugger M anual • TERM_TO_WINDOW (sends output to termi nal window), • TERM_TO_BOTH (send output to.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 630 Microco ntrolle rs Debugger Manua l empty */ SCI.SCDR = ch; } void PutString(char *str) { while (*str) { PutChar(*str); str++; } } void InitTermIO(void) { SCI.BAUD = 0x30; /* baud rate 9600 at 8 MHz */ SCI.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 631 Microc ontrollers Debugger M anual Drop Into: Nothin g can be d ropped in. Demo Version Limitations No limitation s. Terminal Comp onent Use th e Term inal wi ndow sh own in Fi gure 28 .
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 632 Microco ntrolle rs Debugger Manua l Configure Termin al Connections The terminal windo w is very flexible and can redirect chara cters received from any availa ble input dev ice to an y availa ble output device.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 633 Microc ontrollers Debugger M anual If you hav e chosen a connect ion fr om or to the virtua l SCI po rt, you ca n also sp ecify, i n the Virtu al SCI sect ion, which po rts t o use as vir tual SCI por ts.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 634 Microco ntrolle rs Debugger Manua l ESC is the ESC Ch aracter (ASCII code 27 decimal). You can give thes e commands in the data stream sen t from the serial port o r virtual SCI port, bu t not f rom the input fi le or t he keyboar d.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 635 Microc ontrollers Debugger M anual Using th e Virt ual S CI In its default V irtual SCI config uration t he terminal comp onent acc esses the ta rget through the Objec t Pool interface.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 636 Microco ntrolle rs Debugger Manua l Wagon Component The Wag on window shown in Fi gure 28. 66 simulates a tool machine wagon fun ctionality. Figure 28.6 6 W agon Window At first, the wagon is at the left border po sition.
ColdFire V1 Full Chip Simulation Connection FCS Visual ization Utili ties 637 Microc ontrollers Debugger M anual Wagon Setup When you sel ect Setup from the Wagon Me nu, the P orts Address S election di alog box appears. T his is the W agon compo nent Setu p window.
ColdFire V1 Full Chip Simulation Connection True T ime I/O St imulatio n 638 Microco ntrolle rs Debugger Manua l True Time I/ O Stimulation The FCS I/O S timulation compone nt is a facility to trigger I/O e vents. With the Stimul ation co mponent loaded, you can si mulate int errupt s and regi ster modi ficati ons invoke d by the har dware.
ColdFire V1 Full Chip Simulation Connection True Tim e I/O Stimulatio n 639 Microc ontrollers Debugger M anual 2. Ch oose Simulator > Set > Sim . 3. Ch oose Component > Open > Io_led Figure 28. 71 sho ws the IO_LED com ponent. Figure 28.7 1 IO_LED Compone nt Windo w 4.
ColdFire V1 Full Chip Simulation Connection True T ime I/O St imulatio n 640 Microco ntrolle rs Debugger Manua l Listing 28 .6 IO_Sho w Proce dure in io_de mo.
ColdFire V1 Full Chip Simulation Connection True Tim e I/O Stimulatio n 641 Microc ontrollers Debugger M anual The Stim ula tion comp onent execu ting io_var.txt accesses TargetObjec t at address 0x210 asso ciated with PORT_DATA in the so urce. Yo u can ob serve th is by wa tchi ng the Template component.
ColdFire V1 Full Chip Simulation Connection True T ime I/O St imulatio n 642 Microco ntrolle rs Debugger Manua l Figure 28.7 4 Sour ce Compon ent Windo w 8. Acti vate th e Stim ulat ion Wind ow by cl icking on it. 9. Ch oose Stimula tion > Exec ute .
ColdFire V1 Full Chip Simulation Connection True Tim e I/O Stimulatio n 643 Microc ontrollers Debugger M anual VECTOR 7 Interrupt_Function /* set ve ctor on Interrupt 7 */ If the prm fil e does not speci fy the interrupt v ector addres s, the FCS stops when interruptio n is generated.
ColdFire V1 Full Chip Simulation Connection True T ime I/O St imulatio n 644 Microco ntrolle rs Debugger Manua l Detailed Explanation def a = TargetObject.#210.B; This li ne of co de defin es a as byte mapp ed at addre ss 0x210 in TargetObject. def x = TargetObject.
ColdFire V1 Full Chip Simulation Connection True Tim e I/O Stimulatio n 645 Microc ontrollers Debugger M anual This line of code reads pbits (three bits in Leds. Port_Register ), in crements this value a nd writes it to b . The + in front o f the time marker refers to the time re lative to the last encou ntered time value in the Stimula tion file.
ColdFire V1 Full Chip Simulation Connection True T ime I/O St imulatio n 646 Microco ntrolle rs Debugger Manua l TimedEvent = [ “+” | “#” ] Time Assign mentList. AssignmentList = { Assignment | Except ion}. PeriodicEvent = “PERIODICAL” Start “,” NbTimes “:” { PerTimedEvent } “END” .
ColdFire V1 Full Chip Simulation Connection Elect rical Sign al Genera tors and Si gnals App lication to Devi ce Pins 647 Microc ontrollers Debugger M anual • The iden tifiers declared in IdD eclar ation are stored in a table of id entifiers an d can be also us ed in Expre ssion .
ColdFire V1 Full Chip Simulation Connection Electric al Signal Gener ators and Si gnals App lication to Device Pins 648 Microco ntrolle rs Debugger Manua l Signal Block Description {signal header} {si.
ColdFire V1 Full Chip Simulation Connection Elect rical Sign al Genera tors and Si gnals App lication to Devi ce Pins 649 Microc ontrollers Debugger M anual TIMEFACTOR=3.6 GAIN=-4.2 DCOFFSET=2.5 OPTION=NORMAL 2.136230e-004 3.051758e-005 2.441406e-004 3.
ColdFire V1 Full Chip Simulation Connection Electric al Signal Gener ators and Si gnals App lication to Device Pins 650 Microco ntrolle rs Debugger Manua l INF means infin ite loop. If a block is INF , scanning stays in this block ti ll the IO is closed o r CLOSESIGNALFILE command is ex ecuted.
ColdFire V1 Full Chip Simulation Connection Elect rical Sign al Genera tors and Si gnals App lication to Devi ce Pins 651 Microc ontrollers Debugger M anual SETSIGNALFILE Command SETSIGNALFILE specifi es the signal file to u se. The SETSIGNALFILE X command creates a virtual SignalGeneratorX modul e having a SignalPin .
ColdFire V1 Full Chip Simulation Connection Electric al Signal Gener ators and Si gnals App lication to Device Pins 652 Microco ntrolle rs Debugger Manua l Remarks A message bo x appears showi ng the line erro r in the case of a signal fil e scripting error.
ColdFire V1 Full Chip Simulation Connection Elect rical Sign al Genera tors and Si gnals App lication to Devi ce Pins 653 Microc ontrollers Debugger M anual WARNING! It is the user’s responsibility to pr operly conne ct inpu t pins t o output pins wit hout bu s or leve l confl icts .
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 654 Microco ntrolle rs Debugger Manua l Command Set to App ly Signal on ATD Pin The foll owing ex ample loa ds the Pi nconn an d Sign al IO com ponents , and crea tes a si gnal generat or gene rati ng the sig nal descr ibed i n square_1_5v_1kHz.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 655 Microc ontrollers Debugger M anual 6. Ch ange th e direc tory i f you want ( Location > Set ) 7. Check C for the lang uage and cl ick Next . 8. Cl ick Nex t again ( you do not want to ad d additio nal fil es) 9.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 656 Microco ntrolle rs Debugger Manua l Step 3 - Target CPU Window The Target CPU window in the center sho ws a footprint of the processor selected for the developmen t. You may increa se the size of the Target CPU window to d isplay more details.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 657 Microc ontrollers Debugger M anual Standa rd and Pro fession al Edi tions offe r a wider r ange of ha rdware and so ftware bea ns than the Specia l Edition.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 658 Microco ntrolle rs Debugger Manua l Figure 28.7 8 Pr oject Windo w - Pr ocessor Exp er t T a b Under Beans you can fi nd the prev iously c reated bea n with the na me AS1:Asynchro Serial .
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 659 Microc ontrollers Debugger M anual Figure 28.7 9 Bean Inspecto r Window Step 7 - Generation of Driver Code We are going to ge nerate the cod e for the I/O drivers and the files for the user code.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 660 Microco ntrolle rs Debugger Manua l Step 9 - Entering User Code 1. Open t he user mo dule MyGuessThe Number.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 661 Microc ontrollers Debugger M anual void main(void) { /*** Processor Expert internal initi alization. DON'T REMOVE THIS CODE! ***/ PE_low_level_init(); /*** End of Processor Expert interna l initialization.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 662 Microco ntrolle rs Debugger Manua l Figure 28.8 0 T erminal Configurati on Dialog 4. Sel ect the Save icon in the d ebugge r (or the men u bar File > Sa ve Co nfig ura tion ) to save the win dow lay out.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 663 Microc ontrollers Debugger M anual Figu re 28.81 Debugg er Main Win dow - Final Ap plic ati on PWM Sample This appli cation use s the PWM . With the final appl ication you will be ab le to change the period and du ty time of the P WM and see the ch anges disp layed i n a chart.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 664 Microco ntrolle rs Debugger Manua l 5. Enter a proje ct name like PW M_Sample 6. Ch ange th e direc tory i f you want ( Location > Set ) 7. Check C for the lang uage and cl ick Next . 8.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 665 Microc ontrollers Debugger M anual Step 6 - Bean Inspector PWM1. PWM In the Bea n Inspe ctor wind ow you can modif y the behav ior of the bea n to suit your needs. General settings ca n be chan ged in the Prop erties tab.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 666 Microco ntrolle rs Debugger Manua l /*** Processor Expert internal initi alization. DON'T REMOVE THIS CODE! ***/ PE_low_level_init(); /*** End of Processor Expert interna l initialization.
ColdFire V1 Full Chip Simulation Connection FCS Tutorial s 667 Microc ontrollers Debugger M anual 6. Sel ect Tar get Periodica l for Type of Unit 7. Sel ect 10 00 for Unit Siz e 8. Sel ect 20 00 for Numb ers o f Un its 9. Leav e all other s o n def ault.
ColdFire V1 Full Chip Simulation Connection FCS Tutorials 668 Microco ntrolle rs Debugger Manua l Figure 28.8 2 Deb ugger Main WI ndow - Final Applicat ion.
669 Microc ontrollers Debugger M anual 29 ColdFire P&E Multilink/ Cyclone Pro Connection This chapter guid es you through the first st eps toward de buggi ng w ith the CodeW arrior ™ IDE and the P&E Multilink/ Cyclone Pro connect ion for ColdFire®.
ColdFire P&E Multilink/Cyclone Pro Connection First Steps Usin g the Statio nery W izard 670 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps toward debugging with the Code Warrior IDE and the P&E Multilin k/Cyclone Pro using th e stationery Wizard: 1.
ColdFire P&E Multilink /Cyclone Pro Connection First Steps From Within a n Existing Pro ject 671 Microc ontrollers Debugger M anual First Steps From Within an Existing Project To take the first st.
ColdFire P&E Multilink/Cyclone Pro Connection First Step s From Within an Existing Project 672 Microco ntrolle rs Debugger Manua l Figure 29.3 Set Deriv a tive Di alog Bo x 8. Press the OK button - The Conne ction M anager dialo g box open s. 9. Select the P&E interface and port.
ColdFire P&E Multilink /Cyclone Pro Connection First Steps From Within a n Existing Pro ject 673 Microc ontrollers Debugger M anual P&E Multilink/Cyclon e Pro Menu Options Once the P&E Multili nk/Cyclon e Pro connec tion is set , the conne ction menu entry in the debu gger main too lbar c hange s to CFMulti linkCyclone Pro .
ColdFire P&E Multilink/Cyclone Pro Connection First Step s From Within an Existing Project 674 Microco ntrolle rs Debugger Manua l Trigger Module Settings Select MultilinkCyclon ePro > Trigger M odule Se ttings to open the Trigger Mo dule Setting s dialog.
ColdFire P&E Multilink /Cyclone Pro Connection First Steps From Within a n Existing Pro ject 675 Microc ontrollers Debugger M anual When c hecking “Program trim data o pen ap plicati on lo ading.
ColdFire P&E Multilink/Cyclone Pro Connection First Step s From Within an Existing Project 676 Microco ntrolle rs Debugger Manua l Figure 29.8 Connect ion Mana ger Dialog B ox Set Derivative Di alog Box This dial og box i s used to set up a de rivative.
677 Microc ontrollers Debugger M anual 30 SofTec ColdFire Connection This chapter guid es you through the first st eps toward de buggi ng w ith the CodeW arrior ™ IDE a nd t he SofTec Co ldFire co nnection . It does not replac e all the ad ditional docum entatio n provi ded in t his man ual, but gi ves yo u a good s tartin g poi nt.
SofTec ColdFire Conn ection First Steps Usin g the Statio nery W izard 678 Microco ntrolle rs Debugger Manua l First Steps Usin g the Stationery Wizard To take the first steps toward debugging with the CodeWa rrior IDE and the SofTec inDART-ColdF ire using the stationery Wiz ard: 1.
SofTec ColdFire Connection First Steps From Within a n Existing Pro ject 679 Microc ontrollers Debugger M anual First Steps From Within an Existing Project To take the first st eps toward debugging with th e CodeWarrior IDE and setting the SofTe c ColdFire c onnection from within a n existing debugging project: 1.
SofTec ColdFire Conn ection First Step s From Within an Existing Project 680 Microco ntrolle rs Debugger Manua l Figure 30.3 Set Deriv a tive Di alog Bo x 8. Press the O K button - Targ et Conn ection di alog box ope ns. 9. Se lect the h ardwar e cable model.
SofTec ColdFire Connection First Steps From Within a n Existing Pro ject 681 Microc ontrollers Debugger M anual SofTec ColdF ire Menu Optio ns Once the S ofT ec ColdFire c onnection is set, the c onnection menu entry in the debug ger main to olba r chan ges to SofT ec-MCF51 .
SofTec ColdFire Conn ection First Step s From Within an Existing Project 682 Microco ntrolle rs Debugger Manua l Flash Select Sof Tec-MC F51 > F lash t o open the Non- Volat ile Mem ory Contro l dial og bo x. For more information see Flash Program ming .
SofTec ColdFire Connection First Steps From Within a n Existing Pro ject 683 Microc ontrollers Debugger M anual provid ed in the Co mmunicatio n Settings d ialog. The debu gger prog rams auto matically this data to the device Fla sh when an a pplication is loaded.
SofTec ColdFire Conn ection First Step s From Within an Existing Project 684 Microco ntrolle rs Debugger Manua l Press the Communication Setting s button in this window to open t he Commun icat ion Settings Dialog Box .
SofTec ColdFire Connection First Steps From Within a n Existing Pro ject 685 Microc ontrollers Debugger M anual The dial og may sli ghtly differ according to cable model.
SofTec ColdFire Conn ection First Step s From Within an Existing Project 686 Microco ntrolle rs Debugger Manua l About Dialog Bo x This dial og bo x belong s to the Sof Tec GDI DLL and pro vides in formati on about the inDART_CFV1.dll release and version.
687 Microc ontrollers Debugger M anual 31 ColdFire On-Chip DBG Module The ColdFire® derivatives featuring an on-chip debugger (DBG) module require a debugg er graphic al user in terface to setup this modu le and tak e full advan tage of this enhanced debugg ing fea ture.
ColdFire On-Chip DBG Module Context M enu Entries i n Source, Data, As sembly an d Memory Windo ws 688 Microco ntrolle rs Debugger Manua l Context Menu Entrie s in Sou rce, Da ta, Assembly and Memory Windows In the Da ta and Memory windows, o nly the Trigge r C is availab le in the con text sensitive conte xt menu , to set w atchpoi nts.
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 689 Microc ontrollers Debugger M anual Trigger Modul e Settings Windo w This window ca n be open ed from context sensitive con text menus .
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 690 Microco ntrolle rs Debugger Manua l •A User Triggers mode, which prov ides two complex breakp oints , trigger s A and B, one comp lex watc hpoint, trigger C, and two spa res clas sic hardw are bre akpoints that can be t as usual ( not in the dialog ).
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 691 Microc ontrollers Debugger M anual Figure 31.4 T race S ettings f or A utomat ic mode Sync PC DBG Feature The Sync PC DBG feature forces the DBG module t o capture t he current program co unter at regular intervals and record this PC in the on-chip DBG bu ffer /FIFO.
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 692 Microco ntrolle rs Debugger Manua l User T riggers mod e When ch oosing the User Tri ggers mo de, th e fu ll stre ngth of the on- chi p DBG module can be explo ited i n the debu gger, p rovid ing emul ator fun ction alitie s.
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 693 Microc ontrollers Debugger M anual Figure 31.7 T rigger Sto p Condition seq uencer The trigg er C pr ovides spe cific data access op tions .
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 694 Microco ntrolle rs Debugger Manua l Expe rt Mode The Expe rt mode i s a “Do It You rself” interface to set the on -chip DBG mo dule. In th at case, th e debugger d oes not use a ny on-chip module resources.
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 695 Microc ontrollers Debugger M anual Figure 3 1.10 Expert T rigger Settings: CSR2 inte ractive tran slation of sta rt/stop condition Gen.
ColdFire On-Chip DBG Module Trigg er Module Sett ings Wind ow 696 Microco ntrolle rs Debugger Manua l Figure 31.1 2 General Settings tab.
697 Microc ontrollers Debugger M anual Book VI - Connection Common Features Book VI Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the enviro nment .
Book VI Con tents 698 Microco ntrolle rs Debugger Manua l.
699 Microc ontrollers Debugger M anual 32 Flash Programming Non-Volatile Memo ry Control Utili ty Introduction Writing t o Flash m odules, EE PROMs, or other n on-volatile m emory mod ules in mode rn MCUs requires special algorithms from microprocessor designers.
Flash Programming Automate d Applicatio n Programm ing 700 Microco ntrolle rs Debugger Manua l Figure 32.1 Flash Pr ogramm ing Acceptanc e Dialog Bo x Select the OK but ton t o launch b ackground Flash commands.
Flash Programming Automated Applicati on Programm ing 701 Microc ontrollers Debugger M anual Advanced Op tions: Erase Prevention Select the Adva nce d button i n the Loa d tab of th e debugg er Pref erenc es dialog box to op en the foll owing sel ectio n dia log box.
Flash Programming NVMC Graph ical User Interfac e 702 Microco ntrolle rs Debugger Manua l NVMC Graphical Us er Interface The NVMC utility is inte grated into the debu gger as an extension of certain debugger connectio ns. If the NVMC utility is available , your conn ection me nu includ es a Flash selection.
Flash Programming NVMC Gr aphic al User Inte rface 703 Microc ontrollers Debugger M anual • Disabled — A disa bled mo dule is no t active on the chip , so progra mming and readi ng are no t possib le. The usual co ntrol for enabl ing or disabl ing a modu le is setting/ clearing a flag i n a special regi ster.
Flash Programming NVMC Graph ical User Interfac e 704 Microco ntrolle rs Debugger Manua l Figure 32.6 Non -V olatile Memory Control Dialog Box For each block, the dialog box has a line compose d of th.
Flash Programming NVMC Gr aphic al User Inte rface 705 Microc ontrollers Debugger M anual The secon d checkb ox of the Con figur atio n group is Save an d restore work space content . If this checkbox i s clear, Fla sh program ming applica tions overwri te any data i n RAM.
Flash Programming NVMC Graph ical User Interfac e 706 Microco ntrolle rs Debugger Manua l NOTE You simply c lick on a module in th e list to select and/or use Select All/ Unselect All bu ttons to adjust y our selection . But selecting a nd unselectin g are not autom atic from th e comman d line.
Flash Programming NVMC Gr aphic al User Inte rface 707 Microc ontrollers Debugger M anual Another way to load an .FPP paramete r file is by clic king the Browse but ton. T his bri ngs up a st anda rd Open di alog box , which yo u can use to sele ct th e file .
Flash Programming NVMC Graph ical User Interfac e 708 Microco ntrolle rs Debugger Manua l Loading an Application in Flash The Load butto n and the Load menu se lection per form the sa me function . Use either of these controls to brin g up the Load Ex ecutable File dialog box , which le ts you sel ect the file to be loaded.
Flash Programming Hardware Cons ideration s 709 Microc ontrollers Debugger M anual Hardware Cons iderations This section c onsists of hardwa re -specific information about current .
Flash Programming NVMC Commands 710 Microco ntrolle rs Debugger Manua l NVMC Commands The following Flash comman ds can be issued th rough the debugg er Command com ponent window, as sho wn in the fi gure belo w. Figure 32.1 0 NVMC Comma nds In Comman d Window FLASH Short D escript ion Displays Fla sh modules, lo ads .
Flash Programming NVMC Commands 711 Microc ontrollers Debugger M anual FLASH INIT <fileName> |AUTOID loads the parameter fil e according to fileName (you can specify th e path). If th is command in cludes AUTOID , the MCUID determine s the parameter fi le ( au toch eck is checked in the NVMC dialo g box).
Flash Programming NVMC Commands 712 Microco ntrolle rs Debugger Manua l FLASH LOADCONTEX restores current buffer content in to the MCU SRAM. FLASH OVLBACKUP backups appl icati on code overla p with pro gramm ing ru ntime/ algorithm (RAM p reset for debug ging).
Flash Programming NVMC Commands 713 Microc ontrollers Debugger M anual Examples FLASH ERASE 2,7 Thi s erases memor y block s 2 and 7. FLASH ERASE 2,4-6 8 Thi s erases me mory block s 2, 4, 5, 6, and 8 . FLASH ERASE This er ases all availa ble mem ory blocks.
Flash Programming NVMC Commands 714 Microco ntrolle rs Debugger Manua l.
715 Microc ontrollers Debugger M anual 33 Debugging Memory Map Introduction The D ebuggin g Memo ry Map (DMM) is a softwa re Mana ger ha ndling a ll debu gger accesses to d evice/ chip memory and also ha ndlin g memory dat a caching.
Debugging Memory Map The DMM GU I 716 Microco ntrolle rs Debugger Manua l Figure 33.1 DMM G raphical U ser Interf ace The DMM GUI shows a list of me mory address ran ges (called Modules in this manual) def ined to access the de vice/c hip me mory.
Debugging Memory Map The DMM G UI 717 Microc ontrollers Debugger M anual Pressing the Revert to Defau lt butt on remo ves (after a war ning d ialog) t he curr ent setu p (usually sa ved in the current projec t) and retrieve s the default (factory) setup from an internal da tabase.
Debugging Memory Map The DMM GU I 718 Microco ntrolle rs Debugger Manua l Access kind The Access Kind list men u provides a way to i ndicate that the mem ory range is read /write (R/W), rea d only, write only or none o f these. When de fined as rea d only, th e range is ne ver written by the debug ger.
Debugging Memory Map The DMM G UI 719 Microc ontrollers Debugger M anual Figure 33.3 DMM T ype sele ction NOTE CPU core-specifi c memory types and Priorit ies are listed at th e end of this section. Priori ties The Prio rity list menu provides a ll types of memo ry o verlap prior ities availab le for a processo r core.
Debugging Memory Map The DMM GU I 720 Microco ntrolle rs Debugger Manua l Memo ry Read Cach ing The Refresh memory when ha lting opti on contr ols the debug ger memory cache. W hen this option is checked, internal im ages/caches of memory da ta are always deleted and the data is alway s retrieved fro m hardware when required by the debugger.
Debugging Memory Map The DMM G UI 721 Microc ontrollers Debugger M anual CPU Core Types and Priorities This section d etails the availa ble cores and th eir respective typ es and priori ties. HCS08 CPU The follo wing types and priorities are available for the HCS08 CPU.
Debugging Memory Map DMM Co mman ds 722 Microco ntrolle rs Debugger Manua l NOTE By fact ory/de fault setu p, HCS0 8 DBG08 Fi fo Regi sters ha ve been prot ecte d to reserve the DBG08 Fifo Reading for the debugger DBG interface. Removing this pr otectio n leads to inco rrect pr ogram f low re build.
Debugging Memory Map DMM Comm ands 723 Microc ontrollers Debugger M anual List of comm ands DMM DMM ADD <parameters> DMM DEL <module handle> DMM SAVE <mcuid> DMM DELETEALLMODULES DMM.
Debugging Memory Map DMM Co mman ds 724 Microco ntrolle rs Debugger Manua l <address> the start address of the memory range <size> the size of the memory ran ge <handle> a long value for the DMM to handle the memory rang e (duplicated handle d is not allowed) .
Debugging Memory Map DMM Comm ands 725 Microc ontrollers Debugger M anual DMM SAVE comma nd Synta x DMM SAVE <mcuid> wit h <mcuid> , a part/d evice MC UID value in ra nge $0-$F FFF. Purp ose Saves the DMM current setup in current project.ini file, un der " DMM_MCUIDxxxx_MODULEn=.
Debugging Memory Map DMM Co mman ds 726 Microco ntrolle rs Debugger Manua l DMM CACHINGON command Synta x DMM CACHINGON Purp ose Data cach ing is engaged (d efault DMM setu p). No refresh on halting is active for memo ry rang e module s define d wit h this op tion.
Debugging Memory Map DMM Comm ands 727 Microc ontrollers Debugger M anual DMM WRITEREADBACKOFF comma nd Synta x DMM WRITEREADBACKOFF Purp ose DMM HCS12M ERHANDLINGON command Synta x DMM HCS12MERHANDLINGON Purp ose Not relevan t for HCS08 and ColdFir e cores.
Debugging Memory Map DMM Co mman ds 728 Microco ntrolle rs Debugger Manua l DMM OPENGUI command Synta x DMM OPENGUI [mcuid] wit h <mcuid> , a part/d evice MC UID value in ra nge $0-$F FFF. Purp ose Opens the DMM Graphical User Interfa ce. Note that the M CUID parameter is not mand atory.
729 Microc ontrollers Debugger M anual Book VII - Commands Book VII Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the environ ment.
Book VII Co ntents 730 Microco ntrolle rs Debugger Manua l.
731 Microc ontrollers Debugger M anual 34 Debugger Engine Commands Commands Overv iew The debu gger sup ports sc riptin g with the use of co mmands and command files . When you script the debugger, you can a utomate repe titive, time-c onsuming, o r complex ta sks.
Debugger Engine Commands Comm ands Overv iew 732 Microco ntrolle rs Debugger Manua l Comma nd Syntax To di splay the syntax of a comm and, t ype the c ommand follo wed b y a question mark. Syntax Example: in>printf? PRINTF (<format>, <expression>, <expre ssion>, .
Debugger Engine Commands Comma nds Over view 733 Microc ontrollers Debugger M anual ENDWHILE Exit s a WHI LE loop FOCUS component Sets t he focus on a specified component FOR [variable =]range [“,.
Debugger Engine Commands Comm ands Overv iew 734 Microco ntrolle rs Debugger Manua l Base Comma nds Base command s are used to mon itor the Simulat or/Debugger targ et execution . Target input/o utput fil es, target ex ecution co ntrol, d irect memor y editing, breakpoint managemen t and CPU r egiste r setup a re handled by these co mmand s.
Debugger Engine Commands Comma nds Over view 735 Microc ontrollers Debugger M anual RS register[=]value{,register[=]value} Sets a regist er S Stops execution of the loaded application STEPIN TO Steps .
Debugger Engine Commands Comm ands Overv iew 736 Microco ntrolle rs Debugger Manua l Environment Comm ands Simulator/Deb ugger environ ment comm ands are used t o monitor the d ebugger environ ment, specifi c componen t window layo uts and framework ap plicatio ns and t argets.
Debugger Engine Commands Comma nds Over view 737 Microc ontrollers Debugger M anual Component Com mands Componen t common co mmands are used to monitor comp onent be haviors. Th ey are common to more than on e componen t. Table 34 .4 contains all av ailable Component commands.
Debugger Engine Commands Comm ands Overv iew 738 Microco ntrolle rs Debugger Manua l Component Specific Commands Componen t specific com mands are associ ated with spec ific comp onents. Table 34 .5 contains al l avai lable Com ponent Spec ific comm ands.
Debugger Engine Commands Comma nds Over view 739 Microc ontrollers Debugger M anual INSP ECTORUP DATE Updates content of Inspector LS [symbol | *][;C|S] Displays the list of symbols NB [base] Sets the.
Debugger Engine Commands Comm ands Overv iew 740 Microco ntrolle rs Debugger Manua l Command Syntax T erms addres s A number ma tching a memory add ress. This numbe r must be in the ANS I format (i .e. $ or 0x for hex adecimal value, 0 for octal, etc.
Debugger Engine Commands Comma nds Over view 741 Microc ontrollers Debugger M anual Example: d:/demo/myfile.txt Example: layout.hwl Example: d:/work/project.hwc comp onent The name of a de bugg er compon ent. A li st of all debugger compone nts is given by choo sing Component > Op en .
Debugger Engine Commands Debug ger Commands 742 Microco ntrolle rs Debugger Manua l Debugger Commands The commands available when you use the Si mulator/D ebugger are defi ned on the follow ing pa ges. A The A command assig ns an expr ession to an exis ting va riabl e.
Debugger Engine Commands Debugge r Commands 743 Microc ontrollers Debugger M anual Example: in>ACTIVATE Memory Activates the Mem ory Component and brings the window to the foreground. ADDXPR The ADDXPR command adds a ne w expression in the data component .
Debugger Engine Commands Debug ger Commands 744 Microco ntrolle rs Debugger Manua l Usage ATTRIBUTES list where list=command{,command}) command=CACHESIZE value Example: command < ATTRIBUTES 2000 In the Procedure Compone nt The ATTRIBUTES command allo ws you to set the disp lay an d state opt ions of the Proc edure com ponent wind ow.
Debugger Engine Commands Debugge r Commands 745 Microc ontrollers Debugger M anual where list=command{,command} command= ADR (ON|OFF) | SMEM range | SPC address | CODE(ON|OFF) | ABSADR (ON|OFF) | TOPPC address | SYMB (ON|OFF) NOTE Also refer to SMEM and SPC command d escriptions for more deta il about these com mands.
Debugger Engine Commands Debug ger Commands 746 Microco ntrolle rs Debugger Manua l The HSCROLLPOS command s ets the po sitio n of the horizo ntal scrol l box ( the hposition value is in columns : a col umn is ab out a tenth of the greates t register or bitfield wi dth).
Debugger Engine Commands Debugge r Commands 747 Microc ontrollers Debugger M anual Scrolls three posit ions down. The third line of registers is disp layed on the top of the regist er compone nt. in>Register < ATTRIBUTES VSCROLLPOS 0 Returns to th e default di splay.
Debugger Engine Commands Debug ger Commands 748 Microco ntrolle rs Debugger Manua l • ATTRIBUTES SMOD ~ Drag and drop from Module co mponent to Source componen t. • ATTRIBUTES SP ROC ~ Drag and dro p from Procedu re componen t to Source componen t.
Debugger Engine Commands Debugge r Commands 749 Microc ontrollers Debugger M anual The MODE command selects the d isplay mode of variabl es. •I n Automatic mode (default), variable s are update d when th e target is stopped. Variables fro m the currently ex ecuted mo dule or proc edure are disp layed i n the data c omponent .
Debugger Engine Commands Debug ger Commands 750 Microco ntrolle rs Debugger Manua l • ATTRIBUTES UPDATERAT E ~ Select m enu Dat a > M ode > P eriod ical • ATTRIBUTES COMPLEMENT ~ Select menu.
Debugger Engine Commands Debugge r Commands 751 Microc ontrollers Debugger M anual – signe d decim al, – unsi gned deci mal or – symbo lic. •T h e COMPLEMENT command sets th e displa y compleme nt for mat of memory values : one sets the first com plement (each bit is reversed ), none deselects t he first compleme nt.
Debugger Engine Commands Debug ger Commands 752 Microco ntrolle rs Debugger Manua l Usage ATTRIBUTES list where list=command{,command}) command=FORMAT(bin|oct|hex|signed|unsigned) | WORD number | ADR .
Debugger Engine Commands Debugge r Commands 753 Microc ontrollers Debugger M anual The COLUMNWIDTH command sets the wi dth of on e column ent ry on the right pane of the Insp ector Wind ow.
Debugger Engine Commands Debug ger Commands 754 Microco ntrolle rs Debugger Manua l The COLLAPS E command folds o ne ite m. The item na me mus t be gi ven.
Debugger Engine Commands Debugge r Commands 755 Microc ontrollers Debugger M anual Equivalent Operations • ATTRIBUTES COLUMNWIDTH ~ Modify column width wi th the mo use. • ATTRIBUTES EXPAND ~ Expand any item with the mou se. • ATTRIBUTES COLLAPS E ~ Collapse the specified item with the m ouse.
Debugger Engine Commands Debug ger Commands 756 Microco ntrolle rs Debugger Manua l AUTOSIZE AUTOSIZE enabl es/disabl es windows autosizin g. When on, th e size of comp onent windows are automaticall y adapted to the S imulator/Debug ger main window when it is resized.
Debugger Engine Commands Debugge r Commands 757 Microc ontrollers Debugger M anual BC BC deletes a b reakpoin t at the s pecified a ddress. When * is speci fied, all break points are delete d.
Debugger Engine Commands Debug ger Commands 758 Microco ntrolle rs Debugger Manua l BCKCOLOR BCKCOLOR sets the bac kgroun d color . The backg round co lor def ined wi th th e BCKCOLO R comma nd is vali d for all compon ent windows.
Debugger Engine Commands Debugge r Commands 759 Microc ontrollers Debugger M anual Components Debu gger eng ine. Example: in>BD Fibonacci 0x805c T Fibonacci 0x8072 P Fibonacci 0x8074 T main 0x8099 T One perman ent and t wo temporary breakpoin ts are set in the fun ction Fibonacci , and o ne t empora ry breakp oint is set in the ma in function .
Debugger Engine Commands Debug ger Commands 760 Microco ntrolle rs Debugger Manua l Usage BS address| function [{mark}] [P|T[ state]][;cond=”condition”[ state]] [;cmd=”command”[ state]][;cur=current[ inter=inte rval]] [;cdSz=codeSize[ srSz=sourceSize]] addr ess is the addre ss wher e the bre akpoi nt is to b e set.
Debugger Engine Commands Debugge r Commands 761 Microc ontrollers Debugger M anual Components Debu gger eng ine. Example: in>BS 0x8000 T Thi s command sets a te mporary b reakp oint at t he addre ss 0x8000. in>BS $8000 This c ommand sets a perma nent b reakpo int a t the address 0x80 00.
Debugger Engine Commands Debug ger Commands 762 Microco ntrolle rs Debugger Manua l Components Debu gger eng ine. Example: in>cf utilconfig.cmd Loads the c onfig command file. CD The CD command changes t he current worki ng directory to the directo ry specif ied in path.
Debugger Engine Commands Debugge r Commands 763 Microc ontrollers Debugger M anual The new p roject dir ector y is C:Program FilesFreescaleCodeWarrior for M icrocontrollers V6.1prog CF The CF command reads the com mands in the sp ecified comm and file, which are then execute d by the comman d interpre ter.
Debugger Engine Commands Debug ger Commands 764 Microco ntrolle rs Debugger Manua l Example Without “;C” Opt ion: If a command1.txt file contains : bckcolor green cf command2.txt bckcolor white If a command2.txt file contains : bckcolor red Executio n: in>cf command1.
Debugger Engine Commands Debugge r Commands 765 Microc ontrollers Debugger M anual If a command2 .txt file contains: bckcolor red Executio n: in>cf command1.txt executing command1.txt !bckcolor green !cf command2.txt ;C executing command2.txt 1!bckcolor red 1! 1! done command2.
Debugger Engine Commands Debug ger Commands 766 Microco ntrolle rs Debugger Manua l CLOSE The CLOSE command i s used to close a co mpone nt. Componen t names are: Assembly , Command, Cov erage, Data , Inspect, IO_Led , Led, Memory, Mod ule, Phone, Procedur e, Profiler, Reco rder, Register, So ftTrace, Source, Stimulatio n.
Debugger Engine Commands Debugge r Commands 767 Microc ontrollers Debugger M anual CMDFILE The CMDFILE command al lows you to de fine all target spec ific comm ands in a command file.
Debugger Engine Commands Debug ger Commands 768 Microco ntrolle rs Debugger Manua l Example: in>cr /Freescale/demo/myrecord.txt ;A The myr ecord.txt file is op ened in “Ap pend” mode for a recordi ng session . CYCLE In the SoftTrace componen t , th e CY CLE co mman d dis plays or h ides cycl es.
Debugger Engine Commands Debugge r Commands 769 Microc ontrollers Debugger M anual When address and range are omit ted, dis assemb ly begi ns at the addr ess o f the instruction t hat follows the last instructio n that has been disassemble d by the m ost recent DASM command.
Debugger Engine Commands Debug ger Commands 770 Microco ntrolle rs Debugger Manua l DB The DB command displ ays the hexadec imal and ASCII values of the bytes i n a specified range of mem ory . The comma nd di splays one or more lines , depe nding on the ad dress or range specified .
Debugger Engine Commands Debugge r Commands 771 Microc ontrollers Debugger M anual DDEPROTOCOL The DDEPROTOCOL c ommand is used to c onfig ure the De bugge r/Si mula tor dynamic data e xchang e (DDE ) prot ocol. By defaul t the DDE proto col is acti vated and not disp layed i n the comma nd line componen t.
Debugger Engine Commands Debug ger Commands 772 Microco ntrolle rs Debugger Manua l DECODE_SKIP In the HC08 CPU and HCS08 CPU co mponent s, the DECODE_SKIP command defi nes usage of SKIP / SKIP2 pseudo in struction s. NOTE The compiler gen erates these pseudo instructio ns by default in order to optimize co de size and sp eed.
Debugger Engine Commands Debugge r Commands 773 Microc ontrollers Debugger M anual processing st arts. A symbol cannot represen t a command name. Note that a symbol definitio n precedes (a nd hence con ceals) a prog ram variabl e with the same name . Defined symb ols remain v alid when a new applica tion is loade d.
Debugger Engine Commands Debug ger Commands 774 Microco ntrolle rs Debugger Manua l Example: A sy mbol named testCase is defined in the test application . /* Loads application test.abs */ LOAD test.abs /* Display value of testCase. */ DB testCase /* Redefine symbol testCase.
Debugger Engine Commands Debugge r Commands 775 Microc ontrollers Debugger M anual DL The DL command displ ays the hexadec imal valu es of the longwo rds in a specified ran ge of me mory. The com mand dis plays o ne or m ore lin es, de pend ing on the addr ess or range specified.
Debugger Engine Commands Debug ger Commands 776 Microco ntrolle rs Debugger Manua l DUMP The DUMP comma nd writes everyt hing visib le in the Data co mponent to the comman d line c ompone nt.
Debugger Engine Commands Debugge r Commands 777 Microc ontrollers Debugger M anual Components Debu gger eng ine. Example: in>DW 0x8000,4 8000: FE80 45FD 8043 2710 The con tent of four words starti ng at 0x8 000 is displa yed as word v alues (two bytes) .
Debugger Engine Commands Debug ger Commands 778 Microco ntrolle rs Debugger Manua l Example: in>define a=0x12 in>define b=0x10 in>e a+b in>=34 The additi on oper ation of the two prev iously defin ed variable s a an d b is ev aluate d and the res ult is displaye d in the Comm and Line wind ow.
Debugger Engine Commands Debugge r Commands 779 Microc ontrollers Debugger M anual Example: if CUR_TARGET == 1000 /* Simulator */ set sim elseif CUR_TARGET == 1001 /* BDI */ set bdi ENDFOCUS The ENDFOCUS command resets the current focus. It is associ ated with the FOCUS command.
Debugger Engine Commands Debug ger Commands 780 Microco ntrolle rs Debugger Manua l ENDFO R The ENDFOR keyword is associated with th e FOR com mand. Usage ENDFOR Components Debu gger eng ine. Example: for i = 1..5 define multi5 = 5 * i endfor After the ENDFOR instruction, i is equal to 5.
Debugger Engine Commands Debugge r Commands 781 Microc ontrollers Debugger M anual ENDWHILE The ENDWHILE keyword is associated with th e WHILE command .
Debugger Engine Commands Debug ger Commands 782 Microco ntrolle rs Debugger Manua l EXIT In the Com mand lin e compon ent, the EXIT command closes the Debugg er applicat ion. Usage EXIT Components Debu gger eng ine. Example: in>EXIT The Debu gger appl ication is closed.
Debugger Engine Commands Debugge r Commands 783 Microc ontrollers Debugger M anual FILTER In the Memory co mponent , with the FILTER command, yo u select wh at you want to displa y, for example modules : module s only , functions : mod ules and func tions, or lines : modu les an d func tions an d code lines .
Debugger Engine Commands Debug ger Commands 784 Microco ntrolle rs Debugger Manua l ;WW match wh ole word is set. Components Source co mpone nt. Example: in>FIND “this” ;B ;WW The “ this ” strin g (considered as a wh ole word) is sea rched in the Sou rce compon ent window.
Debugger Engine Commands Debugge r Commands 785 Microc ontrollers Debugger M anual FOCUS The FOCUS command sets the given co mpone nt ( com ponent ) as the destination for all subseq uent co mmands up to the nex t ENDF OCUS comman d.
Debugger Engine Commands Debug ger Commands 786 Microco ntrolle rs Debugger Manua l FOLD In the Source c omponent , the FOLD comma nd hi des th e source te xt at the pro gram bl ock level. Folded progr am tex t is displ ayed as if the prog ram blo ck was empt y.
Debugger Engine Commands Debugge r Commands 787 Microc ontrollers Debugger M anual FOR The FOR loop allows you to execute all commands up to the tra iling ENDFOR a predefine d number of time s. The bou nds of the rang e and the opt ional ste ps are evaluate d at the be ginni ng.
Debugger Engine Commands Debug ger Commands 788 Microco ntrolle rs Debugger Manua l FPRINTF FPRINTF is the stan dard ANSI C comman d: Wri tes form atte d output string to a file. Usage FPRINTF (<filename>, <&format>, <expression>, <expression>, .
Debugger Engine Commands Debugge r Commands 789 Microc ontrollers Debugger M anual G The G command sta rts code e xecuti on in the emulat ed system at the curre nt address in the progra m coun ter or at the spe cifie d address . You can th erefore specify the entry p oint of your pro gram , skippi ng exe cutio n of the p revious code.
Debugger Engine Commands Debug ger Commands 790 Microco ntrolle rs Debugger Manua l Components Debu gger eng ine. Example: in>GO 0x8000 Program ex ecution is st arted at address 0x8000. RUNNING is disp layed in the statu s bar. T he appl ication runs un til a br eakpoi nt is reached or y ou stop executio n.
Debugger Engine Commands Debugge r Commands 791 Microc ontrollers Debugger M anual GOTOIF The GOTOIF command di verts execu tion of the comm and file to t he command line that follows the label if the co ndition is tru e. Otherwise, the command is ignored.
Debugger Engine Commands Debug ger Commands 792 Microco ntrolle rs Debugger Manua l Example: in>GRAPHICS off HELP In the Com mand lin e compon ent, the HELP co mmand dis plays all availabl e comma nds. Subcomm ands f rom the ATTRIBUTES com mand are not listed.
Debugger Engine Commands Debugge r Commands 793 Microc ontrollers Debugger M anual Usage IF condition Where co ndi tion is sam e as defined in “C” lan guage.
Debugger Engine Commands Debug ger Commands 794 Microco ntrolle rs Debugger Manua l Components Inspector component. Example: in>loadio swap in>Inspect<ATTRIBUTES EXPAND 3 in>INSPECTOROUTPUT “Object Pool” Swap Swap * Name Value Address Init.
Debugger Engine Commands Debugge r Commands 795 Microc ontrollers Debugger M anual LF The LF comman d initiates logging of commands and responses to an external file or device. Wh ile logg ing remains i n effect, any l ine that is app ended to the comman d window is also written to the log file.
Debugger Engine Commands Debug ger Commands 796 Microco ntrolle rs Debugger Manua l LOAD The LOAD comma nd loads a fram ework applica tion ( .abs file) for a debu gging ses si on. When no appli cation nam e is specified, the LoadObjectFile dialog box is ope ned.
Debugger Engine Commands Debugge r Commands 797 Microc ontrollers Debugger M anual • ADD_SYMBOLS appends th e symbol informa tion to the ex isting symbol ta ble instead of re placing it NOTE By defaul t, the LOAD command is “code+symbo ls” with no verification .
Debugger Engine Commands Debug ger Commands 798 Microco ntrolle rs Debugger Manua l LOADSYMBOLS This command is similar to the LOA D com mand but o nly loa ds debu ggin g inform ation into the debugger. This can b e used if the code is alread y loaded into the target system or prog rammed into a non-vol atile m emory de vice.
Debugger Engine Commands Debugge r Commands 799 Microc ontrollers Debugger M anual Usage LOG type [=] state {[,] type [=] state} Where type is one of the following types: CMD LIN E : Commands en tered on the co mmand line. CMD FIL E : Commands read from a file.
Debugger Engine Commands Debug ger Commands 800 Microco ntrolle rs Debugger Manua l bckcolor yellow at 1000 bckcolor white ENDIF The followin g log file i s generated: !define truth = 1 !IF truth ! bc.
Debugger Engine Commands Debugge r Commands 801 Microc ontrollers Debugger M anual i 0x3 (3) !ENDFOR When co mmands executed from a com mand file are logged, al l executed command s that are in the WHILE loop are logg ed the nu mber of ti mes they have been exe cuted.
Debugger Engine Commands Debug ger Commands 802 Microco ntrolle rs Debugger Manua l Example 4: When ex ecuting the fo llowing file: define i = 1 REPEAT define i = i + 1 ls UNTIL i == 4 The followin g .
Debugger Engine Commands Debugge r Commands 803 Microc ontrollers Debugger M anual LS In the Comman d Line wind ow, the LS comman d lists the values of sym bols defined in the symbol ta ble and b y the user . There is n o limit to the numbe r of symbols that can be listed.
Debugger Engine Commands Debug ger Commands 804 Microco ntrolle rs Debugger Manua l When LS is perform ed on a single sy mbol (e.g ., in>l s c ount er ) th at is an applicati on variable a s well as a u ser symbol, the appli cation va riable is displa yed.
Debugger Engine Commands Debugge r Commands 805 Microc ontrollers Debugger M anual MS The MS command sets a specified block of memo ry to a specified l ist of byte val ues. When th e range is wider than the list of by te valu es, the li st of byte va lues is repe ated as many times as n ecessary to fil l the memory bl ock.
Debugger Engine Commands Debug ger Commands 806 Microco ntrolle rs Debugger Manua l Usage NB [base] Where bas e is th e new num ber base (2, 8, 10 o r 16).
Debugger Engine Commands Debugge r Commands 807 Microc ontrollers Debugger M anual Table Example: in>NB 16 The num ber ba se is he xadeci mal. NOCR The NOCR comm and closes the current record file . The record file is o pened with the CR command. Usage NOCR Components Debu gger eng ine.
Debugger Engine Commands Debug ger Commands 808 Microco ntrolle rs Debugger Manua l Components Debu gger eng ine. Example: in>NOLF The current Log File is cl osed.
Debugger Engine Commands Debugge r Commands 809 Microc ontrollers Debugger M anual OUTPUT With OUTP UT , you can red irect the Cov erage comp onent results to an output f ile indica ted by th e path a nd file name. Usage OUTPUT FileName Where FileNa me is file name (path + nam e).
Debugger Engine Commands Debug ger Commands 810 Microco ntrolle rs Debugger Manua l Usage P [address] addr ess : i s an a ddress consta nt exp ressio n, the addr ess at w hich ex ecutio n beg ins. If address is omitted, ex ecution beg ins with the instruction pointe d to by the current value of the program counter.
Debugger Engine Commands Debugge r Commands 811 Microc ontrollers Debugger M anual PRIN TF The PRINTF is th e standard ANSI C command: Prints formatte d output t o the standa rd output st ream. Usage PRINTF (“[Text ]%format specification” , value) Components Debu gger eng ine.
Debugger Engine Commands Debug ger Commands 812 Microco ntrolle rs Debugger Manua l RD The RD com mand dis play s the cont ent o f sp ecifi ed re gist ers.
Debugger Engine Commands Debugge r Commands 813 Microc ontrollers Debugger M anual RECORD In the SoftTrace compon ent , t he RECORD com mand switches frame recording on / off while the target is run ning. Usage RECORD on|off Components SoftTrac e componen t.
Debugger Engine Commands Debug ger Commands 814 Microco ntrolle rs Debugger Manua l RESET In the Profiler a nd Cov erage compon ent , the RESET co mmand resets all reco rded frames (statistics). In the S oftTr ace co mpon ent , the RESET com mand reset s statistics and recorded frames.
Debugger Engine Commands Debugge r Commands 815 Microc ontrollers Debugger M anual RETURN The RETURN command terminat es the current co mmand proces sing level (returns from a CALL command). If executed within a co mmand file, control i s returned to the cal ler of the comm and file (i .
Debugger Engine Commands Debug ger Commands 816 Microco ntrolle rs Debugger Manua l Usage RS register[=]value{,register[=]value} reg ister : Specifi es the na me of a reg ister to be chang ed. Str ing r egister i s any of the CPU regis ter nam es, or nam e of a registe r in the regi ster file .
Debugger Engine Commands Debugge r Commands 817 Microc ontrollers Debugger M anual SAVE The SAVE command saves a spec ified b lock of memory to a speci fied file in Freesc ale S- record format. T he memory block can be reloaded later using the load S-record ( SREC ) command.
Debugger Engine Commands Debug ger Commands 818 Microco ntrolle rs Debugger Manua l breakp oints ( SAVEBP o n) when th e user qui ts the S imulato r/Debu gger or loads anoth er .ABS file. NOTE For more information about this syntax, refer to BS comm and and to the Control P oints chapter.
Debugger Engine Commands Debugge r Commands 819 Microc ontrollers Debugger M anual SETCOLORS The SETCOLORS comman d is use d to chang e the co lors for a spe cific ch annel from the Monitor c omponent. Usage SETCOLORS ( "Name" ) ( Background) ( Cursor ) ( Gr id ) ( Line ) ( Text ) Name is the name of the ch annel to mo dify.
Debugger Engine Commands Debug ger Commands 820 Microco ntrolle rs Debugger Manua l Usage SLAY fileName Components Debu gger eng ine. Example: in>slay /hiwave/demo/mylayout.hwl The cur rent debu gger la yout is sa ved to th e mylayout.h wl f il e in th e /hiwave/demo dire ctory.
Debugger Engine Commands Debugge r Commands 821 Microc ontrollers Debugger M anual SMEM In the Source c omponent , the SME M command loads the corre spondin g module’s source text, scrolls to the correspon ding text locatio n (the code addre ss) and highlights the statement s that corre spond t o th is code add ress rang e.
Debugger Engine Commands Debug ger Commands 822 Microco ntrolle rs Debugger Manua l assembler) (e.g., fibo.c ), since all de bugging in formation is co ntained in the .abs file and object fi les are not used. Ada pt the followin g examples with your .
Debugger Engine Commands Debugge r Commands 823 Microc ontrollers Debugger M anual Components Assemb ler, Memo ry and So urc e compon ent. Example: in>Assembly < SPC 0x8000 The Assembly com ponent wind ow is scrolled to the address 0x80 00 and t he associated instruc tion is high lighted.
Debugger Engine Commands Debug ger Commands 824 Microco ntrolle rs Debugger Manua l SREC The SREC command initia tes the loading o f Freescal e S-Records from a spe cified fil e. NOTE If no path is specified, t he destinatio n directo ry is the curre nt projec t directory.
Debugger Engine Commands Debugge r Commands 825 Microc ontrollers Debugger M anual Example: in>STEPINTO STEP INTO TRACED TRACED in the status lin e indicates that th e application is stopped by an assembly ste p funct ion. STEP OUT The STEPOUT command ex ecutes the remain ing lines of a fu nction in wh ich the current execution point lie s.
Debugger Engine Commands Debug ger Commands 826 Microco ntrolle rs Debugger Manua l STEP OVE R The STEPOVER command exec utes the procedur e as a unit, and then steps t o the next statement in the current procedure.
Debugger Engine Commands Debugge r Commands 827 Microc ontrollers Debugger M anual STOP The STO P comma nd stops executi on of th e emulat ion pro cessor. U se the Go G command to start the emul ator. NOTE The S TOP comma nd e nds a s soon as the P C is ch anged .
Debugger Engine Commands Debug ger Commands 828 Microco ntrolle rs Debugger Manua l Usage T [address][,count] addr ess : i s an a ddres s cons tant ex press ion, th e addr ess w here execu tion be gins. If addr ess is omitted, th e instructi on pointe d to by th e current va lue of the program counter is the first in struction tra ced.
Debugger Engine Commands Debugge r Commands 829 Microc ontrollers Debugger M anual Components Debu gger eng ine. Example: in>TESTBOX "Step 1: init all vars" TUPDATE In Profiler and Coverage co mponents , the TUPDATE command switches th e time update fe ature on / off .
Debugger Engine Commands Debug ger Commands 830 Microco ntrolle rs Debugger Manua l Example: DEFINE test = 1 ... UNDEF test When the tes t va riable is no longe r needed in a comma nd pr ogram, it can be undefi ned an d remo ved fr om the lis t of sy mbols .
Debugger Engine Commands Debugge r Commands 831 Microc ontrollers Debugger M anual application fiboCount 0x800 (2048) counter 0x802 (2050) _startupData 0x84D (2125) Fibonacci 0x867 (2151) main 0x896 (.
Debugger Engine Commands Debug ger Commands 832 Microco ntrolle rs Debugger Manua l UNFOLD In the Source co mponent , the UNFOLD comma nd is us ed to displa y the co ntents o f folded sour ce text block s, for example, source text that has been collapsed at program block level.
Debugger Engine Commands Debugge r Commands 833 Microc ontrollers Debugger M anual UPDATERATE In the Data comp onent and Memory compo nent , the UPDATERATE comma nd is used to set the data refresh update rate. T his command o nly has an effec t if the Data o r Memory compone nt to which it applies is set in Periodi cal Mode.
Debugger Engine Commands Debug ger Commands 834 Microco ntrolle rs Debugger Manua l Procedure 6.0.10 Register 6.0.14 Memory 6.0.19 Data 6.0.27 Data 6.0.27 Simulator Target 6.0.17 Command Line 6.0.16 In the Com mand Line com ponent win dow, Debug ger engine and compon ents versio ns are disp layed.
Debugger Engine Commands Debugge r Commands 835 Microc ontrollers Debugger M anual Example: WAIT 100 T ... Pauses for 1 0 seconds before exe cuting the T Trace instructi on. WB The WB command sets a specif ied blo ck of me mory to a specif ied li st of by te valu es.
Debugger Engine Commands Debug ger Commands 836 Microco ntrolle rs Debugger Manua l WHILE The WHILE command allows you to execut e a sequence o f command s as long as a certain condition is true. T he WHILE command may be nested. This com mand can be stopped by pressing the Esc key.
Debugger Engine Commands Debugge r Commands 837 Microc ontrollers Debugger M anual Usage WL range list rang e : is a n address range c onstant tha t defines the block of m emory to be set to the longwo rd values i n the list. list : is a list of long word values to be store d in the bl ock of memory.
Debugger Engine Commands Debug ger Commands 838 Microco ntrolle rs Debugger Manua l ZOOM In the Data component, the ZOOM command is used to displa y the member fiel ds of structures by ‘di ving’ into the st ructure. In con trast to t he UNFO LD comma nd, where member fields are not expanded in place.
839 Microc ontrollers Debugger M anual Book VIII - Environment Variables Book VIII Conten ts Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the environ ment.
Book VIII Co ntents 840 Microco ntrolle rs Debugger Manua l.
841 Microc ontrollers Debugger M anual 35 Debugger Engine Environment Variables This chapter d escribes t he environm ent vari ables that the Debugg er uses. Ot her tools, such as the Linker, also use some of the se environ ment variables . For more informa tion about other tools, see their respective manuals.
Debugger Engine Environment V ariables Debug ger Environme nt 842 Microco ntrolle rs Debugger Manua l Debugger Environment Various par ameter s of the Debugge r may be set using env ironm ent varia bles. Th e syntax is always the same: Parameter = KeyName "=" ParamDef.
Debugger Engine Envi ronment Variables Debu gge r En vir onm ent 843 Microc ontrollers Debugger M anual • If the t ool is l aunch ed usin g a File Manage r/Expl orer, t he curr ent dire ctor y is the locat ion of th e executab le laun ched.
Debugger Engine Environment V ariables Local C onfigura tion File (usually project.i ni) 844 Microco ntrolle rs Debugger Manua l Local Co nfig uration File (u sual ly pro je ct.in i) The Debugger do es not chan ge the default.env file. Its conten t is read only .
Debugger Engine Envi ronment Variables Local C onfigurat ion Fil e (usuall y project.in i) 845 Microc ontrollers Debugger M anual Default Layo ut Conf iguratio n ( PR OJE CT.IN I ) The defau lt layout activ ated when starting the De bugger is d efined in the PROJECT.
Debugger Engine Environment V ariables Local C onfigura tion File (usually project.i ni) 846 Microco ntrolle rs Debugger Manua l Exam ple: Window5=Memory 50 60 50 30 Window number 5 is a Memory c omponent , its starting position is a t: 50% from main window widt h, 60% fro m main windo w height.
Debugger Engine Envi ronment Variables Local C onfigurat ion Fil e (usuall y project.in i) 847 Microc ontrollers Debugger M anual • The too lbar, status bar, heading line, title b ar and smal l bord.
Debugger Engine Environment V ariables Local C onfigura tion File (usually project.i ni) 848 Microco ntrolle rs Debugger Manua l Select HI-WAVE se ction to retriev e value from : • if an entry Windo.
Debugger Engine Envi ronment Variables Local C onfigurat ion Fil e (usuall y project.in i) 849 Microc ontrollers Debugger M anual NOTE When usi ng Wi nEdi t, do no t s et the system environ ment variable Defaultdir .
Debugger Engine Environment V ariables Environm ent Variab les 850 Microco ntrolle rs Debugger Manua l Enviro nment Va riables The remainde r of this sect ion is devo ted to de scribing each of the environ ment variabl es availabl e for the Debu gger.
Debugger Engine Envi ronment Variables Env iro nmen t V aria bl es 851 Microc ontrollers Debugger M anual Arguments <path> : Paths separated b y semicolons, without sp aces. Description When this e nviro nment vari able is d efi ned, the SmartLink er stores the a bsolute files it produce s in the first dire ctory spe cified.
Debugger Engine Environment V ariables Environm ent Variab les 852 Microco ntrolle rs Debugger Manua l Example: DEFAULTDIR=C:INSTALLPROJECT See al so: The Current Directory Global Initia lization File (MCUTOOLS.
Debugger Engine Envi ronment Variables Env iro nmen t V aria bl es 853 Microc ontrollers Debugger M anual GENPATH: #inc lude “File” Path Tools Comp iler, L inker , Decode r, Burner , Debugg er. Synonym HIP ATH Synta x "GENPATH=" {<path>}.
Debugger Engine Environment V ariables Environm ent Variab les 854 Microco ntrolle rs Debugger Manua l LIBRARYPATH: ‘include <File>’ Path Tools Compiler, ELF t ools (Burner, Linker, Deco der) Synonym LIBPATH Synta x "LIBRARYPATH=" {<path>}.
Debugger Engine Envi ronment Variables Env iro nmen t V aria bl es 855 Microc ontrollers Debugger M anual OBJPATH: Objec t File Path Tools Comp iler, L inker , Decode r, Burner , Debugg er. Synonym None . Synta x "OBJPATH=" <path>. Default Curr ent dir ect ory Arguments <path> : Pat h without spaces.
Debugger Engine Environment V ariables Environm ent Variab les 856 Microco ntrolle rs Debugger Manua l Arguments <direct ory>: Directory to be us ed for temp ora ry files . Default None . Description If a tempora ry file ha s to be create d, normally the ANSI func tion tmpn am() is used.
Debugger Engine Envi ronment Variables Search O rder for Sourc e Files 857 Microc ontrollers Debugger M anual NO , OFF : The envir onme nt varia ble LIBRARYPATH: ‘include <Fil e>’ Path is no t used.
Debugger Engine Environment V ariables Debug ger Files 858 Microco ntrolle rs Debugger Manua l In the Debugger for Object Files (HILOADER) 1. Path code d in the a bsolute file ( .abs ) 2. Abs Fi le direct ory 3. Pr oject fi le direct ory (wher e .pjt or .
Debugger Engine Envi ronment Variables Debugg er Files 859 Microc ontrollers Debugger M anual *.DLL A .DLL file that contains one or m ore functions compiled, linked, and stored separately from the pr ocesses that us e them.
Debugger Engine Environment V ariables Debug ger Files 860 Microco ntrolle rs Debugger Manua l Project.Ini Debugger Project I nitialization File *.REC Recorder File *.REG Register Entries files, for example, mcu081e.reg *.SIM CPU Awareness file, for example, st7.
861 Microc ontrollers Debugger M anual 36 Connection-Specific Environment Variables Some of the envi ronment vari ables that can be used in the deb ugging proc ess are imported with the conn ection software an d are specific to that connection.
Connection-Specific Envir onment Variables Conne ction-Spec ific Envi ronment Variab les 862 Microco ntrolle rs Debugger Manua l.
863 Microc ontrollers Debugger M anual Book IX - Debugger Legacy Book IX Contents Each secti on of the Debugg er manual incl udes informat ion to help you become more familiar wit h the Debugge r, to use al l its functions a nd help you u nderstand how to use the enviro nment .
Book IX Con tents 864 Microco ntrolle rs Debugger Manua l.
865 Microc ontrollers Debugger M anual 37 Legacy PEDebug Target Interface The PEDebug T arget Interfa ce has become “Leg acy” and has b een replace d by specific Debugger Con nections. T he Target Interface term ha s been replac ed by the t erm Connection .
Legacy PEDebug Target Interface Conne ction Sele ction or Ch ange Alw ays Availab le withi n IDE 866 Microco ntrolle rs Debugger Manua l Connection Selection or Chang e Always Availab le with in IDE The CW08 v5.x IDE f eatured a ne w menu opti on in t he Project men u.
867 Microc ontrollers Debugger M anual 38 Legacy Target Interfaces Removed The following hardware Target I nterfaces have been discontinued: For HC08 CPU: • Hitex Emulator Target Interface • MON08.
Legacy Tar get Inte rfaces Re moved 868 Microco ntrolle rs Debugger Manua l.
869 Microc ontrollers Debugger M anual 39 HC(S)08 Full-Chip Simulator Components No Longer Supported List of HC( S)08 FCS Components No Lo nger Support ed The follow ing compo nents can be opened in t he debugg er layout within the Op en Wind ow Compon ent di alog b ox, or with the OP EN comma nd i n the Co mmand window.
HC(S)08 Full-Chip Simulator Components No Longer Supported List of HC(S)08 FC S Componen ts No Longe r Supported 870 Microco ntrolle rs Debugger Manua l • Testterm •T i m e r •W a g o n • Winl.
871 Microc ontrollers Debugger M anual Index A A command 742 A icon 506 About Box 52 Abou t menu e ntry 51 About Optio n 399 About op tio n 500 , 572 , 682 .
872 Microco ntrolle rs Debugger Manua l Hardware 517 Mark ing 11 5 Multiple se lection 161 Permanent 1 57 Position 1 64 Tempor ary 157 , 165 with Registe r Condition 168 Breakpoint with Registe r Cond.
873 Microc ontrollers Debugger M anual RE CORD 8 13 REPEAT 799 , 813 RESET 814 RESTART 814 RETURN 815 RS 815 S8 1 6 SAVE 81 7 SAV EBP 817 SET 818 WHI LE 799 Communi cation 673 , 68 1 USB 408 COMPLEMEN.
874 Microco ntrolle rs Debugger Manua l D DA-C Conf igure fi le type s 221 Conf iguri ng 219 Confi gurin g tools 226 Database dir ector y 22 1 Debugger Interface 230 Debugger name 234 IDE 219 Libra ry path 222 Link Compon ent 76 Ndapi.
875 Microc ontrollers Debugger M anual FIND 78 3 FIND PROC 7 84 FOCU S 7 85 FOLD 78 6 FONT 78 6 FOR 78 7 FPRI NTF 78 8 FRAME S 788 G7 8 9 GO 789 GOTO 790 GOTOIF 791 GRAPHICS 791 HELP 792 IF 792 INSPEC.
876 Microco ntrolle rs Debugger Manua l Decimal mode 151 Default IP address 412 DEFAULT.ENV 8 42 , 851 , 852 , 856 default. mem file 580 DEFAULTDIR 851 DefaultDi r 200 DEFINE command 772 Delete Brea k.
877 Microc ontrollers Debugger M anual Defi ning 421 Record modes 424 EXECUTE comma nd 781 Execute men u entry 625 EXIT comma nd 782 Exit menu entry 35 Exper t mode 512 , 518 Expert trig gers 518 Expl.
878 Microco ntrolle rs Debugger Manua l Find Proce dure dialog box 123 Find Pr ocedur e menu entry 121 FIND PROC co mmand 784 Flas h 674 , 682 Com mands 71 0 Disabling 705 Enablin g 705 Loading 7 08 M.
879 Microc ontrollers Debugger M anual Display 206 displa y 82 Values an d types 79 GO command 789 Go to Frame 536 Go to Frame me nu entr y 1 31 Go to Line di alog bo x 122 Go to Line me nu entr y 1 2.
880 Microco ntrolle rs Debugger Manua l Reset to Normal Mode 481 Sele ct deri vativ e 481 Sele ct Der ivative di alog b ox 483 Set Con nection dia log box 479 Setu p 480 Show St atus 481 Show St atus .
881 Microc ontrollers Debugger M anual Conn ection Mana ger W indow - Adva nced Setting s Tab 384 Conn ection Manage r Wind ow Con nect to Target Ta b 382 Conn ection Mana ger Wi ndow STA TUS Area 387.
882 Microco ntrolle rs Debugger Manua l LED instrum ent attribute s 150 Left menu entry 144 LF command 79 5 LIBPATH 856 LIBRARYPATH 854 Line Co ntinua tion 849 Loa d a conn ecti on 44 Load App licatio.
883 Microc ontrollers Debugger M anual 16-Pin Header Si gnals ta b Stat us Are a 340 Advanced Op tions Dialog Box 343 Cable Connection Co mmunications Type 336 Conn ection Mana ger W indow 16-B it H e.
884 Microco ntrolle rs Debugger Manua l O Object Info Bar 53 OBJPATH 855 Oct menu entry 84 , 95 , 11 3 , 207 Octal 207 Octal format 207 OPEN comma nd 808 Open Comp onent me nu entry 4 8 Open Con figur.
885 Microc ontrollers Debugger M anual Protect DBG FIFO content from u nexpected reads 532 PTRARRAY command 811 Puls e Widt h 152 PVCS 8 57 R R command 256 , 345 , 360 , 378 , 392 , 434 , 473 , 558 R/.
886 Microco ntrolle rs Debugger Manua l First Steps Usin g Statione ry Wizard 562 MCU Config urati on dial og bo x 564 Reset to no rmal mo de 565 Sele ct deri vativ e 564 Sele ct deriva tiv e dialo g .
887 Microc ontrollers Debugger M anual SMEM co mmand 821 SMOD command 821 SofTec ColdFire About 682 Bus Trace 682 CodeWarrior IDE and SofTec Co ldFire conn ection 6 77 Communi cation 681 Commu nicatio.
888 Microco ntrolle rs Debugger Manua l Start reco rding after trig ger hit and halt wh en fifo is full 527 Start/ Cont inue m enu entry 42 Starting an Applica tion 202 Start up 8 44 Startup comma nd .
889 Microc ontrollers Debugger M anual Conf igurat ion 1 99 Defa ult Layo ut Config urati on 845 Demo Version Limitations 26 Drag and Drop 55 Engi ne 25 Layout 8 46 Proje ct 846 proj ect.
890 Microco ntrolle rs Debugger Manua l Coun ting 176 , 184 Definition 1 57 Deleting 1 78 , 184 Read 174 , 182 Read, Write 158 Read/Write 17 5 , 183 Write 175 Watc hpoint s 505 , 510 WB comma nd 835 W.
891 Microc ontrollers Debugger M anual.
892 Microco ntrolle rs Debugger Manua l.
Un punto importante, dopo l’acquisto del dispositivo (o anche prima di acquisto) è quello di leggere il manuale. Dobbiamo farlo per diversi motivi semplici:
Se non hai ancora comprato il Freescale Semiconductor Microcontrollers è un buon momento per familiarizzare con i dati di base del prodotto. Prime consultare le pagine iniziali del manuale d’uso, che si trova al di sopra. Dovresti trovare lì i dati tecnici più importanti del Freescale Semiconductor Microcontrollers - in questo modo è possibile verificare se l’apparecchio soddisfa le tue esigenze. Esplorando le pagine segenti del manuali d’uso Freescale Semiconductor Microcontrollers imparerai tutte le caratteristiche del prodotto e le informazioni sul suo funzionamento. Le informazioni sul Freescale Semiconductor Microcontrollers ti aiuteranno sicuramente a prendere una decisione relativa all’acquisto.
In una situazione in cui hai già il Freescale Semiconductor Microcontrollers, ma non hai ancora letto il manuale d’uso, dovresti farlo per le ragioni sopra descritte. Saprai quindi se hai correttamente usato le funzioni disponibili, e se hai commesso errori che possono ridurre la durata di vita del Freescale Semiconductor Microcontrollers.
Tuttavia, uno dei ruoli più importanti per l’utente svolti dal manuale d’uso è quello di aiutare a risolvere i problemi con il Freescale Semiconductor Microcontrollers. Quasi sempre, ci troverai Troubleshooting, cioè i guasti più frequenti e malfunzionamenti del dispositivo Freescale Semiconductor Microcontrollers insieme con le istruzioni su come risolverli. Anche se non si riesci a risolvere il problema, il manuale d’uso ti mostrerà il percorso di ulteriori procedimenti – il contatto con il centro servizio clienti o il servizio più vicino.