Freescale Semiconductor Microcontrollers инструкция обслуживания

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892

Идти на страницу of

Хорошее руководство по эксплуатации

Законодательство обязывает продавца передать покупателю, вместе с товаром, руководство по эксплуатации Freescale Semiconductor Microcontrollers. Отсутствие инструкции либо неправильная информация, переданная потребителю, составляют основание для рекламации в связи с несоответствием устройства с договором. В законодательстве допускается предоставлении руководства в другой, чем бумажная форме, что, в последнее время, часто используется, предоставляя графическую или электронную форму инструкции Freescale Semiconductor Microcontrollers или обучающее видео для пользователей. Условием остается четкая и понятная форма.

Что такое руководство?

Слово происходит от латинского "instructio", тоесть привести в порядок. Следовательно в инструкции Freescale Semiconductor Microcontrollers можно найти описание этапов поведения. Цель инструкции заключается в облегчении запуска, использования оборудования либо выполнения определенной деятельности. Инструкция является набором информации о предмете/услуге, подсказкой.

К сожалению немного пользователей находит время для чтения инструкций Freescale Semiconductor Microcontrollers, и хорошая инструкция позволяет не только узнать ряд дополнительных функций приобретенного устройства, но и позволяет избежать возникновения большинства поломок.

Из чего должно состоять идеальное руководство по эксплуатации?

Прежде всего в инструкции Freescale Semiconductor Microcontrollers должна находится:
- информация относительно технических данных устройства Freescale Semiconductor Microcontrollers
- название производителя и год производства оборудования Freescale Semiconductor Microcontrollers
- правила обслуживания, настройки и ухода за оборудованием Freescale Semiconductor Microcontrollers
- знаки безопасности и сертификаты, подтверждающие соответствие стандартам

Почему мы не читаем инструкций?

Как правило из-за нехватки времени и уверенности в отдельных функциональностях приобретенных устройств. К сожалению само подсоединение и запуск Freescale Semiconductor Microcontrollers это слишком мало. Инструкция заключает ряд отдельных указаний, касающихся функциональности, принципов безопасности, способов ухода (даже то, какие средства стоит использовать), возможных поломок Freescale Semiconductor Microcontrollers и способов решения проблем, возникающих во время использования. И наконец то, в инструкции можно найти адресные данные сайта Freescale Semiconductor, в случае отсутствия эффективности предлагаемых решений. Сейчас очень большой популярностью пользуются инструкции в форме интересных анимаций или видео материалов, которое лучше, чем брошюра воспринимаются пользователем. Такой вид инструкции позволяет пользователю просмотреть весь фильм, не пропуская спецификацию и сложные технические описания Freescale Semiconductor Microcontrollers, как это часто бывает в случае бумажной версии.

Почему стоит читать инструкции?

Прежде всего здесь мы найдем ответы касательно конструкции, возможностей устройства Freescale Semiconductor Microcontrollers, использования отдельных аксессуаров и ряд информации, позволяющей вполне использовать все функции и упрощения.

После удачной покупки оборудования/устройства стоит посвятить несколько минут для ознакомления с каждой частью инструкции Freescale Semiconductor Microcontrollers. Сейчас их старательно готовят или переводят, чтобы они были не только понятными для пользователя, но и чтобы выполняли свою основную информационно-поддерживающую функцию.

Содержание руководства

  • Страница 1

    Micr ocontr oller s D e b u gg er M anu a l Revised : 22 Octobe r 2007[...]

  • Страница 2

    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. Copyrigh t © 1989–200 7 [...]

  • Страница 3

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1 Introduction 25[...]

  • Страница 4

    Table of Contents 4 Microco ntrolle rs Debugger Manua l Component W indo ws Object Info Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Component Contex t Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Highlights of the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 5

    Table of Contents 5 Microc ontrollers Debugger M anual Breakpoints T ab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Multiple Selections in List Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Checking Expr essions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 6

    Table of Contents 6 Microco ntrolle rs Debugger Manua l Inspecting T ask State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 T ask Description Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Application Ex ample . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 7

    Table of Contents 7 Microc ontrollers Debugger M anual Ho w to V iew Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Ho w to Communicate with the App lication . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 7 CodeW arrior IDE Integration 215 Debug ger Conf iguration . . . . . . . . . . [...]

  • Страница 8

    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 . . . . . . . . . 2 51 11 HC08 Full Chip Sim ulation[...]

  • Страница 9

    Table of Contents 9 Microc ontrollers Debugger M anual Cycle Po wer Radio Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 T arget MC U Security Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 ST A TUS Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 10

    Table of Contents 10 Microco ntrolle rs Debugger Manua l From W i thin an Existing Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 97 inDart-HC08 Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 MCU Conf iguration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 11

    Table of Contents 11 Microc ontrollers Debugger M anual Connection (HCS08 FCS) Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 Peripheral Modules Co mmands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 ADC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]

  • Страница 12

    Table of Contents 12 Microco ntrolle rs Debugger Manua l Monitor Setup W indow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 93 Deri vati ve Selection Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 95 22 SofT ec HCS08 Connection 497 SofT ec HCS08 T echnical Considerations . . . . .[...]

  • Страница 13

    Table of Contents 13 Microc ontrollers Debugger M anual DBG Module Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 T rigger Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 T rigger Module Settings W indo w - Display Inform ation . . . . . . . . . .[...]

  • Страница 14

    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 . . . . . . . . . . . . . 561 First Steps Using the Stationery W izard . . . . . . . . . . . . . . . . .[...]

  • Страница 15

    Table of Contents 15 Microc ontrollers Debugger M anual FCS V isualization Utili ties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Analog Meter Compon ent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 IO_LED Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 16

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 17

    Table of Contents 17 Microc ontrollers Debugger M anual Advan ced Options: Erase Pre ven tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 NVMC Graphical User In terface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 Modules and Module States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 18

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 19

    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 . . . . . . . . . . . . . . . . 869 Index 871[...]

  • Страница 20

    Table of Contents 20 Microco ntrolle rs Debugger Manua l[...]

  • Страница 21

    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. • Introd uction [...]

  • Страница 22

    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.0 Debug Con nectio ns • Co ldFi re V1 Fu ll Ch ip Simul at[...]

  • Страница 23

    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. This bo ok, the Debugge r engin e, defi nes the HC (S)08, RS08, and ColdFi [...]

  • Страница 24

    Book I Con tents 24 Microco ntrolle rs Debugger Manua l[...]

  • Страница 25

    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 . It is a Mult ipurpose Tool tha t you can us e for v arious tasks i n the em bedde d syste m[...]

  • Страница 26

    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 time em bedded deb ugging • Powerful features for True Time Simulation • Various and Sa me look Targe t Interfaces • User Interface • Versati l[...]

  • Страница 27

    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 • Start ing the Debu gger • Debugg er Ma in Window • Componen t Associ ated Menus • Highlights of the User Interface Introduction The Co deWarr ior™[...]

  • Страница 28

    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.dll De bugge r lo ader d ll • *.wnd De bugge r comp onent • [...]

  • Страница 29

    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 .) Figure 2.2 Main Windo w Project [...]

  • Страница 30

    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. F or examp le: c:Program FilesFreescaleCodeWarrior for Microcontrollers V6.1prog[...]

  • Страница 31

    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. For examp le: c:Program FilesFreescaleCodeWarrior for Microcontrollers V6.1proghiwave.exe -nodefaults -Cmd = <Command> This optio n specifies a com mand to be ex ecuted at st art-up:[...]

  • Страница 32

    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.1PROGDEMOTEST.ABS -w -d Debugger Main Win dow Once you st[...]

  • Страница 33

    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. Figur e 2.4 iden tifies each defaul t ic on. Figure 2.4 Deb ugger Main W indow T oolbar[...]

  • Страница 34

    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. View Cont[...]

  • Страница 35

    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.2 File Menu En try Description Menu Entry Descripti on New Creates a new project. Load Appli[...]

  • Страница 36

    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. New variab les are saved i n the current proj ect file whe[...]

  • Страница 37

    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. Figure 2.9 Configuratio n Window - L oad T ab The Co nfigur ation Wi ndow - Load tab contains[...]

  • Страница 38

    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 ). You can se lect small er window borders an d custo[...]

  • Страница 39

    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. [...]

  • Страница 40

    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.15 shows a compo nent [...]

  • Страница 41

    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. Run me nu entries are descr ibed in Ta[...]

  • Страница 42

    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 application from the current program counter (PC) unt il a breakpoint or wat chpoint is reached, runtime error is detected, or user st ops the applicat[...]

  • Страница 43

    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. You can also set breakpoi nts and watchp oints from wi thin the Sour ce and Assembl y comp o[...]

  • Страница 44

    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. 18 ap pears. Load Executable File Window From th e Load E xecutable File wind ow, set the lo[...]

  • Страница 45

    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. Use thi s butto n if no de bugging i s needed . • Loa[...]

  • Страница 46

    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. The Enable Command File check box al lows you to enab le/dis able[...]

  • Страница 47

    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. T he Reset command file executes af ter clicking the r[...]

  • Страница 48

    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.). Select Component > Open to load an extra comp onent wi ndow tha t has not be[...]

  • Страница 49

    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. A text panel displays inform ation about the selected connec tion. NOTE When a co nnec tion c[...]

  • Страница 50

    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. 24 . Figure 2.22 Windo w Menu Figure 2.23 Windo w M[...]

  • Страница 51

    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.25 Help M enu T ab le 2.7 Wind ow Men u Descrip tion Menu entry Descripti on Cascade Option to[...]

  • Страница 52

    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. It cont ains informatio n to send for Registration. You can c[...]

  • Страница 53

    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. 27 , provides information about the selec ted object. Figu re 2.2 7 Ob jec t Info B[...]

  • Страница 54

    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. This[...]

  • Страница 55

    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. Make sure the destina tion compo nent windo w where you wa nt to dra g the obje ct is visi ble. 3.[...]

  • Страница 56

    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 . The “forbidd en” cursor is display ed. T able 2.10 Drag ging fr om th[...]

  • Страница 57

    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 . T ab le 2.11 Dra gging fr om th e Source Compone nt Window Destination Com ponent Window Action Assembly Displays disassemb led instructions star ting at the[...]

  • Страница 58

    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 . Dragging from Register Com ponent Wind ow Tabl[...]

  • Страница 59

    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. You can sele ct the desire d item w[...]

  • Страница 60

    Debugger Interfac e Highl ights of t he User I nterface 60 Microco ntrolle rs Debugger Manua l[...]

  • Страница 61

    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 Introduction • Loadin g Compone nt Window s • Gener al Debu gger C ompone nts • Visualization Utilit ies Compon ent In trodu ction The Debugger[...]

  • Страница 62

    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. Different conn ections are ava ilable t o connect the t arget syst[...]

  • Страница 63

    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 . There are three tabs i n the Open Wind ow Component window: •T h e Icon tab shows[...]

  • Страница 64

    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.3 , disp lays pro gram c ode in di sassemble d form. It has a fun ction very [...]

  • Страница 65

    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.4 Assemb ly Menu T ab le 3.1 Asse mbl y Menu D escription Menu Entry Description Address O[...]

  • Страница 66

    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. NOTE For info rmati on on using br [...]

  • Страница 67

    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. When select ed, sets a permanent breakpoint on this instruction. When pro[...]

  • Страница 68

    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. The Sour ce compone nt windo w scrolls to the source statement g enerating this a ssembly inst ruction and hig[...]

  • Страница 69

    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.7 interprets and execute s all Debugger [...]

  • Страница 70

    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. Recalling a Line from the Command Line History To recall a com mand in the DOS wi ndow use eith er the up or dow n arrow, or the [...]

  • Страница 71

    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. If the Command L ine compo nent is clos ed with th e close button or with the 'Close' entry of the system menu, th e following [...]

  • Страница 72

    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.9 . Figure 3.9 Cache Size Dialog Box This Cache Size dialog box is the same for the[...]

  • Страница 73

    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. Command files with mo re than 20 command s cannot be execu ted. Associate d Commands[...]

  • Страница 74

    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.12 . Figure 3.12 Co verage[...]

  • Страница 75

    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.13 . Sel ect what you[...]

  • Страница 76

    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.14 Co verage S plit View A ssociated Conte xt Menu Drag Out All di splayed item s can be dra[...]

  • Страница 77

    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. The Setu p entry of th e DA-C Lin k main me nu allo ws you t o defin e the conn ection parame[...]

  • Страница 78

    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. Check[...]

  • Страница 79

    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. Changed val ues[...]

  • Страница 80

    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. A red ver tical ba r is disp laye d on the le ft side o f the vari able s on whic h a writ e watchp oint h as been defin ed[...]

  • Страница 81

    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. expressio n entered: (variable_ 1>>~va riable _2)* 0x 1000 re sults in an integer type . N[...]

  • Страница 82

    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. NOTE If the data comp onent mode is not automat ic, entries are gray ed (becaus[...]

  • Страница 83

    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). Format Submenu The Form at Subme nu is activa ted by hi ghlightin[...]

  • Страница 84

    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. T ab le 3.11 Fo rmat Selected and All Subme nu Menu entry Descripti on Symbolic Selec[...]

  • Страница 85

    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. Update Rate Dialog Box The U pdate Ra te dial og bo x show n in Fi gure 3 .25 allo ws you[...]

  • Страница 86

    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.27 P ointer as Arra y Dialog Bo x With in thi s dial og box , yo u can displa y poi nter s as arr a[...]

  • Страница 87

    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.30 Data Conte xt Menu Table 3.13 d escribes the Data Context Me nu entries. T ab le 3.13 Da[...]

  • Страница 88

    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 . This is only suppor ted whe n the comp onent is in Global scop[...]

  • Страница 89

    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. Dragging the vari able v alue d rags th e valu e. NOTE Expressi[...]

  • Страница 90

    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 . Memory Component The Memory window show n in Figur e 3.32 displays unstruct ured memory co ntent or memory du mp, that is c ontinuous memory words wi thout dist inc[...]

  • Страница 91

    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. Memory Address Spaces Some de vices might h[...]

  • Страница 92

    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. For Legacy r easons , the debu gger pr ovides two ways t o display t he ban ked/win dow pag ed memory, suc[...]

  • Страница 93

    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. • Select a mem ory range, and ho ld down the left mouse but ton + R[...]

  • Страница 94

    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.35 W ord Size Submenu T ab le 3.16 Mem ory Menu Descriptio n Menu Entry Descriptio n Word size Open[...]

  • Страница 95

    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. 37 , you can se t the me mory m [...]

  • Страница 96

    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.38 Displa y Subme nu T ab le 3.19 Mode Submenu D escription Menu Entry Description Automatic[...]

  • Страница 97

    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) . Figure 3.39 Fill Memo ry dialog bo x NOTE If Hex Form at is checked, numb[...]

  • Страница 98

    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.41 al lows you to co py a memory ra nge to a specific add ress. Figure 3.41 Cop yMem Di alog Bo x To copy a memory range to a spec ific addres s, enter the source ran ge and the destinatio n address[...]

  • Страница 99

    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. Note that only memo ry ranges de fined with the Refresh memory whe n halting optio n in t[...]

  • Страница 100

    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. Menu contents v ary when the DBG mo dule is avai lable. Figure 3.44 Memor[...]

  • Страница 101

    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. This is the interface t hrough which watchpoints are controlled. (See Cont[...]

  • Страница 102

    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 . Module Comp onent The Mod ule window shown in Figur e 3.45 giv es[...]

  • Страница 103

    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. Module Operations Double-c licking a mo dule name forces all op en windows [...]

  • Страница 104

    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. This list is kn own as the proce dure cha in or the call c hain . Fig[...]

  • Страница 105

    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. Associate d Commands A TTRIBUTES , F[...]

  • Страница 106

    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 . In su[...]

  • Страница 107

    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. Figure 3.51 sh ows the Profiler Ou tput File su bmenu. Entr ies [...]

  • Страница 108

    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.52 Pr ofiler Split Vie w Associated Conte xt Menu Profiler Outpu t File F unctions You can [...]

  • Страница 109

    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. Drag Out All disp layed items can be dra gged ou t. Desti nation windows may dis play i[...]

  • Страница 110

    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. Recorder Operations When there is no rec ord or play sess ion (e[...]

  • Страница 111

    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. L[...]

  • Страница 112

    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. Double-clic k a bit to toggle it. During p[...]

  • Страница 113

    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. T ab le 3.30 Reg ister Me nu Des cription Menu Entry Description Hex Selects t he hexa[...]

  • Страница 114

    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 . Data Draggi[...]

  • Страница 115

    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.e. your app lication file. Figure 3.58 Sour ce Wind ow The Source wi ndow allows y ou to view, chan ge, monit or and control the current ex ecution locat[...]

  • Страница 116

    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. The comp lete path o f the displaye d source file is written i n the Object Inf o bar of th is window[...]

  • Страница 117

    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. This li n[...]

  • Страница 118

    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. Sel ect Set Bre ak point from the context menu. T he per manent bre ak[...]

  • Страница 119

    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 Menu Entry Description Set Breakpoint Appears only in the C ontext M enu if no breakpoint is set or disabled at the nearest code position (visible with m[...]

  • Страница 120

    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. T[...]

  • Страница 121

    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. - The enti re procedur e was not lin ked in [...]

  • Страница 122

    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. It opens the dia log box shown i n Figu re 3.65 . In this d ialog box, enter the line number you want to go to in the source component , and th e select ed line appears at the top of the[...]

  • Страница 123

    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. Find Procedure The Fi nd Pro cedur e dialo g b[...]

  • Страница 124

    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. T ab le 3.34 Fo lding Men u Description Menu Entry Description Unfold Unfolds t he displayed source code Fold Folds the displayed source code Unfold All Text Unfolds all di splayed[...]

  • Страница 125

    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. Associate d Commands ATTRIBUTES , FIN D , FOLD , FI NDPR OC , SPROC , SMOD , [...]

  • Страница 126

    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. [...]

  • Страница 127

    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 . There y ou can cu stomize inpu t to out put devi ce re directi on by adding a[...]

  • Страница 128

    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. Th ey only ha ve an effect if there are a ny connectio ns readi[...]

  • Страница 129

    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.h for further details. How to Use Virtual SCI In its default V irtual SCI config uration t he terminal comp onent acc esses the[...]

  • Страница 130

    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. Figure 3.73 T ra ce Windo w Trace Operations Pointing at a frame and draggi ng the mouse forc es all open wi ndows to sho w the correspond ing[...]

  • Страница 131

    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. (This c ontext menu is not avail able with all conn ection s.) T ab le 3.38 T r[...]

  • Страница 132

    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. T ab le 3.39 T race Associate d Conte xt Men u Descriptio n Menu Entry Description Sea[...]

  • Страница 133

    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 . Associate d Commands CLOCK , CYCLE , FRAMES , RECORD , RESET . Visual ization Utilities Besides co mpone nts th at provi de th e Debug ger en gine a well-def ined s ervice dedi cated to the task o[...]

  • Страница 134

    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. The S wap peripheral d evice is sele cted and reg isters of the Swa p device are displayed. Compo[...]

  • Страница 135

    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. Theref ore the content of local variab les is not displayed. Global varia bles and their typ[...]

  • Страница 136

    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. Since interru pts are usuall y simulated i mmediatel y when they are rai sed[...]

  • Страница 137

    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. Figure[...]

  • Страница 138

    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. 85 , open the IO_Led with the context menu Comp onent -Op[...]

  • Страница 139

    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. It can contain entries desc ribed in Ta ble 3. 41 . T ab le 3.40 In spector Men u Entrie[...]

  • Страница 140

    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. For rema ining items, a n icon w[...]

  • Страница 141

    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 . The Visua lizat ionTo[...]

  • Страница 142

    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. You can a[...]

  • Страница 143

    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 ( *.vtl ). Does not remove the actual instruments .[...]

  • Страница 144

    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. Send to Front At least one selection Brings current ins[...]

  • Страница 145

    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.45 . To v iew the prope rty dialo g box of the V isualiz ationTo ol[...]

  • Страница 146

    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 . To configur e an instru ment, r ight-c lick on an instr ument a nd ch oose P[...]

  • Страница 147

    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.89 Analog Instrum ent Analog in strument a ttributes are sh own in Tabl e 3.47 . Bar Instrument Usi[...]

  • Страница 148

    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. Its attributes a re shown in Table 3.49 . In gene ral, for sho[...]

  • Страница 149

    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 following bi tmaps with their se ttings: • No light on bitmap: AND mask 3, EQUAL mask 0 • Flasher on bitmap: AND mask 3, EQUAL mask 1 • Brake light on[...]

  • Страница 150

    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.52 . 7-Segm ent Dis play I nstrume nt T[...]

  • Страница 151

    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.53 . Switch Instrument Use the Switc h instrument to set or view a de finite bit ( Figu re 3.95 ). The S witch instrumen t also provid es an intere sting debugg ing featu re; you can let it simula t[...]

  • Страница 152

    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. Text ins trument comm on attrib utes a[...]

  • Страница 153

    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). Its att ributes are sho wn in Table 3.5 7 . Relative Valu[...]

  • Страница 154

    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 . Table 3.59 sho ws Command mode at trib utes. CMD Callback mode is the sa me as Comma nd , [...]

  • Страница 155

    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. The ki nd of Port is immediatel y set on “Memo ry?[...]

  • Страница 156

    Debugger Compo nents Visuali zation Utilities 156 Microco ntrolle rs Debugger Manua l[...]

  • Страница 157

    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. Click a ny of t he following li nks to jump to the correspondi ng section of this chap ter: • Introd uction • Breakpoints • Setting Breakpoints • Watchp oints • Setting [...]

  • Страница 158

    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. • Ente r or modify the conditio n of a selected control point. • Enabl e/di[...]

  • Страница 159

    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.1 Sour ce Window Conte xt Menu 1. Point a t a C stateme nt in the S ource wind o[...]

  • Страница 160

    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 (Bre akpoin ts Tab) contains : • List box that display s the li st of cur rent ly defi ned bre akpoi nts • Breakpoint : group bo x that displays t[...]

  • Страница 161

    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). • OK bu tton to v alidate al l modificatio ns. • [...]

  • Страница 162

    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 .ABS file but its exten sion is .BPT (for example, the F[...]

  • Страница 163

    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 .ABS file , the break point is set b u[...]

  • Страница 164

    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. Positions Where a Breakp oint Is Defin able A compound statemen t is one that can be split into several base i[...]

  • Страница 165

    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. Poi nt at a C sta temen t in th[...]

  • Страница 166

    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. Once a pe rmanent brea[...]

  • Страница 167

    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 .[...]

  • Страница 168

    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. A br eakp oint is defin ed on the selected instru ction. 3. Point i[...]

  • Страница 169

    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. The Brea kpoints Setting dialog box i s displ ayed. 3. In the list [...]

  • Страница 170

    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. The debug ger supp orts diff eren t types o f watc hpoints: • Read Acce ss Watchpoi nts, which ar[...]

  • Страница 171

    Control Points Watchpo ints 171 Microc ontrollers Debugger M anual Figure 4.4 Memory Conte xt Menu Figure 4.5 Data Context M enu[...]

  • Страница 172

    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. • Watchpoint : group box that displa ys [...]

  • Страница 173

    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. • [...]

  • Страница 174

    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. Setting a Read W atchp oint A green vertical ba r is displaye d in front of a var[...]

  • Страница 175

    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. Point at a variable in th e Data wind[...]

  • Страница 176

    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. Once a read /write a ccess wa tchpoi nt has[...]

  • Страница 177

    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). The D e[...]

  • Страница 178

    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. Th e Data Context Menu i s displaye d. 2. S[...]

  • Страница 179

    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.cmd). 5. Cl ic[...]

  • Страница 180

    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[...]

  • Страница 181

    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.[...]

  • Страница 182

    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. • Gener al group box tha t co ntains a ch eckbox tha[...]

  • Страница 183

    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. Point at a variable in th e Data windo w and right-cli ck. The Data Co ntext Menu is disp layed . [...]

  • Страница 184

    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. Holding do wn the le ft[...]

  • Страница 185

    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. It also allo ws you to insp ect the st ate of th e applica tion, which in cludes g lobal v ariables , processo r registers and the proce dure ca ll chai n inc[...]

  • Страница 186

    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. This co ntext consists of the CPU co ntext (CPU registers) an d the conte nt of the associat ed[...]

  • Страница 187

    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'. ELSIFPart = 'ELSIF' BoolExpr 'THEN&a[...]

  • Страница 188

    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..R7 = D0..D7, R8..R15 = A0..A7 } { MSG = message displayed in Procedure[...]

  • Страница 189

    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. T his is the cas e when usin g SOOM System/RE M. When anot her kernel [...]

  • Страница 190

    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. To force linking, the name of t he object file has to be immediat ely follow ed by a &[...]

  • Страница 191

    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.osek-vdx.org ). The ORTI enables the atta ched tool t o evaluate and display inf[...]

  • Страница 192

    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). The file describes t he different obj ects configu re[...]

  • Страница 193

    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.2 . Inspecto r wind ow is di spla yed by c licki ng on t he Com ponen t > Open me nu entry and then by c licki ng o n Inspe ct i[...]

  • Страница 194

    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. NOTE Objects and their attrib utes depen d on the OSEK impl ementati on and OSEK configuratio n, and th erefore may d iffer fro[...]

  • Страница 195

    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. Figure 5.4 Inspect or Stack Select S tack in the h ierarchical tree on the left side to d isplay additio nal info rmation concern ing the st ack on the righ t sid[...]

  • Страница 196

    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.6 displa ys th e curre nt stat e of OS EK ala rm tra ce. Figure 5.6 Inspect or Alarm S[...]

  • Страница 197

    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. Figure 5.7 Inspect or Messa ge Select Mes sage in the hi erarchical t ree on the left side to displa y additiona l information concerni ng task on the rig[...]

  • Страница 198

    Real Time K ernel Aw areness OSEK Kernel Aware ness 198 Microco ntrolle rs Debugger Manua l[...]

  • Страница 199

    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 arrior IDE • Automat ing Deb ugger St artu p • How To Load an Applicat ion • How to Start an Application • How to Stop an Application • How [...]

  • Страница 200

    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.INI . The wor king direc tory incl uding the path is de fined in th e environ men[...]

  • Страница 201

    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. 1 .[...]

  • Страница 202

    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. Ch oose HCS08FC S > Load . The Load Execut able File dialog bo x op[...]

  • Страница 203

    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. The blue hi ghlighted line in t he sourc[...]

  • Страница 204

    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: • Choos e Run > Single Step • Click th e Single Step icon fr om the Debug ger to ol bar STEPPED in the status line indicat es that the ap plicati[...]

  • Страница 205

    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. The di[...]

  • Страница 206

    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. Display Global Varia ble fro[...]

  • Страница 207

    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.1 ). • Values f or point er varia bles are d isplaye d in hexad ecimal f ormat . • Val ues[...]

  • Страница 208

    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. The cur rent va riabl e valu e is high light ed and can be edited. 1. Formats for the i[...]

  • Страница 209

    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. • Hol ding do wn the le[...]

  • Страница 210

    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. The current regi ster conten t is highli ghted and may be edited. Figure 6[...]

  • Страница 211

    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. Choose Address Figur[...]

  • Страница 212

    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. 1. The format for the inpu[...]

  • Страница 213

    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. Point in th e Assembly[...]

  • Страница 214

    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.H file and used in the[...]

  • Страница 215

    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.1 or later Debugger Configuration The New Proj ect Wizard i n the Code Warri or IDE ha s defa[...]

  • Страница 216

    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

    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. Applicat ions can use DDE for one-time data trans fers and for ongoing ex chang es in appli cations that send upd ates to on e anothe r as new data bec[...]

  • Страница 218

    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. The c ommand is exe cuted by way of DDE [...]

  • Страница 219

    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. 5. You m ust be runn ing: DA-C - version 3[...]

  • Страница 220

    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. Create New Project Sta rt DA-C.exe an d choo se Project > New Proj ect from th[...]

  • Страница 221

    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. File names in th e original p ath with refere ntial ex[...]

  • Страница 222

    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). This ca n be done by ch oosing Options > Analy sis f or Sy[...]

  • Страница 223

    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. A semicolon separate s directories. Only listed directories are s[...]

  • Страница 224

    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. It also gives you t[...]

  • Страница 225

    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. Analysis of t he project sou rce files and gen e ration [...]

  • Страница 226

    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. P roce dures are def ined in Project > User Defined Ac tions[...]

  • Страница 227

    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. 7 ). In the Toolbar field, you can associ ate a bitmap[...]

  • Страница 228

    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 ). This file is now compil ed a nd the cor respon ding obje ct f ile [...]

  • Страница 229

    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. 9 . In the Menu "Star t" A ction s, click on new and fill in the create d New Action box with " &Make&q[...]

  • Страница 230

    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. T he advanta ges of this connection allow[...]

  • Страница 231

    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). This dll (called Ndap i.dll) is au tomatically installe[...]

  • Страница 232

    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.abs file. Then c lic k on th e [...]

  • Страница 233

    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 ). Figure 9.14 D A-C Windo w You must sa ve this config uration by sele cting F ile > Save Conf[...]

  • Страница 234

    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 . Trou ble shoo ting T[...]

  • Страница 235

    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 .18 ). Figure 9.18 D A-C Connection Sp ecifica[...]

  • Страница 236

    Synchronized Debugging Thr ough DA-C IDE Troub leshooting 236 Microco ntrolle rs Debugger Manua l[...]

  • Страница 237

    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 . This book, the HC08 De bug Conn ection s, defin es the con necti[...]

  • Страница 238

    Book II Co ntents 238 Microco ntrolle rs Debugger Manua l[...]

  • Страница 239

    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. Deb uggin g code usin g the Co deWarri or IDE re[...]

  • Страница 240

    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. HC08 Serial Monitor Consid erations The 8/16 bit debugger (and then the CodeWarri or IDE) might be conn[...]

  • Страница 241

    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. Debugging First Steps Usi[...]

  • Страница 242

    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[...]

  • Страница 243

    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. • C - This se ts up you r applicatio n [...]

  • Страница 244

    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. Cli ck on t he Finish button and the IDE opens. Figure 10.5 C[...]

  • Страница 245

    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. • Minimal sta rtup code - This startup code initia lizes the stack pointer an d ca[...]

  • Страница 246

    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.7 Y our Projec t in Deb ugger Ma in Windo w Switching Co nnections It is possib le to switch co nn[...]

  • Страница 247

    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. Figure 10.9 Set Connectio n Dialog Bo x 2. Select the Proce ssor, for example , HC08[...]

  • Страница 248

    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. T he val ues an d use of each HC08F C[...]

  • Страница 249

    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.1 2 Set Connect ion Dialog Bo x - Connection Menu 2. Within th e Set Connec tion dialog b ox, press the Down Arrow butto n next to the Connection list box to d isplay the list of available c o[...]

  • Страница 250

    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. Figure 10.1 4 P&E ICD Connectio n Manager Dia log Bo x The menu se lect ion MultilinkCyc lonePro > Co mmand Files t[...]

  • Страница 251

    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. Fr om the Debu gger mai n menu, sel ect Component | Set C onnect ion , as shown below. Figure 10.[...]

  • Страница 252

    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

    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. Each der iva tive has a t otall y differ[...]

  • Страница 254

    HC08 Full Chip Simulation Config uration Proc edure 254 Microco ntrolle rs Debugger Manua l Figure 11.2 Connection (HCS0 8FCS) List Menu[...]

  • Страница 255

    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. If y ou cho ose De vice fro m the HC08F CS menu , add itional extend ed menus open that allo w you to select the fa[...]

  • Страница 256

    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 event is c omplete, o r just before it completes t o enable steppin g through the event or any app licati on where cycle-t imed exec ution is desi red[...]

  • Страница 257

    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. Figure 11.6 Registe r Windo w Peripheral Modules Options If you have selected a device (see Select Devic e Option ), the HCS08FCS Co nnection Menu d isplay s a list[...]

  • Страница 258

    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 ality of the Anal og to Digit al Con versi on (ADC) mo dule in cludin g data inpu t on all ADC channels, fla g polling, interrup t operation as well as t[...]

  • Страница 259

    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. ADDI Command The ADDI command allows the [...]

  • Страница 260

    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. Clock Generat ion Mod ule Opt ion In Full Chip Simula tion Mode, this op tion lets you simula te all functiona lity of the Clock Genera tion Mo dule (CG M), inc luding: • Phase L ocked Loop (PLL[...]

  • Страница 261

    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. If P LL interrupt is enabled, FCS jumps to an appro priate subro utine a s long as the inte rrupt v ect[...]

  • Страница 262

    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. Synta x >XTAL <n> Where: n , by defau lt, is a hexad ecimal num ber, repr esenting the s imulated frequ ency of an external osci[...]

  • Страница 263

    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. If you enable the HRP interrupt, the FCS j umps to an appropriate sub[...]

  • Страница 264

    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. The Cycles Window show s the cycle cou nter. The cycle count can be useful for timi[...]

  • Страница 265

    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 . The Shutdown pi n then takes on this state aft er the simulator execut es the nex t[...]

  • Страница 266

    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. The mani pul[...]

  • Страница 267

    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. Synta x >INPUT<x> <n> Where: <x> is the le tter representin g c[...]

  • Страница 268

    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. Th e FCS Mode u[...]

  • Страница 269

    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.1 9 . The use r may t hen use this box to spe cify the inp ut states of port pi ns and IRQ. Figur[...]

  • Страница 270

    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. It displays the current simulated va lues to a ll applicable input ports. See FCS Timer Interface Module Commands for more information about t he various forms of this comman[...]

  • Страница 271

    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. Synta x >INPUT<x> <n> Where: <x> is the letter represen ting co[...]

  • Страница 272

    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 S imulation M ode, this mo dule simulate s all functiona lity of the Multi-M aster Inter-Integrated Circuit (MMIIC) module including: • Flag p olli[...]

  • Страница 273

    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. To b ring up the IIC IN/OUT LOG buffer dialog box, use the IICDO comma nd. Figure 11[...]

  • Страница 274

    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. IICDI Command The IICDI comm and allows the user to input data into a buffer o f data which is shifte[...]

  • Страница 275

    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). The receiving device then genera tes a STOP signal. A[...]

  • Страница 276

    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. T he maximu m number of out put value s that the buffer can h[...]

  • Страница 277

    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. This is done th rough a high -speed seri[...]

  • Страница 278

    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.inc' CANAddress equ $01234567 ; fixed address of this CAN Module org RamStart buffptr ds 2 ; pointer into the local data buffer datap[...]

  • Страница 279

    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: ************************************** ************************* * Init_CAN - The CAN is placed into th e soft reset state, * * where the control and tim ing registers can be * *[...]

  • Страница 280

    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 ; get next byte in message address and #$1C lsla lsla lsla ora #$18 sta CT0IDR1 lda 1,x ; get next byte in message address and #$03 lsla ora CT0IDR1 [...]

  • Страница 281

    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 message data sta CT0DSR3 lda 0a,x ; get the message data sta CT0DSR4 lda 0b,x ; get the message data sta CT0DSR5 lda 0c,x ; get the message data sta CT0DSR[...]

  • Страница 282

    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 CT1IDR2 lda 3,x ; get next byte in message address and #$7F lsla sta CT1IDR3 lda 4,x ; get the message priority sta CT1TBPR lda 5,x ; get the message leng[...]

  • Страница 283

    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 message address and #$80 rola rola ora CT2IDR1 sta CT2IDR1 lda 2,x ; get next byte in message address and #$7F lsla sta CT2IDR2 lda 3,x ; get next byte[...]

  • Страница 284

    HC08 Full Chip Simulation Config uration Proc edure 284 Microco ntrolle rs Debugger Manua l * after a RESET. * ************************************** ************************** MAIN_INIT: rsp ldhx #PacketData ; initialize buffer pointer to start of ; buff er sthx buffptr lda #01 sta CONFIG1 ; disa ble COP watchdog lda #01 sta CONFIG2 ; MSCA ND=0 (e[...]

  • Страница 285

    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. * ************************************** ************************ DUMMY_I[...]

  • Страница 286

    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. In the Fl ash ROM, the message de script ions ar e given, which [...]

  • Страница 287

    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. At th is point a ne w window co mes up as shown i n Figu re 11.27 .[...]

  • Страница 288

    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.2 9 . The user can then set a breakp oint in the interrupt servi ce routine that handles CAN packets and exec ute the code [...]

  • Страница 289

    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. F igu re 11.3 2 s hows t he first CAN packet sent out. Note that the[...]

  • Страница 290

    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. T his resets the b uffers and clears o ut all value s. N[...]

  • Страница 291

    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. CANOUT Command The CANOUT command disp lays[...]

  • Страница 292

    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. FCS Serial Communications Interface Module In FCS Mod e, this modul e simulate[...]

  • Страница 293

    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. To bring up the SCI OUT buffer dialog box, use the SCDO comma nd. Figure 11.36 SCI O UT B[...]

  • Страница 294

    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 . If th e SCI interrupts are ena bled, the FCS jumps to an appropria te subroutine[...]

  • Страница 295

    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. Figure 11.3[...]

  • Страница 296

    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 le simulates all functionalit y of the Slave L IN Interface Controll er (SLIC) Module, inc luding: • Flag p olling • Int errup t enab led mode • [...]

  • Страница 297

    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. To bring up the SLIC OUT[...]

  • Страница 298

    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. F[...]

  • Страница 299

    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.” Su bseque nt byte s may eith er be “data” or “ide ntif[...]

  • Страница 300

    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. An arrow is used to point to the last outp ut packet tr[...]

  • Страница 301

    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. To bring up the SP I OUT buffe r dialog box , use the SPDO comma nd. Figure 11.47 SPI O U[...]

  • Страница 302

    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. If the SPI is[...]

  • Страница 303

    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. Figure 11.[...]

  • Страница 304

    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. If the SPI is configu red for the slave mode, th is command allows the u ser to enter the num ber of cycles <n > [...]

  • Страница 305

    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. To d efine an inpu t state of the spec ific port, use the INPUT<x> <n> command i[...]

  • Страница 306

    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. If the timer chann el interrupt is enab led, the FCS j umps to an appro priate subrou tine as long as t he[...]

  • Страница 307

    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. The cyc les counter counts the number of t[...]

  • Страница 308

    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. Synta x INPUT<x> <n> Where: <x> is the le tter representin g c[...]

  • Страница 309

    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. T hese can be low-spe ed or high-sp eed USB slave dev i[...]

  • Страница 310

    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.pemicro.com ; This application is meant to demonst rate a framework for an ; application [...]

  • Страница 311

    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. * Note that the Vendor and Product IDs specified in this demo are * invalid USB [...]

  • Страница 312

    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 Descriptor IDesc_End: * HID Descriptor HID_Desc: db {HDesc_End-HID_Desc} ; Desc riptor Length db $21 ; Desc riptor Type (HID) db $00,$01 ; HID Class Release [...]

  • Страница 313

    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 field) db $81,$02 ; Inpu t (Data, Variable, Absolute) db $C0 ; End Collection RDesc_End: ************************************** ************************* [...]

  • Страница 314

    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 device descriptor? cbeqa #$2,GETCONDESC ; is i t configuration descriptor? cbeqa #$21,GETHIDDESC ; is i t for HID descriptor? cbeqa #$22,GETREPDESC ; i[...]

  • Страница 315

    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 descriptor sthx descendptr ldhx #REP_Desc ; store pointer to next byte in descriptor GETDESC_END: sthx descptr lda descptr+1 ; add length specified in setup[...]

  • Страница 316

    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 dbnzx SAVE_SETUP lda bmReqType ; if r equest type is standard and #$60 ; then go handle standard request bne SETUP_STALL ; othe rwise, force stall STAN[...]

  • Страница 317

    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_DESC ldhx buffptr ; is d ata buffer filled? cphx #8 beq DATAFILLED ; go send data bra IN_SEND_DATA ; else continue LAST_DESC: clr control ; if s o th[...]

  • Страница 318

    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. * * Interrupts here if packets are received or * * transmitted on any endpoin[...]

  • Страница 319

    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. * **********************[...]

  • Страница 320

    HC08 Full Chip Simulation Config uration Proc edure 320 Microco ntrolle rs Debugger Manua l * Vectors - Specifying Reset and USB I nterrupt Routines * ************************************** ************************ org VectorStart dw dummy_isr ; TIM1 Overflow Vector dw dummy_isr ; TIM1 Channel 1 Vector dw dummy_isr ; TIM1 Channel 0 Vector dw dummy_[...]

  • Страница 321

    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 . All informa tion needed i n these desc riptors, can be found [...]

  • Страница 322

    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.55 . T her e are no U SB pa ckets spec ifie d y et [...]

  • Страница 323

    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. Th e USB peripheral automatically sends out the AC K after the code service s the other[...]

  • Страница 324

    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[...]

  • Страница 325

    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.60 USB Out Buff er Figure 11.61 USB IN Buffer[...]

  • Страница 326

    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. T his shows e xactly what USB packet inform ation w as se nt out f rom th[...]

  • Страница 327

    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. We can go through the same pr[...]

  • Страница 328

    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. Th is resets the buffers[...]

  • Страница 329

    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. If no parame ter is given, th is co mma nd disp la[...]

  • Страница 330

    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. An arro w is used to p oint to the last outpu t packe t transmi t[...]

  • Страница 331

    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. If the URSTD b it is set, th en a USB inte rrupt occurs. S[...]

  • Страница 332

    HC08 Full Chip Simulation Config uration Proc edure 332 Microco ntrolle rs Debugger Manua l[...]

  • Страница 333

    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 c onnection mo de allows the user to de bug code, as the fi rmware is fully resid ent in the FLASH of th e microprocesso r[...]

  • Страница 334

    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. Choo se a device class co[...]

  • Страница 335

    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. S elect the interfa ce to be remov ed an[...]

  • Страница 336

    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 . Whenever po wer is automatica lly or manually switched on, the software waits for a n am[...]

  • Страница 337

    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 . 1. Softwar[...]

  • Страница 338

    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 , but relies on the fact tha t while the ICS is powered off, it holds the target in reset until it is powered up itself and has config ured the MON08 co[...]

  • Страница 339

    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 Si gnals ta b of the P&E Con necti ons Mana ger windo w can be used by the user to manually en ter the pro per security bytes via t he USER setti[...]

  • Страница 340

    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. The d escription [...]

  • Страница 341

    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 . – The processor was not reset properl y. Che ck the Target H ardware Type and, if [...]

  • Страница 342

    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. Memory locations which are inval id or protected read back fro[...]

  • Страница 343

    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. Figure 12.1 0 Adv anced Opti on[...]

  • Страница 344

    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. Start Expert Mode Programme r Option Start Expert M ode Pro gramm e[...]

  • Страница 345

    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. If register files are avai lable for the devic e that you have ch osen, the Choose a Regi ster Blo ck window (s[...]

  • Страница 346

    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. Class 1 Device ICS Board with processor insta[...]

  • Страница 347

    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.1v [...]

  • Страница 348

    MON08 Interface Connection Devic e Clas s Descri ption 348 Microco ntrolle rs Debugger Manua l[...]

  • Страница 349

    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. P& E has combined the benefi ts of each of these mode s, while mini mizing their re spective de fic[...]

  • Страница 350

    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. 1 . 2. Click the OK button to op en the P&E Connectio n Manager Window . Figure[...]

  • Страница 351

    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.2 ). Choose a device class that correspo nds to the Int erface that you are using. Figure 13.3 Int[...]

  • Страница 352

    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. Figure 13.4 P&E Connection Ma[...]

  • Страница 353

    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 . On sys tems which are Class III boards wit h the monitor m ode circui[...]

  • Страница 354

    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.6 P o wer Up Dialog Bo x Cycle[...]

  • Страница 355

    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. Pulse IRQ on Stop The IRQ on Stop allo ws the users to execute a me cha[...]

  • Страница 356

    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. If t he status is ‘N’, which indi cates that the character was no t receive d, it is most li k[...]

  • Страница 357

    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 . – The processor was not rese t proper ly. Che ck the Target [...]

  • Страница 358

    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. Figure 13.8 Addit ional Connectio n Menu Opt ions Advanced Programming/Debug Options The Advan ced Progr ammin g/[...]

  • Страница 359

    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. Trim Options The Calcu late Trim and Program th e Non-Volatile Trim Register check box enabl es aut[...]

  • Страница 360

    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. If register files are avai lable for the devic e that you have ch[...]

  • Страница 361

    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. The registers ca n be viewed and their values[...]

  • Страница 362

    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. The processo r is moun te[...]

  • Страница 363

    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. Turn ing off the power supply is ne[...]

  • Страница 364

    ICS MON08 Interface Connection Devic e Clas s Descri ption 364 Microco ntrolle rs Debugger Manua l[...]

  • Страница 365

    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 M ultilin k/Cyclone Pro conn ection mode al lows the u ser to [...]

  • Страница 366

    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. The device po wer selection allows the user to specify whethe r the target is 2, 3, or 5 Volts, and whe ther this power is switched/gene rated by the P&E interf[...]

  • Страница 367

    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 Multilink and Cycl one Pro Et hernet (IP o uts ide o f subnet m ask), proceed to the Inte rface Sel ection Window by pr essing t he Add A Connection b utt[...]

  • Страница 368

    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. The foll owing is a n explana tion of each part of th e advanced settings dialo g box. Figure 1[...]

  • Страница 369

    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. On systems which are Class III boards with the monito r mode circuitry built-in (including RS- 232 dri ver), t here is no [...]

  • Страница 370

    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.9 P o wer Up Dialog Bo x Cycle Power Down/Up Radio Bu[...]

  • Страница 371

    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.p df applicatio n note th at is availab le from the P &am[...]

  • Страница 372

    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. By ignoring the security check failure y ou can still u [...]

  • Страница 373

    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 . • 2 – D evice e choed all se curity by tes: To pass security, the software must send ei ght security b [...]

  • Страница 374

    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. – The voltag e driven on the powe r pin of t he proce ssor d[...]

  • Страница 375

    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. Active Mode Menu Options When the microp rocessor is connecte[...]

  • Страница 376

    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. Figure 14.1 5 Adv anced Opti [...]

  • Страница 377

    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. Start Expert Mode Progra mmer Option Start Exp e[...]

  • Страница 378

    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. If register files are availa ble for the device th at you have chosen, the Choo se a Regis te[...]

  • Страница 379

    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. 2. Do not step a software interrupt (SWI) command. 3. The har[...]

  • Страница 380

    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. Class 5 Device P&E’s[...]

  • Страница 381

    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 . P&E has combined the benefi ts of each of these mode s, while mini mizing their re[...]

  • Страница 382

    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.1 . Figure 15.1 Set Connectio n Dialog Bo x 2. Click the OK butto n to br ing up th e P&E [...]

  • Страница 383

    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 ecify whether the targ et is 2, 3, or 5 Volts, and whet her this power is switc hed/generated by the P&E in terface or if i t is separat ely supp[...]

  • Страница 384

    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. The followi[...]

  • Страница 385

    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. The se settings a re only v alid for device s with automat [...]

  • Страница 386

    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. This is the default op tion and work s for most, if not all, ICS 08/Target Board solutions.[...]

  • Страница 387

    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. This option works for many ICS boards as well, bu t relies on the fact that whi le the ICS is powered off, it holds the target in reset until it [...]

  • Страница 388

    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. – The bau d rate specified wa s incorrect (prob ably too low). – The ICS/Ta rget[...]

  • Страница 389

    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 . – The processor was not reset properl y. C[...]

  • Страница 390

    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.1 0 Addition al Connection M enu Option s Advanced Programming/Debug Options The Advan ced Progr a[...]

  • Страница 391

    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. Trim Options The Calcu late Trim and Program th e Non-Volatil[...]

  • Страница 392

    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. If register files are availa ble for the dev[...]

  • Страница 393

    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. The registers ca n be viewe[...]

  • Страница 394

    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. One can us e the Cycl one Pro t o debu g and prog ram the firmware inside o f Freescal e M68H C08 micropr ocesso rs via a s[...]

  • Страница 395

    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 Techni cal Conside[...]

  • Страница 396

    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. 2. Ch oose the menu F[...]

  • Страница 397

    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. Ru n the Cod eWarri or IDE . 2. Op en the proj ect. 3. Ch oo[...]

  • Страница 398

    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 . Figure 16.4 inD AR T[...]

  • Страница 399

    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. You can[...]

  • Страница 400

    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. See S top Comma nd Handlin g section in inDAR T®-HC 0[...]

  • Страница 401

    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. This chapte r contains in formation ab out how to use the FSI CEBASE tool t hat helps yo u develop [...]

  • Страница 402

    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: • Processor : 200 MH z Pentium® I I processo r or AMD-K6® cla ss processo r • Ope rating Sy stem: Mic rosof t® Windo ws® 2000 , Windo ws® XP, or[...]

  • Страница 403

    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 • Four software- selec table int ernal ly gener ate d oscill ator c lock sourc es • Comm and and respons e loggin g to dis k files • Ass embly-l [...]

  • Страница 404

    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. Lead s at the othe r end of each ca ble termina te in female p robe tips. Ball clips come[...]

  • Страница 405

    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. Th is sect ion cont ains[...]

  • Страница 406

    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. 3. If you are us ing a USB con nection to con nect you r host comput er directly to the FSI[...]

  • Страница 407

    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 to a host comput er in two ways: • Th rough a n ethe rnet port • Thr ough a USB po rt Communicat ion Thro ugh Ethernet Port If you use an Ethernet [...]

  • Страница 408

    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. In the text box , type t he IP Addr ess that your netwo rk admini strato r assigne d to the FSICEBASE NOTE For more information on the IP addres s of the FSICEBASE, see “Assi gning an IP Addres[...]

  • Страница 409

    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. Setting Up the System In order to [...]

  • Страница 410

    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 . 6. Cl ick OK — The de bugger confi gures it self to work wi th th e conne ction tha t yo[...]

  • Страница 411

    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.1 ) 4. Specif y communica tion info rmation a. If you u se an etherne t connect ion to connec t your host com puter to the FSICEBASE throug h a LAN: • Select TCP/IP, and • Ty[...]

  • Страница 412

    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. Assigning an IP Add ress to FSICEBA SE The FSICEBASE ships from th e factory with th e follow[...]

  • Страница 413

    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.1 . 4. Sel ect USB NOTE You can also use the defaul t IP address to conn ect through TCP/IP. [...]

  • Страница 414

    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. 10. If applicable, in Broadca st Address text bo x, type the IP addres s that you wa nt the FSICEBASE to use a[...]

  • Страница 415

    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. If th e CodeWarrior IDE software does not find an appro priate personality file, the debugger displa ys an e[...]

  • Страница 416

    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. If you [...]

  • Страница 417

    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. Click Save — Save Me mory Con figurat ion dial og box appears b. In Fil [...]

  • Страница 418

    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. 5. Specify c lock spe ed if interna[...]

  • Страница 419

    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. If th e FSICEBASE i s connected to an emulator m odule (EM ), specif y the t[...]

  • Страница 420

    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. To use thi s source, make the [...]

  • Страница 421

    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). [...]

  • Страница 422

    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 ( .abs or .elf f ile) b. If the debugg er has not loaded th[...]

  • Страница 423

    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. R ange does no t refe r to a range of addresses. If you defi ne an even t as a ra nge, the BS A triggers eve ry time the input fal ls between th e range starting term (the first 3 2-bit value) a[...]

  • Страница 424

    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. Continuous: All Cycles After execu tion begi ns, the tr ace buffer begin[...]

  • Страница 425

    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. Otherwise, t he bus state analyze r ca nnot be tr igger ed. [...]

  • Страница 426

    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. If you se lect Externa l, m ake sure to co nnect t he TT_OSC clip (white ) of th e pod B[...]

  • Страница 427

    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. Pl ace mouse curso r over Trac e window b. Ri ght-cli ck mouse — Menu app ears allo wing you t o chang e variou s aspects of the Trace wi ndow The Trace win dow can disp lay trace buff[...]

  • Страница 428

    HC08 FSICEBASE Emula tor Bus State Analyzer (BSA) 428 Microco ntrolle rs Debugger Manua l[...]

  • Страница 429

    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 . This boo k, the HCS08 De bug Co nnecti ons, defi nes th e co[...]

  • Страница 430

    Book III Co ntents 430 Microco ntrolle rs Debugger Manua l[...]

  • Страница 431

    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. The HCS08FCS conn ection simulates the executio n of code on the user’s MCU system, in cluding the function of a ny peripher[...]

  • Страница 432

    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. Figure 18.2 HC08FCS Men u[...]

  • Страница 433

    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. W hen c hoosi ng t he D evice opti on f rom t he HCS08FC S menu, ex tend ed menus op en whic h allow you t[...]

  • Страница 434

    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). View Re gister File s Command The View Register Files sele ction in the[...]

  • Страница 435

    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. Figure 18.7 HCS08 FCS Menu:[...]

  • Страница 436

    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 to Digital Conversion (ADC) module inclu ding data input on all ADC channels, flag pollin g, interrupt o peration a s well as t he bus and CGMXCLK ref[...]

  • Страница 437

    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). Fo r more inform ation o n ADC configu ration, r [...]

  • Страница 438

    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. Clock G enerat ion Modul e In FCS, t his module simulates all fun ctionality of the Clo ck Generation Module (ICG), includ ing: • Phase L ocked Loop (PLL) gene ration • Aut omatic lock [...]

  • Страница 439

    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. If PLL interrupt is enabled, FCS jumps to an appropriat e subro utine, a s long a s the i nterrupt ve[...]

  • Страница 440

    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. Synta x >XTAL <n> Where: [...]

  • Страница 441

    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 . To b ring u p the II C IN/ OUT LOG buffer [...]

  • Страница 442

    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. For more information on how to config ure IIC module for desired operation, refer to the Free scal e us er ma nual[...]

  • Страница 443

    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. An ACK i[...]

  • Страница 444

    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. An arrow poi nts to the last ou tpu[...]

  • Страница 445

    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. See the Input/Outpu t Ports U ser Com mands and Input/Out put [...]

  • Страница 446

    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. Synta x >INPUT<x> <n> Where: <x> is the letter repres[...]

  • Страница 447

    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. Figure 18.1 8 Simulate[...]

  • Страница 448

    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. In the Interrupt Mo de, the simulator bran ch[...]

  • Страница 449

    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.21 . The user may then use[...]

  • Страница 450

    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. FCS mo de uses simula ted port in puts [...]

  • Страница 451

    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. For more informatio[...]

  • Страница 452

    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. Synta x >INPUTS Examp le >INPUTS Show I/ O port input values. Modulo T[...]

  • Страница 453

    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 . Serial Communica tions Interface Modu le In FCS, this module simul ates [...]

  • Страница 454

    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. To bring up the SCI OUT buffer dia log box, use the SCDO comma nd. Figure 18.27 S[...]

  • Страница 455

    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 . If the SCI int erru pts ar e en able d, th e FCS jump s to an ap prop riat e[...]

  • Страница 456

    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. A wind [...]

  • Страница 457

    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 eripheral Interface (SPI) module i ncludi ng: • flag po lling • interrupt enabled mod e • mas ter and slav e mod es • slave in put cloc k • tra[...]

  • Страница 458

    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. After the S PI simulated input is received, the f irst queued value is p assed from the d ata buffer into the SPI data [...]

  • Страница 459

    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 . This resets the bu ffers and clear s out all values. Noti ce that if the SPI is c urrently shift ing a value, this comm and doe s not preven t the SP I from[...]

  • Страница 460

    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. An arrow is used to point to the last outp ut value tra nsmitted[...]

  • Страница 461

    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. [...]

  • Страница 462

    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. Depending on whethe r the input c apture is set for rising/fallin g edge, to trigger t he event, first set[...]

  • Страница 463

    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. To di splay the cu rrent numb e[...]

  • Страница 464

    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). Execution co ntinues un til the cy cle counter is e qual to or g reater tha n the spe cified v alue, un til a key [...]

  • Страница 465

    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. Figure 18.3 9 Sim ulat[...]

  • Страница 466

    HCS08 Full Chip Si mulation Periphera l Module s Comm ands 466 Microco ntrolle rs Debugger Manua l[...]

  • Страница 467

    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 Multilin k/Cyclone Pr o conn ection m ode allows the user to debu g code, as t he firmware is fully resident in th e Flash [...]

  • Страница 468

    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[...]

  • Страница 469

    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 trim referen ce freque ncy option allows th e user to selec t a custom trim value fo r the target device (valid only for devic es with an Intern al Clo[...]

  • Страница 470

    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 . Figure 19.4 Connect ion (Multilink Cyclone Pro) Me nu Devi[...]

  • Страница 471

    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. Figure 19.6 Addit ional Connection M enu Opti ons Debugging Mem ory Map Optio n Select MultilinkCyclo nePro > De bugging [...]

  • Страница 472

    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. Trim Options The Calc[...]

  • Страница 473

    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. PROGHCS08 lets an advanced user control t he step[...]

  • Страница 474

    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 .10 ), which shows a list of the associat[...]

  • Страница 475

    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. The various trace mo des let you choo se approp riate actions to take when a cer tain pattern ( ev[...]

  • Страница 476

    HCS08 P&E Multilink /Cyclone Pro Connection Conne ction Procedure 476 Microco ntrolle rs Debugger Manua l[...]

  • Страница 477

    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. HCS0[...]

  • Страница 478

    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. Ru n the Cod eWarri or IDE . 2. In th e Micro cont[...]

  • Страница 479

    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 . To take the first steps towa rd debuggi[...]

  • Страница 480

    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. Click the OK button to st art debugging . HCS08 Open Source BDM Men u Options Once the HCS08 Op en Source BDM connect ion is set, t he connecti on menu ent ry in the debugge r main t o[...]

  • Страница 481

    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. Unsecu[...]

  • Страница 482

    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. Figure 2[...]

  • Страница 483

    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). Figure 20.6 Sele[...]

  • Страница 484

    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. The “Info rmation re quire[...]

  • Страница 485

    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. Figure 20.8 Show Status Dialog Bo x Press the OK button to clos[...]

  • Страница 486

    HCS08 Open S ource BDM Connectio n First Step s From Within an Existing Project 486 Microco ntrolle rs Debugger Manua l[...]

  • Страница 487

    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. Serial Monitor Tech[...]

  • Страница 488

    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. Ru n the Code W arrior IDE wi th the s hortcut created in the pro gram grou p. [...]

  • Страница 489

    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. Ru n the Cod eWarri or[...]

  • Страница 490

    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. This ID can match several derivatives. 9. Set the cor rect de rivative m[...]

  • Страница 491

    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. Figure 21.6 Monitor Setup Window - V ector T able Mirro ring T ab 12. Press the Aut[...]

  • Страница 492

    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. Figure 21.7 MONIT OR-HCS08 Men u Entries Monitor Commu nication Select the MONITOR-HCS08[...]

  • Страница 493

    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.[...]

  • Страница 494

    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. See the Vector Redirection sec[...]

  • Страница 495

    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 lect a specific deriva tive acco rding to the Syste m Device Identific ation Register (SDIDH, SDIDL) (sometimes called PARTID) returned by the silico n[...]

  • Страница 496

    HCS08 Ser ial Monitor Co nnection First Step s from Within an Existing Proj ect 496 Microco ntrolle rs Debugger Manua l[...]

  • Страница 497

    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 HC S08 Techni cal [...]

  • Страница 498

    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. Ru n the Code Warri or IDE with the sho rtcut cr eated in th e program g[...]

  • Страница 499

    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. Ru n the Cod eWarri or IDE wit h the [...]

  • Страница 500

    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. Press the OK butt on to start de buggi ng. SofTec HCS0 8 Menu Optio ns Once the S ofT ec HCS08 conn ection is set, t he connection menu entry in the debug ger main tool bar chan ges to SofT ec-H[...]

  • Страница 501

    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. Bus Trac[...]

  • Страница 502

    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. Refer to the inDART®- HCS08 In-Circuit De [...]

  • Страница 503

    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. This ch apter describ es the debug ger DBG module user i nterface. Withi n several HCS08 deb[...]

  • Страница 504

    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). Specifi c Connec ti on Menu Optio[...]

  • Страница 505

    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 Windows Specific DBG suppo rt menu opti ons are added to the Connecti on menu as so on as the debu gger ta rget pr ocess or is ac knowled ged by the DB G [...]

  • Страница 506

    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. Figure 23.3 Set T rigger Ad dress A Optio n The trigge r is disp layed i n the Sou rce window an d at the co rrespo[...]

  • Страница 507

    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.[...]

  • Страница 508

    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. Tr igge rs are st ored as Trigger[...]

  • Страница 509

    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. However, the Save and Rest[...]

  • Страница 510

    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. Not e that on ly 2 trigge rs can be set: Tr igger A and trigg er B[...]

  • Страница 511

    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. T o b e dist inguis hed f rom[...]

  • Страница 512

    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. Indeed, to completely separat e the Exp ert mo de fr om the Au tomati c mo de, the debugge r pro vides a second set of trig g[...]

  • Страница 513

    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 and Dat a Windows As shown abov e, expe rt trigg ers are store d in the Mark points tab of the Cont rolpoints Config urati on wind ow as DBGCA and DBGCB[...]

  • Страница 514

    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 . Ho wever, t he a mount of t rigger types is dy[...]

  • Страница 515

    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 . Figure 23.1 2 Sour ce Windo w Extended Menu DBG Support Status Bar Item[...]

  • Страница 516

    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 . Figure 23.14 Status Bar Item Trigg[...]

  • Страница 517

    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. Figure 23.16 T ri[...]

  • Страница 518

    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. The HCS08 c ore manual is need ed to underst and the meanin g of the registers an d flag[...]

  • Страница 519

    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. Code prog ram fl ow rebui ld and da ta recor ding ar e al[...]

  • Страница 520

    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. It can be seen as a “Do It Yourse lf” way t o set hardwar e breakp oints , watchpo ints, and tr[...]

  • Страница 521

    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. Memory Access at Address A This mod e is used to trig ger on a prog ram inst ructi on read and /or wri te at Addres[...]

  • Страница 522

    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. When ch oosing this t rigger type , the trigger B add[...]

  • Страница 523

    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. When ch oosing this t rigger type , the trigger B address[...]

  • Страница 524

    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. The c ode pr ogram fl ow reb uild is displa yed in the Trace Co mpone nt Wi ndo [...]

  • Страница 525

    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. When ch oosing this t rigger type , [...]

  • Страница 526

    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. Special Match value edit boxe s are dis playe d instea d of Address B edit box. Figure 23.2 7[...]

  • Страница 527

    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. DB[...]

  • Страница 528

    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. T he DBG modu le doe s not ha lt the p rocessor /debu gger on trigg er co[...]

  • Страница 529

    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 . Pressing Mod ify Tr igge r [...]

  • Страница 530

    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. The left side of the tree is a user-friendly way to find a trigger address in the debu[...]

  • Страница 531

    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. Howeve r, in some debug special cases, it is possib[...]

  • Страница 532

    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 is halted by the user or a breakpo int, watchpo int or a trigge r, DBG module re sults are aut omatical ly analyzed then display ed in the T race wind[...]

  • Страница 533

    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. The Trace window can be ope ned from Specifi [...]

  • Страница 534

    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 . Graphical Displa y You can select[...]

  • Страница 535

    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. Figure 23.37 T race Window - T extual D ispla y Column Disp lay and Moving Selectin g Item s in the Trace window context sensitiv[...]

  • Страница 536

    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. Figure 23.39 Dump T race Fram es Dialog Box Goto Fr ame Selectin g Go to Frame in the [...]

  • Страница 537

    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. • DBG FIFO Data : the word value retrieved from the DBG Fifo/buffer from DBGFH and [...]

  • Страница 538

    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. • Real tim e code Pro filing a nd code[...]

  • Страница 539

    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. Recording until reset The on-chip DBG [...]

  • Страница 540

    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[...]

  • Страница 541

    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. The T rigger Mod ule Setting s dialog p rovides a new setup to capture th is reco[...]

  • Страница 542

    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.47 Start recor ding fr om Reset tr ace CAUTION After interpreti ng the Tra ce window reco rded informa tion, reset the debugg er and har dware (pr essin g the debu gger R eset but ton) to clea r[...]

  • Страница 543

    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. Figure 23.4 8 Expert T rig gers tab[...]

  • Страница 544

    HCS08 On-Chip DBG Mo dule HCS08 DBG V3 New Features 544 Microco ntrolle rs Debugger Manua l[...]

  • Страница 545

    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. This bo ok, t he RS08 Debugg er Connect ions , define s the con n[...]

  • Страница 546

    Book IV Con tents 546 Microco ntrolle rs Debugger Manua l[...]

  • Страница 547

    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. The RS08FCS co nnection simu lates co de ex ecutio n on th e user ’s MCU system , includ ing the functio n of an y peripheral[...]

  • Страница 548

    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. Figure 24.2 RS08FC S Menu Device Option The Device selection o f the[...]

  • Страница 549

    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. For more information about specifi c module comma nds refer to th[...]

  • Страница 550

    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. The processor is repr esented, i n graphica l form, in the[...]

  • Страница 551

    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. Whe n the master cycle counte r for the si mulator reaches the input value, [...]

  • Страница 552

    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. Th e registers can be v iewed and the ir values mo di[...]

  • Страница 553

    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 Mul tilink/Cyc lone Pro connect ion mode allows the user to debug co de, as the firmware is fully re sident in the FLASH of th e[...]

  • Страница 554

    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 .3 ) allows the use r to connect to an[...]

  • Страница 555

    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. Figure 25.4 Connect ion (MultilinkC yclone Pro) M[...]

  • Страница 556

    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. Active Mode Menu Options When t he mic roproce ssor is c onnec ted, mor e Conn ection Menu optio[...]

  • Страница 557

    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. Trim Programming Checkbox The Trim Programming checkbox en ables [...]

  • Страница 558

    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. The processor is repr esented, i n graphi[...]

  • Страница 559

    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 .11 ), which shows a list of the associat[...]

  • Страница 560

    RS08 P&E Multilink/ Cyclone Pro Connection Conne ction Procedu re 560 Microco ntrolle rs Debugger Manua l[...]

  • Страница 561

    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 [...]

  • Страница 562

    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. Ru n the Cod eWarri or IDE 2. In th e Micro controllers New Pr[...]

  • Страница 563

    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. Ru n the Cod [...]

  • Страница 564

    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. Sel ect the OK button to sta rt debu gging. RS08 Open Source BDM Men u Options Once the RS 08 Open So urce BDM c onnection is se t, the connec tion menu en try in the debugge r main t ool[...]

  • Страница 565

    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. Show Status Option Select RS08 Open Sour ce BDM > Show Sta tus to di splay the Show Sta tus Dial[...]

  • Страница 566

    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). Figure 26.6 Selec[...]

  • Страница 567

    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. Wh[...]

  • Страница 568

    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. Ru n the Code Warri or IDE with the sho rtcut cr eated in th e program g rou[...]

  • Страница 569

    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. 9. St art d ebugg ing.[...]

  • Страница 570

    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. Ru n the Code Warri or IDE with the sho rt[...]

  • Страница 571

    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 . [...]

  • Страница 572

    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. MCU Configu ration Dialog B[...]

  • Страница 573

    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.dll release and version . Figure 27.8 About Dialog Bo x[...]

  • Страница 574

    SofTec RS08 Connection First Step s From Within an Existing Project 574 Microco ntrolle rs Debugger Manua l[...]

  • Страница 575

    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 5 is d ivided in to the follo wing chapters: • [...]

  • Страница 576

    Book V Con tents 576 Microco ntrolle rs Debugger Manua l[...]

  • Страница 577

    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. Each deriva tive has a uni que simulation e ngine to accur ately simulate th e [...]

  • Страница 578

    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.2 and Figure 28.3 ) shows status and other information. As well as executio n status, it includ es a contex t-sensiti ve menu h elp line, an d connecti on-specifi c information su ch as the [...]

  • Страница 579

    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 . NOTE Double-cli cking on the C PU cycles or tru [...]

  • Страница 580

    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. Figure 28.5 Full Chip Sim ulation Connection Com mand Files W indow Setcpu Command File The Se tcpu command file is spe cific to FCS and the Debugger e xecutes the comm and file aft[...]

  • Страница 581

    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.6 ) lets you perform these memory-block operations i nteractively: • Select th e configu ration mode for simulatio n • Define a memo ry block n ame • Define h ow the[...]

  • Страница 582

    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) . Depend ing on your settings, the FCS component[...]

  • Страница 583

    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. You can mo dify su ch entr ies withou t restr iction . NOTE To simulate a n absolute fi le generated in Freescale o bject file for mat, you must open the Memory [...]

  • Страница 584

    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. Memory Block Properties Table 28 .3 lists the prop erties you may speci f[...]

  • Страница 585

    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. [...]

  • Страница 586

    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. • To stor e changes int o the curre ntly select ed memory bl ock, cli ck the [...]

  • Страница 587

    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. The tru e[...]

  • Страница 588

    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 tion ad dresse s, • Data addre ss, data value and read/write ac cess type, • True time, cy cles and total sim ulation cyc les for each instructi on, [...]

  • Страница 589

    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. Value: 0x0, Memory Address: 0x106[...]

  • Страница 590

    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) . Example: in>warning_setup none in>warning_setup clmsg [...]

  • Страница 591

    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. Components Debu gger eng ine. Usage MESSAGE_HIDE_ID <message number(ID)> Example: in>MESSAGE_HIDE_ID 1 in>warning_setup status WARNING_SETUP STATUS: CLMSG Hidden messa[...]

  • Страница 592

    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. FCS and Si licon On-Chip Periph erals Simulation Full Chi p Simulation no t [...]

  • Страница 593

    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. S ee Debugger Statu s Bar [...]

  • Страница 594

    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. It displa ys several in put and o utput co ntrols that ca n be manipul ated with[...]

  • Страница 595

    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. LED col ors are set a t the PO RT addr[...]

  • Страница 596

    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. Figure 28.1 5 LED Setup Dial og Bo x Associ[...]

  • Страница 597

    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. 16 LED Wi ndow The LED component displa ys the value in a bit-wise manner with the most [...]

  • Страница 598

    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.#210 , th e LED bar d isplays the memory byte a t a ddress 0x210 . D[...]

  • Страница 599

    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. Right-clic k within the compone nt to display a context menu with the same menu entries as the Ph[...]

  • Страница 600

    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. Figure 28.20 ADC/D A C Windo w Description The ADC /DAC com ponen t c onsis ts o f fo ur u[...]

  • Страница 601

    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. This compon ent commun icates with the m ainframe[...]

  • Страница 602

    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. This screen o[...]

  • Страница 603

    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. These ports are us ed when this co mponent func tions with the Programma ble IO_P or[...]

  • Страница 604

    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. The Up and Do wn butto ns allow you to define the vertical positi on of the i nput a n[...]

  • Страница 605

    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.26 generat es an i nterrup tion wh en a key i s pressed. Figure 28.26 IT_K eybo ard Window These 20 keys are positioned at the in tersection of the five li nes, X0 to X[...]

  • Страница 606

    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) . • Read the co lumn successi vely, f[...]

  • Страница 607

    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. Figure 28.2 9 Interrupt[...]

  • Страница 608

    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. Figu re 28 .30 LCD Di sp lay Messag e B [...]

  • Страница 609

    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 . In the default co nfigurati on AC is initialized at 00h and increases when an ASCII [...]

  • Страница 610

    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. Figure 28.3 3 LCD Displa y Compone nt Instruction L isting Clear Display • Comple tely fills t he DDRAM with the code 20h (sp ace charac ter)[...]

  • Страница 611

    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. The cursor go es to the second l ine if it exceeds t he 32nd pos it[...]

  • Страница 612

    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. The examp le [...]

  • Страница 613

    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.37 LCD Display Dialog Bo x (Setup) In the P orts address sectio n, for each two ports, you ca[...]

  • Страница 614

    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.3 8 Monitor Wi ndow The purpo se of this com ponent is to di splay the re sults of debugge[...]

  • Страница 615

    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 . In the text area Object to monitor , enter th e object nam e and bit (e.g., T[...]

  • Страница 616

    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.4 2 Change Color s Dialog Bo x Select th e intended eleme nt in the categories fiel d and click C[...]

  • Страница 617

    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.4 4 shows the P ush Buttons m enu and Table 28.8 describes its entry. Fi[...]

  • Страница 618

    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. Figure 28.4 5 Setup Dialog Box NOTE The por t is an ou tput po rt for the [...]

  • Страница 619

    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.4 7 consi sts of f ive I[...]

  • Страница 620

    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. 49 [...]

  • Страница 621

    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. 7-Segments Dis play Compon ent The 7-Seg ments Displ ay window sh own in F[...]

  • Страница 622

    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.1 0 describe s its entry. Figure 28.53 7-Seg ments Displa y Menu T ab le 28.1[...]

  • Страница 623

    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 . Figure 28.54 7-Seg ments Displa y Dialog Bo x (Setup) In the Sele ct a disp lay section, you can[...]

  • Страница 624

    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 . Using th is feat ure you can gener ate (stimulate) interru pts or memory access g[...]

  • Страница 625

    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. If the Limited Size of Cache c heckb ox is clear, the number of lin es is unl[...]

  • Страница 626

    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. This object i s located at address 0x 210 and is 1 byte wid e. Once 200 ,000 cyc les have exe cuted , debugg er accesses t he memo ry locati on 0x21 0 periodic ally 50[...]

  • Страница 627

    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. Reading and writing in the BAUD, SCCR1, SCCR2 or SCSR registers has no effect in the TestTerm co mponent, b ut are requir ed to make th e component c omp[...]

  • Страница 628

    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. Table 28.14 illustrates t he different po ssible redirect ions and ass ociated esca pe sequences where filename is a sequence of chara cters termina ted by a contr[...]

  • Страница 629

    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 file and window), • TERM_TO_FILE (send output t o file fileName ), • TERM_FROM_KEYS (read from keyboard), • TERM_FROM_FILE (read input from fil[...]

  • Страница 630

    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.SCCR2 = 0x0C; /* 8 bit, TE and RE set */ } TestTerm Menu The TestT[...]

  • Страница 631

    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 .62 to simulate in put and o utput. It can receiv e charact ers from severa l input dev[...]

  • Страница 632

    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. You can specify these conn ections by choos in g C onf igur [...]

  • Страница 633

    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. T his enables you to m ake a conn ection to a ny port in the FCS fr[...]

  • Страница 634

    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. The y have an effect only if t here ar[...]

  • Страница 635

    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. To make the termin al componen t work in this default c onfiguratio n, the tar get mus[...]

  • Страница 636

    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. When y ou click the RU N button, the wagon goes t [...]

  • Страница 637

    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. Figure 28.6 8 P or ts Address Sel ection Dialog Bo x In the Motor Port section, yo [...]

  • Страница 638

    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. This tu[...]

  • Страница 639

    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. Ch oose Component > Open >Template . Figu re 28.7 2 shows th e[...]

  • Страница 640

    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.c static void IO_Show(void) { for (;;) { // endless loop dir = 1; do { Delay(); PORT_DATA++; } while ((dir == 1) && (PORT_DAT A != 255)); dir = -1; do { Delay(); PORT_DATA--; } while [...]

  • Страница 641

    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. The a rrow is not rai sing steadily, bu t j[...]

  • Страница 642

    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 . 10. Ch oose Run > Start/Con tinue . After abo ut 300, 000 cy cles the FC S stops on the break[...]

  • Страница 643

    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. Th e exception mnem onic (matchin g the interrupt vec tor number[...]

  • Страница 644

    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.#212; This li ne of co de defin es x as byte mapp ed at addre ss 0x212 in Targ etObj[...]

  • Страница 645

    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. [...]

  • Страница 646

    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” . PerTimedEvent = [“+”] Time AssignmentL[...]

  • Страница 647

    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 . • If “#” is specified, the time is absolute: it is the numb [...]

  • Страница 648

    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} {signal data} Signal Header Description LOOP=<INF| nbr of file loops to perfor m> TIMEUNIT=<NONE|CYCLES|SECONDS> TIMEFACTOR=<double value&[...]

  • Страница 649

    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.051758e-005 2.746582e-004 3.051758e-005 3.051758e-004 3.051758e-005 3.356934e-004 3.051758e-005 3[...]

  • Страница 650

    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. If a numb er is specified , loops th at number o f tim[...]

  • Страница 651

    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 . The file name can in clude th[...]

  • Страница 652

    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. The Sig nal componen t is compat ible with cycl e time durati on modific ation (bus speed c[...]

  • Страница 653

    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 . Pinconn Comm ands CONNECT Conne cts output pin to input. Synta [...]

  • Страница 654

    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.txt . The generator output si gnal pi n connect[...]

  • Страница 655

    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. Ch oose Processor Expert and clic k Next . 10. Cli ck Finish to stay wit[...]

  • Страница 656

    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. In t he device, we se e the different on-ch [...]

  • Страница 657

    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. • Select Bea n Categories > CPU internal periph erals > Communication > Asyn chro Seri al • In the cont ext me nu sel[...]

  • Страница 658

    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 . Step 6 - Bean Inspector AS1:AsynchroSeri al Window In this wind ow you can modify t he behavi or of[...]

  • Страница 659

    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. • Select the Make icon in the P roject Ma nager window ( or the me nu bar Pr oject > M[...]

  • Страница 660

    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.C 2. Insert the following code before the main routine: #include <stdlib.h> void PutChar (unsigned char c) { while (AS1_SendChar(c) == ERR_TXFULL ) { // could wait a bit here[...]

  • Страница 661

    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. ***/ /*Write your code here*/ GuessTheNumber (); /***Processor Expert end of[...]

  • Страница 662

    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. 5. Sel ect the Run icon in the deb ugger (o r the m enu bar Run > Start/Con ti[...]

  • Страница 663

    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. Step 1 -[...]

  • Страница 664

    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. Cl ick Nex t again (y ou do not want to add ad ditiona l files) 9. Ch oose Processor Ex pert and c[...]

  • Страница 665

    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. Softwar e dr ivers are fo und under the Metho ds and Events ta bs[...]

  • Страница 666

    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. ***/ /*Write your code here*/ for(;;) { (void)PWM1_SetRatio16(pwmRatio); } /***Processor Exper[...]

  • Страница 667

    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. Duty Time Bar Properties Now add a b ar to change the duty time. 1. Right mo use click > Ad [...]

  • Страница 668

    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

    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®. It does no t replace all the additio nal docume ntation provi ded in this man ual, but giv[...]

  • Страница 670

    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. Ru n the Code Warri or IDE with the s[...]

  • Страница 671

    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 steps towa rd debuggi ng with the Cod eWarrior IDE an d setting th e P&E Multilin k/Cyclone Pro conn ection from within an e xisting debug ging proj[...]

  • Страница 672

    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. Press the Connect bu tton to start deb ugging. Figure 29.4 Co[...]

  • Страница 673

    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 . Figure 29.5[...]

  • Страница 674

    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. Re fer to the Debugger ColdFire On-chip DBG Module User Interface manua l for all rela[...]

  • Страница 675

    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”, the P &E dri ver calc ulates the data t o be Fl ashed to tr im the devic e accord ing to tri mming inform ation prov ided in the Com municati[...]

  • Страница 676

    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. The list menu can be exp anded to select another ColdFire derivativ e. Figure 29.9 Set Deriv[...]

  • Страница 677

    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 Cold F[...]

  • Страница 678

    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. Ru n the Code Warri or IDE with the sho rtcut cr eated in th e pro[...]

  • Страница 679

    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. Ru n the Cod eWarri or IDE wit h t[...]

  • Страница 680

    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. P ress the Con nect but ton to start debu gging. Figure 30.4 T ar get Connection Dial og B[...]

  • Страница 681

    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 . Figure 30.5 SofT ec-MCF51 Menu O ptions Setup Select Sof Tec-M CF51 > [...]

  • Страница 682

    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 . About Option Select Sof Tec-M CF51 > About to display the About Dia log Box . Bus Trace S[...]

  • Страница 683

    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. When c hecking “Enab le Term inal Pri ntf S upport ”, the debugg er handl es h ar[...]

  • Страница 684

    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 . Figure 30.8 T ar get Connection Dial og Bo x Communication Settings Dialog Box The BD C Cloc k (CLKSW ) grou p is int ended to set[...]

  • Страница 685

    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. For additiona l options set u p within this d ialog, refer t o the inDART ®-ColdFire In-Circui t Debugger/Progr ammer for Freescale Col dFire Family F LASH Devices User’s Manua[...]

  • Страница 686

    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. Figure 30.1 1 About Dialog Box[...]

  • Страница 687

    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. Th is manual descri bes the D BG modul e user inte rface. Within seve ral Col[...]

  • Страница 688

    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. In the Sou[...]

  • Страница 689

    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 in the Source, Data , Memory and Assembly com ponent window s, from the Con nection men u and also wh en click ing on a Statu s Bar di splayed mode (A[...]

  • Страница 690

    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 ). •A Profile an d Cove rage mo[...]

  • Страница 691

    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. Th is is disa bl[...]

  • Страница 692

    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. The A , B and C tabs become accessibl e to give ex act tri[...]

  • Страница 693

    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 . When set ting the Enable Data Compare edit bo x, additio nal fields ar e accessible to specify th e data to compare, the mask, and th e bus inf[...]

  • Страница 694

    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. Re fer to silico n specificatio ns to correctly set up th e DBG module. T[...]

  • Страница 695

    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 General Setting s Automatica lly analyze the FI FO content : When the debugg er halts for any re ason with the Trace win dow open, the DBG mod ule result[...]

  • Страница 696

    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

    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 6 is d ivided in to the follo wing chapters: • Flash [...]

  • Страница 698

    Book VI Con tents 698 Microco ntrolle rs Debugger Manua l[...]

  • Страница 699

    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. Before you write to Flash d evices, y ou must erase them. Man y Flash d evices n eed i[...]

  • Страница 700

    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. Th ese commands arm progra mming, load /program an applicatio n file, t hen disarm p rogramming, and are desc ribe d late r i n th is cha [...]

  • Страница 701

    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. Figure 32.4 Pr ogramming Sele ction The dia log bo x list s all the non- vola tile[...]

  • Страница 702

    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. Figure 32.5 HCS08 Open Sour ce BDM Connec[...]

  • Страница 703

    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. Note that a few mo dules al ways mu[...]

  • Страница 704

    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 the following fi elds: • Name — th e mo dule name • St a r t — the module start address • End — the mo dule end addr ess • St a t e — th[...]

  • Страница 705

    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. Che ck this box to sav e the cur rent RAM d ata. Saving RAM data slow s dow[...]

  • Страница 706

    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. Before you use the comma nd line to perform an y oper[...]

  • Страница 707

    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 . When yo u do so, th e Open dialog bo x disappea rs, and the NVMC u tility loa ds the file[...]

  • Страница 708

    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. The L oad Execu table Fi[...]

  • Страница 709

    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 .FPP files. New .FPP file features are exp lained i n release notes . NOTE The Fl ash p rogr ammin g rele ase not e, in the t oolki t in stallat ion do cume ntation , con[...]

  • Страница 710

    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 .fpp file, or perfor ms Fla sh [...]

  • Страница 711

    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 RELEASE releases the current FP[...]

  • Страница 712

    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). Ex ecute the com mand before load ing the applica tion/file. FLASH OVLRESTORE restores/i[...]

  • Страница 713

    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. While F lash m odule s are armed, execut ion o f user code i s not p ossible . If yo u ente[...]

  • Страница 714

    Flash Programming NVMC Commands 714 Microco ntrolle rs Debugger Manua l[...]

  • Страница 715

    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. The DMM provid es a global app roach for all di fferent CPU families/ cores, each fam ily having its own method for [...]

  • Страница 716

    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. The Type column tells the type of memory for the defined memory addre ss range give n in the Range col[...]

  • Страница 717

    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. Edition dialo g and memory ran ge edition Figu re 33.2 shows th e DM[...]

  • Страница 718

    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. When def ine d as write onl y, the range is ne[...]

  • Страница 719

    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. T he debugg er can have a big[...]

  • Страница 720

    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. Wh en [...]

  • Страница 721

    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. Prior itie s: • highest (debugger) : a high debug ger pr iorit y that can be [...]

  • Страница 722

    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. ColdFire CPU The follo wing types and priorities [...]

  • Страница 723

    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 RELEASECACHES DMM CACHINGON|CACHINGOFF DMM WRITEREADBACKON|WRITEREADBACKOFF DMM HCS12MERHANDLINGON|HCS12MERHANDLIN GOFF DMM OPENGUI [mcuid] DMM SETAH[...]

  • Страница 724

    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) . WARNING! User defin ed handl es must be a value sup erior or eq ual to[...]

  • Страница 725

    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=... " keys. DMM DELETEALLMODULES command Synta x [...]

  • Страница 726

    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. DMM CACHINGOFF command Synta x DMM CACHINGOFF Purp ose Data cach ing is disa bled. T[...]

  • Страница 727

    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. Enables the hand ling of M emory Expans ion Reg isters for HCS1 2 dev ices, i.e. INITRM, IN[...]

  • Страница 728

    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. DMM SETAHEADREADSIZE command Synta x DMM SEATAHEADREADS[...]

  • Страница 729

    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. This bo ok, the Debugge r Comman ds, def ines the HC(S)08 and RS08 comman ds.[...]

  • Страница 730

    Book VII Co ntents 730 Microco ntrolle rs Debugger Manua l[...]

  • Страница 731

    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. You do not n eed to use or have k nowle dge of comma nds to run the Simulator /Debug[...]

  • Страница 732

    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>, ...) Available Comm and Lists Com mands d escrib ed on the foll ow[...]

  • Страница 733

    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 [“,” st ep] FOR l oop instruction FPRINTF (fileName,format,parameters ) FPRINTF instruction GOTO label Unconditional branch to a label i n a command file[...]

  • Страница 734

    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. Base c[...]

  • Страница 735

    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 t o the next sour ce instruction of the loaded application STEPO UT Executes program out of a function call STEPO VER Steps over the next s ource inst[...]

  • Страница 736

    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. Table 34.3 contains all av ailable E nvironm ent comman ds. t T ab le 3[...]

  • Страница 737

    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. T ab le 34.4 Li st of Compo nent Command s Command Sy ntax Short Descrip[...]

  • Страница 738

    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. T ab le 34.5 Li st of Component Specific Commands Command, Sy ntax Short Description ADDXPR ?[...]

  • Страница 739

    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 base of arithmetic operations OUTPUT fileName Redirec ts the coverage component results PTRARRAY on|off Sw itches on /off the pointe r as array dis p[...]

  • Страница 740

    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.). E x a m p l e : 255, 03 77, 0xFF, $FF NOTE address can als o be a n expr ess ion if constant add[...]

  • Страница 741

    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 . The pa rser is case in sensitive. Example: Memory Example: S[...]

  • Страница 742

    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. The qu oted expr ession must be used for strin g and enum expres sions. Usage A [...]

  • Страница 743

    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 . Usage ADDXPR “expression” Where the pa rameter expre ssion is an expr ession to be add[...]

  • Страница 744

    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. The VALUES [...]

  • Страница 745

    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. T he SPC command is similar to[...]

  • Страница 746

    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). hpo sition is the absolute h orizont al scroll posi tion. The valu e 0 represe[...]

  • Страница 747

    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. Th e first line of registers is d isplayed on the top of the regist er compo[...]

  • Страница 748

    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. • ATTRIBUTES MARKS ~ Select menu So urce > Marks . Usage ATTRIBUTES list where list=command{[...]

  • Страница 749

    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 . Variabl es a re upd [...]

  • Страница 750

    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 Data > Format • ATTRIBUTES NAMEW IDTH ~ Selec t menu Data > Options > Name Width Examp le Data:1 < ATTRIBUTES MODE FROZEN In Data:1 (gl[...]

  • Страница 751

    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. •T h e MODE command s[...]

  • Страница 752

    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 (ON|OFF) | ASC (ON|OFF) | ADDRESS address | SPC address | SMEM range | SMOD module | MODE (automatic|periodical| frozen) | UPDATERATE rate | COMPLEMEN[...]

  • Страница 753

    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. The first paramet er (columnn ame) specifies whi ch column. T he following c olumn nam es currently exist: • Names - simple nam e list • Interrupts - interr[...]

  • Страница 754

    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. Th e following command fold s the TargetOb ject: inspect < ATTRIBUTES COLLAPSE “ Object Pool” Tar getObject The S ELECT command sho ws the inf ormation of th e specified item on the rig h[...]

  • Страница 755

    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. • ATTRIBUTES SEL ECT ~ Click o n the specified [...]

  • Страница 756

    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. Usage AUTOSIZE on|off Components Debu gger eng ine. Example: in>AUTOSIZE off [...]

  • Страница 757

    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. You can point to th e breakpo int in th e Assembly or So urce compo nent window , right- click and ch oose Delete Bre akpoint in the cont ext menu , or open [...]

  • Страница 758

    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. Avo id usin g the same col or for th e font and bac kgroun d, oth erwise t ext in the componen t windows is not visibl[...]

  • Страница 759

    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 . [...]

  • Страница 760

    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. T his address is spe cifi[...]

  • Страница 761

    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. BS &FIBO.C:Fibonacci In this exam ple, an expressio[...]

  • Страница 762

    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. When the comm and is entered with no para meter, the cu rrent direc tory [...]

  • Страница 763

    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. The command file contai ns ASCII text [...]

  • Страница 764

    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.txt executing command1.txt !bckcolor green !cf command2.txt executing comma[...]

  • Страница 765

    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.txt done command1.txt CLOCK In the SoftTrace co mponent , the CLOCK c[...]

  • Страница 766

    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. Usage CLOSE component | *[...]

  • Страница 767

    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. For exa mple, startup , preload , reset, and path of th is file. Usage CMDFILE <Command File Kind> ON|OFF [" <Command File Full Name>"] Componen[...]

  • Страница 768

    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. When cycle is off, milliseconds (ms) are displ[...]

  • Страница 769

    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. If this is the first DAS M comm and of a session , disass embly be gins a [...]

  • Страница 770

    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 . Each line shows the address o f the first by te displayed in the [...]

  • Страница 771

    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. Usage DDEPROTOCOL ON|OFF|SHOW|HIDE|STATUS[...]

  • Страница 772

    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. Usage DECODE_SKIP NO [...]

  • Страница 773

    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. An appl ication variab le or I/O[...]

  • Страница 774

    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. */ DEFINE testCase = $800 /*Display value stored at address $800.*/ DB tes[...]

  • Страница 775

    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. E ach line shows th e address of the first lon gword displaye d in th[...]

  • Страница 776

    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. Usage DUMP Components Data com ponen t. Example: in> Data:1 < DUMP DW The DW command disp lays the hexadec imal val ues of t he words in a spe cifie d r[...]

  • Страница 777

    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) . Memory words are di splay ed in the Comma nd Line c omponen t wind ow. E The E command eval [...]

  • Страница 778

    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. The outp ut can be redirected to a file by [...]

  • Страница 779

    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. Following command s are broadcast to all currentl y open com ponents .[...]

  • Страница 780

    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. ENDIF The ENDIF keyword is associ ated with the IF command .[...]

  • Страница 781

    Debugger Engine Commands Debugge r Commands 781 Microc ontrollers Debugger M anual ENDWHILE The ENDWHILE keyword is associated with th e WHILE command . Usage ENDWHILE Components Debu gger eng ine. Example: while i < 5 define multi5 = 5 * i define i = i + 1 endwhile After the ENDWHILE instruc tion, i is equal to 5 EXECUTE In the Stimul ation com[...]

  • Страница 782

    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. FILL In the Memory co mponent , the FILL command fi lls a c orrespon ding ra[...]

  • Страница 783

    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 . You can al so spe cify a range to be lo[...]

  • Страница 784

    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. The search i s performed back ward. FINDPROC If a vali d procedur[...]

  • Страница 785

    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. Hence, the focu s command releases the use r from repeatedl y specifying t he same command red irection, esp ecially[...]

  • Страница 786

    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. When the folde d block i s unfol ded, th e hidden progra m text r eappea rs. All te xt [...]

  • Страница 787

    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. A vari able (either a symbol or a program varia ble) ma y be opt iona [...]

  • Страница 788

    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>, ...) Components Debu gger eng ine. Example: fprintf (test.txt,"%s %2d&qu[...]

  • Страница 789

    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. Usage G [addr[...]

  • Страница 790

    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. GOTO The GOTO command di verts execu t[...]

  • Страница 791

    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. The GOTOIF command fails, if the conditio n is true and the label is not found . Usage GOTOIF[...]

  • Страница 792

    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. Componen t specific com mands, which are not open , are not liste d. Usage HELP Compon[...]

  • Страница 793

    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. Components Debu gger eng ine. Example: DEFINE jump = 0 ... DEFINE jump = jump + 1 ... IF jump == 10 T DEFINE jump = 0 ELSEIF jump == 100 DEFINE jump = 1 ELSE DEFINE jump = 2 ENDIF The jump[...]

  • Страница 794

    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... - IO_Reg_1 0x0 0x1000 0x0 ... - IO_Reg_2 0x0 0x1001 0x0 ... INSPECTORUPDATE The Inspe ctor [...]

  • Страница 795

    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. Logging co ntinues until a close log file ( NOLF ) co[...]

  • Страница 796

    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. If no target is installed, the followin g error message appears: Error: no target is in[...]

  • Страница 797

    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 . NOTE If the ADD_SYMBOLS para meter is passed, PRELOAD and POSTLOAD files play for[...]

  • Страница 798

    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. If no target is instal[...]

  • Страница 799

    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. RES PON SES : Comman d output respon se. ERRORS: Error message s. NOTI CE S : Asynchrono[...]

  • Страница 800

    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 ! bckcolor blue ! at 2000 bckcolor white !else !- bckcolor yellow !- at 1000 bckcolor white !ENDIF When co mmands executed from a comm and file are logged[...]

  • Страница 801

    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. That is, a com mand file exec uted with the CF or CALL command without th e NL op[...]

  • Страница 802

    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 log file i s generated: repeat until condition !define i = 1 !REPEAT ! define i = i + 1 ! ls i 0x2 (2) !UNTIL i == 4 ! define i = i + 1 ! ls i 0x3 (3)[...]

  • Страница 803

    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. The size of memo ry determines t he symbol ta ble size. Use the DEFINE com m[...]

  • Страница 804

    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. Exampl e with j being an app licat ion symbo l as well as a user sym bol: in>ls j Appli[...]

  • Страница 805

    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. When th e range is not an[...]

  • Страница 806

    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). Components Debu gger eng ine. Table Example: 0x2F00, /* Hexadecimal Constant */ 043, /* Octal Constant */ 255 /* Decimal Constant */ In the same w ay, the Assembler no tati on for co nstan t is [...]

  • Страница 807

    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. Example: in>NOCR The current record file is close d. NOL[...]

  • Страница 808

    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. OPEN The OPEN command is used to ope n a wind ow compone nt. Usage OPEN "component" [x y width height][;I | ;MAX] where: • compone nt is the co mponent n ame with an op ti[...]

  • Страница 809

    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). Components Cove rage comp onent. Example: in>coverage < OUTPUT[...]

  • Страница 810

    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. Components Debu gger eng ine. Exa[...]

  • Страница 811

    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. Examp le in> PRINTF(" The value of the counter is: %d",[...]

  • Страница 812

    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. The displ ay of a reg iste r includes both the name and hexa decimal represe ntation. If the sp ecified regist er is not a CPU register, then it look s for this register in a register file as an[...]

  • Страница 813

    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. Example: in>RECORD on REPEAT The REPEAT co mmand allows you to execute a sequence of com[...]

  • Страница 814

    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. NOTE Make sure that the RESET command is redirected to the corr[...]

  • Страница 815

    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 .e. the first insta nce that di d not ch ain executio n). Usage[...]

  • Страница 816

    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 . value : is an inte ger constan t expression (in ANSI f[...]

  • Страница 817

    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. NOTE If no path is specified, t he destinatio n directo ry is the curre nt[...]

  • Страница 818

    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. Usage SAVEBP on|off Components Debu gger eng ine. Example: C[...]

  • Страница 819

    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. Background is[...]

  • Страница 820

    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. SLINE With the SLINE command, a lin e of the source file is m ade v[...]

  • Страница 821

    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. In the Assembly com po[...]

  • Страница 822

    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 .abs applicatio n file format . Usage SMOD module Where modu le is the name o f a modu le taking par[...]

  • Страница 823

    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. SPROC In the Data componen t , the SPRO C command sho [...]

  • Страница 824

    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. Usage SREC fileName [offset] offset : is a signed valu e added t o the load [...]

  • Страница 825

    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. The [...]

  • Страница 826

    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. Therefore, the next state ment disp layed is th e next statement in the current pro cedure rega rdless of whethe r the current sta tem[...]

  • Страница 827

    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 . Usage STOP Alias S Components Debu gger eng ine. Example: in>STOP STOPPING HALTED [...]

  • Страница 828

    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. coun t : is [...]

  • Страница 829

    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 . Usage TUPDATE on|off Components Profile r and Co verage compo nents[...]

  • Страница 830

    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 . Aft er UNDE F test, the te st variable can no lon ger be used without (re)d efining it. NOT[...]

  • Страница 831

    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 (2198) Init 0x810 (2064) _Startup 0x83D (2109) in>DEFINE counter = 1 in>LS User Symbols: // there is one user symbol: counte r counter 0x1 (1) Ap[...]

  • Страница 832

    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. All text is unfo lded onc e or ( * ) completely, unt il no more fol ded[...]

  • Страница 833

    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. Usage UPDATERATE rate w[...]

  • Страница 834

    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. WAIT The WAIT command pauses command file executio [...]

  • Страница 835

    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. When the rang e is wider than the list of byte valu es, the list o f byte values i[...]

  • Страница 836

    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. Usage WHILE condition Where condition is de fined as in “C” la[...]

  • Страница 837

    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. Components Debu gger eng ine. Example: in>WL [...]

  • Страница 838

    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. The display of the member fiel ds replaces t[...]

  • Страница 839

    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. This bo ok, the Debugge r Envir onmen t Variabl es, defin es [...]

  • Страница 840

    Book VIII Co ntents 840 Microco ntrolle rs Debugger Manua l[...]

  • Страница 841

    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. Topic s incl ude: • Debu gger En vir[...]

  • Страница 842

    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. NOTE Do no t use bla nks i n the d efinit ion of a n envi ronmen t var[...]

  • Страница 843

    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. • If the to ol is launched using an I con on th e Desktop, the current directory is the one specified and[...]

  • Страница 844

    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 . All configura tion prop erties are stored in the confi guration file. The same configu[...]

  • Страница 845

    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.INI file locat ed in t he proj ect d irectory, as shown in Listing 3 5.1 . All de f[...]

  • Страница 846

    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. It s width is 50% from main wi ndow width and its h e[...]

  • Страница 847

    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 border can b e specified i n the default se ction: – The tool bar ca n be shown or hidden with the f oll owing s yntax: Toolbar = (0 | 1) If 1 is specif[...]

  • Страница 848

    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 Windows0 or Target can be retr ieved from se ction [HI -WAVE] then: use [HI- WAVE] • else if an entry Windows0 or Target can be r etri eved from sectio n[...]

  • Страница 849

    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 . If you do and this variable d oes not cont ain the proj ect directo ry given in Win Edit’s project config urati on, files migh t no[...]

  • Страница 850

    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. The option s are l isted i n alph abetical order and each is divided into seve ral sections d escr[...]

  • Страница 851

    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. If ABSPATH is n o[...]

  • Страница 852

    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.INI - P C Only) ENVIRONMENT=: Environment File Spec ification Tools Comp iler, L inker , Decode r, Librar ian, Maker, Bu rner, Debu gger [...]

  • Страница 853

    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>}. Arguments <path> : Paths separated b y semicolons, without sp aces. Default Curr ent [...]

  • Страница 854

    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>}. Arguments <path> : Paths separated by semic olons, witho ut spaces. Default C[...]

  • Страница 855

    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. Description If a tool look[...]

  • Страница 856

    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. Th is library function stor es the tempor ary files cre[...]

  • Страница 857

    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. Default ON Description This enviro nment vari able allows a flexible usage of the LIBRARYPATH: ‘include <File>’ Path environment va[...]

  • Страница 858

    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 .ini file is located) 4. Path defi ned in the OBJPATH enviro nment varia ble 5. Paths defined in[...]

  • Страница 859

    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. The operating system maps the DLLs into the process's address spac e when the pro cess is sta rting up or while it is ru[...]

  • Страница 860

    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.sim *.SX S-Record fil e, for exampl e, fibo.sx *.TXT General Text Information file. *:T[...]

  • Страница 861

    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 Environment Variables There are currently no connecti on environm ent varia bles that[...]

  • Страница 862

    Connection-Specific Envir onment Variables Conne ction-Spec ific Envi ronment Variab les 862 Microco ntrolle rs Debugger Manua l[...]

  • Страница 863

    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 . This book is divide d into t he following c hapters: Book 9: Deb ugger [...]

  • Страница 864

    Book IX Con tents 864 Microco ntrolle rs Debugger Manua l[...]

  • Страница 865

    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 . New P&E Connections for HC(S)08 For the HC08 CPU, the fol lowing P&E conn ection[...]

  • Страница 866

    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. The Cha nge MCU/ Connectio n option op ens the Dev ice and Conn ection di alog b[...]

  • Страница 867

    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 Target Int erface (origina lly HIWARE MON08 Targe t Interface) • Trace32 T arget Int erface (Lau terbach Emulator) • MMD S supp ort • MMEVS sup[...]

  • Страница 868

    Legacy Tar get Inte rfaces Re moved 868 Microco ntrolle rs Debugger Manua l[...]

  • Страница 869

    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. Howeve r, these compon ents[...]

  • Страница 870

    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 • Winlift[...]

  • Страница 871

    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 .abs file 61 ABSPATH 850 ACTIVATE command 742 ADCLR command 259 Add New Instrument men u entry 142 , 14 3 ADDI Command 259 Address B edi t box 522 , 523 Addre ss edi t box 530 Addre ss menu entr[...]

  • Страница 872

    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 Condition 167 BS comma nd 75 9 Bus State Analy zer (BSA) Arming 426 Cable s 404 Defin ing e vents 421 Sele cting rec ord mode 42 4 Viewin g data 426 Bus t[...]

  • Страница 873

    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 COMPLEMENT DATA Component 7 49 Memory Comp onent 751 Register Component 746 Complex b reakpoi nt 505 Component Assembly 64 , 202 , 203 Associated M enus 52 Com[...]

  • Страница 874

    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.dll 234 New project 220 Prep ro cess or Header Directories 223 Prei nclude file 223 Proje ct root direc tory 220 Re[...]

  • Страница 875

    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 INSPECTOROUTPUT 793 INSPECTORUPDATE 794 LF 795 LOAD 796 LOADCODE 797 LOADSYMBOLS 798 LOG 798 LS 803 MEM 80 4 MS 805 NB 805 NOCR 807 NOLF 807 OPEN 808 OUTPUT[...]

  • Страница 876

    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 kpoint menu en try 67 , 119 Delete Mark point me nu entry 67 , 120 Delete Trigg er 529 Delete Trigger Address optio n 507 Demo Version Limitations Visu[...]

  • Страница 877

    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 orer 843 Expre ssion C ommand Fi le 81 Expre ssion E dito r 80 F FCS ADC Module Option 258 ADC User Commands 259 Cloc k Gen erati on Mod ule Com mand[...]

  • Страница 878

    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 Modu le 703 Oper ations 7 05 Option 481 Protec ting 705 Sele ct 7 03 Unprotect ing 7 05 Unselect 7 03 FLASH comman d 7 10 Flash mo dule Selectin g 705 [...]

  • Страница 879

    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 20 , 122 GOTO command 790 GOTOCYCLE Command 264 , 307 GOTOIF command 791 Graphic bar 73 , 106 Graphical 534 Graphical di splay 534 Graphical men u entr[...]

  • Страница 880

    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 dialo g box 485 Technical conside rations 477 Trigge r Module se ttings 481 Unsecure 481 Wiza rd Conn ection selecti on 478 HCS08 P&E Multilink/ C[...]

  • Страница 881

    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 Conn ection Menu Add ed Men u Options 390 Conn ection Proce dure 382 Cycle Power Up/Down Butto n 387 Device Class Description 393 Expert Mode Progr a[...]

  • Страница 882

    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 lication m enu ent ry 35 LOAD command 796 Load I/ Os me nu e ntry 578 Load La yout menu en try 143 Load m enu entry 44 , 57 8 LOADCODE command 797 Loadi ng a[...]

  • Страница 883

    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 eade r Sign als Tab 339 Advanc ed Sett ings tab 3 35 Connect Targ et Tab 3 33 Conn ection Menu Option s, Add itional 342 Conn ection View R egist er Fi[...]

  • Страница 884

    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 atio n menu en try 35 Open File m enu entry 625 Open Memo ry B lock 583 Open Source File menu en try 1 20 Options Autosize men u entry 51 Compon ent [...]

  • Страница 885

    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/W Access 5 29 RAM 379 RD command 812 Read 529 Read acces s 510 Read Access trigg er type 514 Read/Write acc ess 510 Read/Write Ac cess trigger ty pe 5[...]

  • Страница 886

    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 box 566 Set Con nection dia log box 563 Set up dial og bo x 565 Show St atus 565 Show St atus dialo g box 566 Technical conside rations 561 Wizard Co [...]

  • Страница 887

    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 nication Se ttings dialo g box 684 Connec tion men u opt ions 681 Debug ging Mem ory Map 681 First Steps from within existing proje ct 679 First Step s using[...]

  • Страница 888

    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 file 46 Static text attrib utes 153 Statistics Resetting 107 Statu s bar 33 DBG s uppor t 515 Menu entr y 3 8 Statu s register bits 111 Step In 203 As[...]

  • Страница 889

    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.ini 8 45 Runn ing from a comm and line 29 Smart User Interface 54 Tool ti p 33 User Interface 5 4 Using on Wi ndows 2000 199 TUPDATE command 829 Type list menu 529[...]

  • Страница 890

    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 WHILE com mand 799 , 836 Widt h 146 Wind ow com ponents 61 Wind ow men u 50 , 51 Wind ow Menu ent ries 51 Wind ows 842 Comma nd File 45 WinEd it 842 , [...]

  • Страница 891

    891 Microc ontrollers Debugger M anual[...]

  • Страница 892

    892 Microco ntrolle rs Debugger Manua l[...]