Home > Á¦Ç°¼Ò°³ > ¿¡¹Ä·¹ÀÌÅÍ > MAJIC-LT > ±â¼úÁö¿ø
< ¿¡¹Ä·¹ÀÌÅÍ >
CodeViser : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / ÀÚ·á½Ç
MAJIC-LT : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / ÀÚ·á½Ç / ºñ±³Â÷Æ® / Áö¿ø¸®½ºÆ®
MAJIC-LX : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / ÀÚ·á½Ç / ºñ±³Â÷Æ® / Áö¿ø¸®½ºÆ®
MAJIC-MT : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / ÀÚ·á½Ç / ºñ±³Â÷Æ® / Áö¿ø¸®½ºÆ®
ARMTOOLS : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / Áö¿øµð¹ÙÀ̽º
J-LINK(FlashÀü¿ë) : Á¦Ç°¼Ò°³ / °³¹ßȯ°æ / ±â¼úÁö¿ø / ÀÚ·á½Ç

°³¹ß ȯ°æ

  ±â¼úÁö¿ø

  1. ´ç»ç¿¡¼­ Á÷Á¢ ³³Ç° ÈÄ MAJIC Emulator ¼³Ä¡ ¹× »ç¿ë¹ý ±³À°
     (Àåºñ¿Í º¸µå ÀÎÅÍÆäÀ̽º ±¸Ãà ¹× Ç÷¡½Ã ÇÁ·Î±×·¥ Á¦°ø ¹× µð¹ö±ë ȯ°æ ±¸Ãà,
     Àåºñ operating ±³À° ¹× »ç¿ë¹ý (¿¹) Ÿ°Ù ÃÖÃʷΠüũ, ¸Þ¸ð¸® Test, Flash Programming,
     H/W µð¹ö±ë, GUI ȯ°æ±¸Ãà,Ä¿³Î µð¹ö±ë ¹× ±âŸ)

  2. JTAG Emulator »ç¿ë½Ã ¹ß»ýµÇ´Â ¹®Á¦¿¡ ´ëÇÑ E-mail ¹× À¯¼± µîÀ¸·Î ±â¼úÁö¿ø
     (E-mail : tst@microvison.co.kr / tech@mvtool.co.kr)

  3. »ç¿ëÀÚ Å¸°Ùº¸µå ¹®Á¦Á¡ ¹ß»ý½Ã ±â¼úÁö¿ø (¾÷ü¹æ¹® / ±â¼ú Áö¿øÆÀ°ú ¹æ¹®ÀÏÁ¤ ÇùÀÇ ¿ä¸Á)

  4. ´ç»ç¿¡¼­ ÁÖÃÖÇÏ´Â ±â¼ú ¼¼¹Ì³ª Âü¼® ¹× ÀÚ·á Á¦°ø

  MAJIC ¹× EDB ȯ°æ±¸Ãà ¹× ¼³Ä¡

EDT Key ¼³Ä¡¦­EDB ȯ°æ¼³Á¤Çϱ⦭MAJIC ¼³Ä¡Çϱ⦭MAJIC ¼³Ä¡¸¶¹ý»ç »ç¿ë¹ý¦­MONICE »ç¿ë¹ý

  EDT Key(s) ¼³Ä¡

Window¿¡¼­ EPI EDT Key ¾÷µ¥ÀÌÆ® ÇÏ´Â ¹æ¹ý

1. EDTA³ª EDTM ÇÁ·Î±×·¥ Æú´õ¿¡¼­ Installation Key Update Wizard¸¦ ½ÇÇàÇÑ´Ù.

¡Ø ¸¸¾à¿¡ EDTA and EDTM µÑ ´Ù »ç¿ëÇÒ °æ¿ì °¢°¢ÀÇ Æú´õ¿¡¼­ ARM¿ë, MIPS¿ë
º°µµÀÇ Keycode¸¦ ¼³Ä¡ÇØ¾ß ÇÑ´Ù.

 
 

2. Email·Î Key¸¦ ¹ÞÀ¸¸é º¹»çÇؼ­ ºÙ¿©³Ö±âÇÑ ÈÄ¿¡ ¾Æ·¡¿Í °°ÀÌ
[Apply New Installation Key]
¹öÆ° Ŭ¸¯ ¡æ À§ÀÇ Key Ç׸ñ¿¡ Ç¥½Ã°¡ µÇ¸é
Á¤»óÀûÀ¸·Î µ¿ÀÛÀ» ÇÑ´Ù.

  MAJIC ¼³Ä¡Çϱâ
1. CD-ROM¿¡ Install CD¸¦ ³Ö´Â´Ù. ¾Æ·¡¿Í °°Àº È­¸éÀÌ ³ª¿À¸é Get Key ¹öÆ°À» Ŭ¸¯ÇÑ´Ù.

 
 

2. µî·Ï ¸Þ´º¸¦ ¾Æ·¡¿Í °°ÀÌ ÀÛ¼ºÇÑ´Ù.

 
 

3. Keycode°¡ µî·ÏÇÑ Email·Î ¿À¸é ¾Æ·¡¿Í °°ÀÌ ³Ö°í ¼³Ä¡ÇÑ´Ù.


 
 

4. ¾à°ü¿¡ µ¿ÀÇÇÑ´Ù ¼±Åà ÈÄ Next ¹öÆ°À» Ŭ¸¯ÇÑ´Ù.

 
 

5. ±×·¯¸é ¾Æ·¡¿Í °°ÀÌ Install ¹öÆ°¿¡ Ŭ¸¯ÇÑ´Ù.

 
 

6. ¼³Ä¡ÇÒ ÇÁ·Î±×·¥À» ¼±ÅÃÇÑ´Ù.

 
 

7. ¼³Ä¡ÇÒ ÇÁ·Î±×·¥ÀÇ ¼³Ä¡ À§Ä¡¸¦ ÁöÁ¤ÇÑ´Ù.

 
 

8. ¼³Ä¡ÇÒ ÇÁ·Î±×·¥ Æú´õ¸¦ ÁöÁ¤ÇÑ´Ù.

 
 

9. ¼³Ä¡°¡ ½ÃÀ۵ȴÙ.

  MAJIC ¼³Ä¡¸¶¹ý»ç »ç¿ë¹ý
1. Setup wizard¸¦ ½ÇÇàÇÑ´Ù. Next

 
 

2. MAJIC¿¡ °íÁ¤ IP¸¦ ¼³Á¤ÇÑ´Ù.

 
 

3. °íÁ¤ IP¸¦ ¼³Á¤ÇÑ´Ù.


¡Ø ÁÖÀÇ :
È£½ºÆ® PCÀÇ IP Address¿Í MAJICÀÇ IP ¾îµå·¹½º°¡ °°Àº ´ë¿ªÀÇ IP¿µ¿ªÀ¸·Î
¼¼ÆõǾî¾ß ÇÑ´Ù. PC¿Í ¿¡¹Ä·¹ÀÌÅÍ¿Í Á÷Á¢ ¿¬°á½Ã¿¡ Crossover Cable·Î ¿¬°áÀ»
ÇؾßÇÏ°í ¹Ýµå½Ã PCÀÇ IP¸¦ °íÁ¤IP·Î ¼¼ÆÃÇؾ߸¸ ÇÑ´Ù.

 
 

4. óÀ½ ¼¼ÆÃÇÒ °æ¿ì MAJICÀÇ IP¸¦ ¾Ë ¼ö ¾ø±â ¶§¹®¿¡ ¾Æ·¡¿Í °°ÀÌ Serial CableÀ» ¿¬°áÇؼ­
IP
¸¦ ¼¼ÆÃÇÑ´Ù.



¡Ø ÁÖÀÇ:
¹ÝµíÀÌ MAJIC ±¸ÀԽà µé¾î ÀÖ´Â Serial Cable·Î ¼¼ÆÃÇÑ´Ù. (1´ë 1 ¿¬Àå¼± »ç¿ë)
°¡²û Ÿ°Ùº¸µå¿¡ »ç¿ëÇÏ´Â Serial Crossover CableÀ» »ç¿ëÇϴµ¥ ¹ÝµíÀÌ È®ÀÎ ÇÒ °Í.

 
 

5. Install IP ¹öÆ°À» Ŭ¸¯ÇÏ¸é ¾Æ·¡¿Í °°ÀÌ ½Ã¸®¾ó Æ÷Æ® com1À¸·Î ¿¬°áµÈ´Ù´Â ¸Þ½ÃÁö¿Í ÇÔ²²
IP°¡ ÀÚµ¿À¸·Î ¼³Á¤ÀÌ µÈ´Ù.

 
 

6. ¿©±â±îÁö ÀÛ¾÷ÀÌ ³¡³ª¸é MAJICÀÇ Àü¿øÀ» Reset ÇÑ ÈÄ ´Ù½Ã ¿¬°áÀ» ÇÑ´Ù.

  EDB ȯ°æ¼³Á¤ Çϱâ
1. MAJIC ¼³Ä¡¸¶¹ý»ç ½ÇÇàÈÄ ¾Æ·¡¿Í °°ÀÌ »ç¿ëÇÒ µð¹ö°ÅÀÇ Á¾·ù¸¦ ¼±ÅÃÇÑ´Ù.

 
 

2. »ç¿ëÀÚ Project NameÀ» ¾Æ·¡¿Í °°ÀÌ ÀÛ¼ºÇÑ ÈÄ Next

 
 

3. Target º¸µåÀÇ Processor Type°ú Target Á¤º¸¸¦ ¼±ÅÃÇÑ´Ù.

 
 

4. MAJIC¿¡ ¼³Á¤ÇÑ °íÁ¤IP¸¦ ¼±ÅÃÇÑ´Ù. ¼³Á¤ÀÌ µÇÁö ¾ÊÀº °æ¿ì IP ¼³Á¤ ¹æ¹ý¿¡ ´ëÇÑ ÀÚ·á Âü°í ÇÏ¿©
´Ù½Ã ¼³Á¤ÇÑ´Ù.

 
 

5. »ç¿ëÇÒ ÃʱâÈ­ ÆÄÀÏ ÀÖÀ» °æ¿ì À§ÀÇ ¸Þ´º¸¦ ¼±ÅÃÇÏ°í ¾øÀ» °æ¿ì ¾Æ·¡ÀÇ ¸Þ´º¸¦ ¼±ÅÃÇÑ´Ù.

¡Ø EPI¿¡¼­ Á¦°øÇϰųª ¸¶ÀÌÅ©·ÎºñÁ¯¿¡¼­ Á¦°øÇÏ´Â ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÒ °æ¿ì À§ÀÇ ¸Þ´º¸¦
¼±ÅÃÇؼ­ ÇØ´ç Æú´õ °æ·Î¸¦ ÁöÁ¤ÇÑ´Ù.

 
 

6. Á¦°øÇÏ´Â ½ºÅ©¸³Æ® ÆÄÀÏÀ» »ç¿ëÇÒ °æ¿ì Browse ¹öÆ°À» Ŭ¸¯ ÈÄ startice.cmdÆÄÀÏÀÇ °æ·Î¸¦
ÁöÁ¤ÇÑ´Ù.

 
 

7. °æ·ÎÁöÁ¤ÀÌ ¿Ï·áµÇ¸é ¾Æ·¡¿Í °°ÀÌ Next ¹öÆ°À» Ŭ¸¯ÇÑ´Ù.

 
 

8. MAJICÀÇ ½ÃÀÛÀ§Ä¡¸¦ ÁöÁ¤Çϱâ À§Çؼ­ startice.cmd°¡ ÀÖ´Â °æ·Î¿¡ Àû¿ëÀ» ÇÒ°ÍÀÎÁö ¾Æ´Ï¸é
»õ·Î¿î µð·ºÅ丮¿¡ º¹»çÇÑ ÈÄ ÁöÁ¤À» ÇÒ°ÍÀÎÁö ¼±ÅÃÇÑ´Ù.(Backup ÇÒ °æ¿ì À§ÀÇ ¸Þ´º ¼±ÅÃ)

 
 

9. ¹ÙÅÁÈ­¸é¿¡ ¹Ù·Î°¡±â¸¦ »ý¼ºÇϱâ À§Çؼ­ Perform Actions ¹öÆ°À» Ŭ¸¯ÇÑ´Ù.

 
 

10. Done ¹öÆ°À» Ŭ¸¯ÇÑ ÈÄ Á¾·áÇÑ´Ù.

 
 

11. Á¾·á°¡ µÇ¸é ¾Æ·¡¿Í °°ÀÌ ¹ÙÅÁÈ­¸é¿¡ ¹Ù·Î°¡±â ¾ÆÀÌÄÜÀÌ »ý¼ºµÈ´Ù.


 
 

12. µî·ÏÁ¤º¸¸¦ º¸¸é ÇöÀç »ç¿ëÇÏ´Â ÆÄÀϵéÀÇ °æ·Î¸¦ È®ÀÎ ÇÒ ¼ö ÀÖ°í ÂüÁ¶ÇÏ´Â ÆÄÀÏÀÇ °æ·Î¸¦
È®ÀÎ ÇÒ ¼ö ÀÖ´Ù.

  MONICE »ç¿ë¹ý

EPI MONICE Command Line Debugger´Â Window Hosted³ª Linux Hosted PC µÑ ´Ù »ç¿ë°¡´ÉÇÏ´Ù.
MONICE ¼³Ä¡ ¹æ¹ýÀº ¾ÕÀÇ Tutorial¿¡¼­ EDB ¼³Ä¡Çϱâ ÂüÁ¶Çϱ⠹ٶõ´Ù.
MONICE »ç¿ë¹ý¿¡´Â EPI Tools¿¡¼­ Samplesµð·ºÅ丮¿¡ ÀÖ´Â edbdemo.c ¼Ò½º¸¦ »ç¿ëÇؼ­ ÇÑ´Ù.
´Ù¿î·Îµå À§Ä¡´Â RAM¹øÁö 0x2000000 ¹øÁö¿¡ ÀÖ´Â À̹ÌÁö¸¦ °¡Áö°í ÇÑ´Ù. Atmel EB40ÀÇ °æ¿ì
ARM7TDMI º¸µå·Î SRAM ½ÃÀÛ ¹øÁö°¡ 0x200_0000ÀÌ´Ù.

  ÀýÂ÷

1. MONICE ½ÇÇà ÈÄ ¾Æ·¡¿Í °°Àº µµ½ºÃ¢ÀÌ Çϳª ³ª¿À´Â °ÍÀ» º¼ ¼ö ÀÖ´Ù. ¶Ç´Â DOS
ÇÁ·ÒÇÁÆ®¿¡¼­ ¾Æ·¡¿Í °°ÀÌ Å¸ÀÌÇÎÇصµ ¹«°üÇÏ´Ù.
  1) Serial
    dos> monice -d com1 -l -7 -varm7tdmi
  2) Ethernet
    dos> monice -d 192,168.0.100:e -varm7tdmi -l

°¢°¢ÀÇ cmdÀÇ Àǹ̴ ¾Æ·¡¿Í °°´Ù.

- d specifies the port of connection. (½Ã¸®¾ó COM1¿¡ ¿¬°áÇÑ °æ¿ì)
- l specifies that the target is little endian.
- 7 specifies the speed. The highest, 7, coresponds to 115000bps.
- v specifies the type of the cpu.


µµ½º ÇÁ·ÒÇÁÆ®¿¡¼­ À§ÀÇ Ä¿¸Çµå¸¦ Ä¡¸é ¾Æ·¡¿Í °°Àº È­¸éÀÌ ³ªÅ¸³­´Ù.
ÁÖÀÇÇÒ °ÍÀº window98ÀÇ °æ¿ì PATH ÁöÁ¤¿¡ ¹®Á¦°¡ ¹ß»ýÇÒ ¼ö ÀÖÀ¸¹Ç·Î Æú´õ¸¦ ÃÖ¼ÒÈ­Çؼ­ ¼³Ä¡ÇÑ´Ù.(¿¹ C:\epi\edta ) ¾Æ´Ï¸é ¾Æ·¡¿Í °°ÀÌ ½ÇÇàÆÄÀÏÀÇ À§Ä¡¸¦ Á÷Á¢ ³Ö¾îÁÙ ¼öµµ ÀÖ´Ù.

D:\>c:\progra~1\epitools\edta20\bin\monice -d com1 -7 -varm7
tdmi -l
EPI Symbolic Assembly Level Debug Monitor, version V6.9.2 - WIN/NT(386)
Copyright (c) 1987-2000 by Embedded Performance Inc. - All Rights Reserved.

Processing register file: c:\progra~1\epitools\edta20\bin\arm/spaces.rd
Processing register file: c:\progra~1\epitools\edta20\bin\arm/majic.rd
Reading command history from: 'c:\progra~1\epitools\edta20\bin\startedb.hst'
Establishing communications with remote target via com1...
Connection verified at 115200 baud
Target System: EPI Majic Probe, Version: 3.2.3, S/N 0209G042
Hardware Rev: 90:3:3:20
Target CPU: ARM7TDMI
Ethernet: at address 00:80:CF:00:14:B8
IP address: 192.168.2.50, Subnet mask: 255.255.255.0
Trace Buffer: 0 frames
Profiler: Not Installed
Connected via: RS-232 Serial Port
Baud rate: 115200
Device name: com1
Target Endian: little
Start Address: 00000000:
EPI-OS (HIF): on
Reset Mode: capture
Reading commands from D:\tutorial\monice\file\startice.cmd
MON> +q // Enter quiet mode
Reading startice.cmd file
Notification from the target:
Target power detected on VREF
Auto JTAG detection process detected 1 TAP
JTAG connection established
Finished reading startice.cmd
MON>


2. À̹ÌÁö ÆÄÀÏ ·Îµå type l
--------------------------------------------------------------------
MON> l d:\tutorial\monice\file\edbdemo.axf

loading d:\tutorial\monice\file\edbdemo.axf
section le\ram_0 from 02000000 to 0200267f
section le\ram_0 from 02002680 to 020028eb
section le\ram_0 from 020028ec to 02002d47
Entry address set (pc): 02000000
!!!:
02000000: e59f0034 LDR r0,0x200003C
MON>
--------------------------------------------------------------------
À̹ÌÁö ÆÄÀÏÀ» ¸Þ¸ð¸® 0x2000000 ¹øÁö¿¡ ´Ù¿î·Îµå


3. Displaying memory and registers. MONICE´Â ¾î¶² 32bit Register³ª ¸Þ¸ð¸®ÀÇ
¾îµå·¹½º·ÎºÎÅÍ byte, 16bit hword, 32-bit word or 64-bit double word·Î Ç¥Çö °¡´ÉÇÏ´Ù.

DB BYTE
DH HALF-WORD (16-bit)
DW WORD (32-bit)
DD DOUBLE-WORD (64-bit)

a) ·¹Áö½ºÅÍ º¸±â

- Stack Pointer º¸±â
MON> dw sp
.sp 0203FFB8

-ÇöÀç »óÅ Register º¸±â

MON> dw cpsr
.cpsr 000000D3 (n z c v F I t mode=svc)

- CPSR , bit FIQ º¸±â

MON> dw cpsr.f
.cpsr.f 00000001

- r0 - r15 º¸±â

MON> dw r0 r15
.r0 00000001 F00000FF E24DD00C 00000000
.r4 02002E48 00000000 02002D54 02002D48
.r8 00000000 02002D54 00000000 00000002
.r12 020027EC 0203FFB8 000100EC 02000000

-ÇöÀç Instruction º¸±â
ÇÁ·Î±×·¥ Ä«¿îÆ®ÀÇ ¸Þ¸ð¸® À§Ä¡ÀÇ instructionÀ» ¾ò±â À§Çؼ­ @¸¦ »ç¿ëÇÑ´Ù.

MON> dw @pc,i
!!!:
02000000: e59f0034 LDR r0,0x200003C


main ÇÔ¼öÀÇ À§Ä¡´Â 0x2000060 ½ÃÀÛÇÑ´Ù

2) memory º¸±â

·¹Áö½ºÅÍ º¸±â¿Í µ¿ÀÏÇÏ´Ù.

- 10°³ÀÇ ¸í·É º¸±â, main ÇÔ¼ö ½ÃÀÛÇϱâ

MON> dw main l 10,i
main:
02000060: e92d4030 STMDB sp!,{r4,r5,lr}
02000064: e24dd00c SUB sp,sp,#0xC
02000068: e1a05000 MOV r5,r0
0200006c: e1a04001 MOV r4,r1
02000070: e28f0f26 ADD r0,pc,#0x98
02000074: e58d0000 STR r0,[sp]
02000078: e28f0f25 ADD r0,pc,#0x94
0200007c: e58d0004 STR r0,[sp,#4]
02000080: e28f0f24 ADD r0,pc,#0x90
02000084: e58d0008 STR r0,[sp,#8]

- 40°³ÀÇ ¿öµå ´ÜÀ§ º¸±â, 0x2000000 ¹øÁöºÎÅÍ ½ÃÀÛ

MON> dw 0x2000000 l 40
!!!:
02000000: E59F0034 E59F1034 E59F3034 E1500001
02000010: 0A000003 E1510003 34902004 34812004
02000020: 3AFFFFFB E59F101C E3A02000 E1530001
02000030: 34832004 3AFFFFFC EA0002D9 02002680
02000040: 02002680 020028EC 02002D48 00000030
02000050: 00000031 00000032 00000033 00000034
main:
02000060: E92D4030 E24DD00C E1A05000 E1A04001
02000070: E28F0F26 E58D0000 E28F0F25 E58D0004
02000080: E28F0F24 E58D0008 E3A01001 E59F0088
02000090: E580115C E59F0080 E590015C E3500000


4. Memory¿Í Register °ª ¼³Á¤(¼öÁ¤Çϱâ) (enter)

EW Ä¿¸Çµå¸¦ »ç¿ëÇÏ¿© ¸Þ¸ð¸®³ª ·¹Áö½ºÅ͸¦ ¼¼ÆÃÇÒ ¼ö ÀÖ´Ù.

EB BYTE
EH HALF-WORD (16-Bit)
EW WORD (32-Bit)
ED DOUBLE-WORD (64-Bit)

1) Register °ª ¼¼ÆÃ

- set value of r4
MON> ew r4 = 16
MON> dw r4
.r4 00000016

- set r0 to r7 with 0
MON> ew r0 r7 = 0
MON> dw r0 r7
.r0 00000000 00000000 00000000 00000000
.r4 00000000 00000000 00000000 00000000

- set value of r0 to r7. interactive mode
MON> ew r0 r7
.r0 00000000 ? 0
.r1 00000000 ? 2
.r2 00000000 ? 4
.r3 00000000 ? 1
.r4 00000000 ? 3
.r5 00000000 ? 2
.r6 00000000 ? 6
.r7 00000000 ? 7
MON> dw r0 r7
.r0 00000000 00000002 00000004 00000001
.r4 00000003 00000002 00000006 00000007


2) memory °ª ¼¼ÆÃ
- set value start from 0x2040000
MON> ew 0x2040000
02040000: 1440F7FB ? 6
02040004: 52510180 ? 7
02040008: 82110125 ? 8
0204000c: 2300400A ? .

MON> dw 0x2040000 l 3
02040000: 00000006 00000007 00000008

Note that "." was used to stop the data entry.

- clear memory start from 0x2040000, with size 0x16

MON> ew 0x2040000 l 0x16 = 0
MON> dw 0x2040000 l 0x16
02040000: 00000000 00000000 00000000 00000000
02040010: 00000000 00000000 00000000 00000000
02040020: 00000000 00000000 00000000 00000000
02040030: 00000000 00000000 00000000 00000000
02040040: 00000000 00000000 00000000 00000000
02040050: 00000000 00000000


5. Breakpoint ¼¼ÆÃ

- ¿¹¸¦ µé¸é, "BS" Ä¿¸Çµå·Î ºê·¹ÀÌÅ© Æ÷ÀÎÆ® "main" ½Éºí¿¡ ¼¼ÆÃÇÏ°í runÇÑ´Ù.

MON> bs main
MON> g
Software breakpoint <---- note the program had encounter a software breakpoint.
main:
02000060: e92d4030 STMDB sp!,{r4,r5,lr}

- 10°³ÀÇ instruction º¸±â

MON> dw @pc l 10,i
main:
02000060: e92d4030 STMDB sp!,{r4,r5,lr}
02000064: e24dd00c SUB sp,sp,#0xC
02000068: e1a05000 MOV r5,r0
0200006c: e1a04001 MOV r4,r1
02000070: e28f0f26 ADD r0,pc,#0x98
02000074: e58d0000 STR r0,[sp]
02000078: e28f0f25 ADD r0,pc,#0x94
0200007c: e58d0004 STR r0,[sp,#4]
02000080: e28f0f24 ADD r0,pc,#0x90
02000084: e58d0008 STR r0,[sp,#8]

- breakpoint¸¦ 0x2000080¿¡ °É±â (ADD r0,pc,#0x90)

MON> bs 0x2000080
MON> g
Software breakpoint
main+0x20:
02000080: e28f0f24 ADD r0,pc,#0x90

- ù ¹ø° ¸í·ÉÀ¸·Î jump back Çϱâ (½ÃÀÛÇÏ´Â ¿£Æ®¸®·Î ÇÁ·Î±×·¥ Ä«¿îÆ® ¼¼Æà ÈÄ)
±×¸®°í breakpoint Å×½ºÆ® Çϱâ

MON> ew pc = 0x2000000
MON> g
Software breakpoint
main:
02000060: e92d4030 STMDB sp!,{r4,r5,lr}
MON> g
Software breakpoint
main+0x20:
02000080: e28f0f24 ADD r0,pc,#0x90

- "BC" command·Î ºê·¹ÀÌÅ© Æ÷ÀÎÆ® Áö¿ì±â
MON> bc main
MON> bc 0x2000080

- second ÇÔ¼ö¿¡ breakpoint ( char aaa, short bbb, int ccc ).
MON> bs Second
MON> g
Software breakpoint
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}


6. Step ¸í·É

- ÇöÀçÀÇ PC¿¡¼­ 15°³ÀÇ ¸í·É¼öÇà ÈÄ º¸±â ('Second' ÇÔ¼ö ½ÃÀÛ)
MON> dw @pc l 15 ,i
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}
0200012c: e1a04000 MOV r4,r0
02000130: e1a06001 MOV r6,r1
02000134: e1a05002 MOV r5,r2
02000138: e0840006 ADD r0,r4,r6
0200013c: e0800005 ADD r0,r0,r5
02000140: e58d0000 STR r0,[sp]
02000144: e1a00004 MOV r0,r4
02000148: e28f2f0a ADD r2,pc,#0x28
0200014c: e3e01000 MVN r1,#0
02000150: eb00000c BL 0x2000188 ; Third
02000154: e59d0000 LDR r0,[sp]
02000158: e3500008 CMP r0,#8
0200015c: da000001 BLE 0x2000168 ; Second+0x40
02000160: e3a00000 MOV r0,#0

-Step 1 ¸í·É

MON> s
0200012c: e1a04000 MOV r4,r0
MON> s
02000130: e1a06001 MOV r6,r1

-Step 8 ¸í·É
MON> s 8
Second+0x28:
02000150: eb00000c BL 0x2000188 ; Third

-Step over, ±×·¡¼­ 'Third' ÇÔ¼ö·Î °¥ ¼ö ¾ø´Ù.
MON> so
1
A good message
Software breakpoint
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}

Notice the edbdemo.c. It is seen that function Third will print numbers between 0-2 and "A good message."

-step 10 ¸í·É
MON> s 10
Second+0x28:
02000150: eb00000c BL 0x2000188 ; Third

-step into (Third ÇÔ¼ö·Î step into)
MON> s
Third:
02000188: e92d40f0 STMDB sp!,{r4-r7,lr}
MON> dw @pc l 10,i
Third:
02000188: e92d40f0 STMDB sp!,{r4-r7,lr}
0200018c: e1a04000 MOV r4,r0
02000190: e1a07001 MOV r7,r1
02000194: e1a05002 MOV r5,r2
02000198: e59f1084 LDR r1,0x2000224
0200019c: e51f0088 LDR r0,0x200011C
020001a0: e5801160 STR r1,[r0,#0x160]
020001a4: e3540000 CMP r4,#0
020001a8: 0a000017 BEQ 0x200020C ; Third+0x84
020001ac: e3e06008 MVN r6,#8



7. Assigning names to memory locations or peripheral registers using the
enter alias command 'EN'

1) assign name to instruction or memory location

- assign name "call_third" to instruction "BL 0X2000188" which is located at 0x2000150.
the command is: en call_third = 0x2000150


MON> g
default
A good message
Software breakpoint
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}
MON> dw @pc l 15,i
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}
0200012c: e1a04000 MOV r4,r0
02000130: e1a06001 MOV r6,r1
02000134: e1a05002 MOV r5,r2
02000138: e0840006 ADD r0,r4,r6
0200013c: e0800005 ADD r0,r0,r5
02000140: e58d0000 STR r0,[sp]
02000144: e1a00004 MOV r0,r4
02000148: e28f2f0a ADD r2,pc,#0x28
0200014c: e3e01000 MVN r1,#0
02000150: eb00000c BL 0x2000188 ; Third
02000154: e59d0000 LDR r0,[sp]
02000158: e3500008 CMP r0,#8
0200015c: da000001 BLE 0x2000168 ; call_third+0x18
02000160: e3a00000 MOV r0,#0


MON> en call_third=0x2000150
MON> bs call_third
MON> g
Software breakpoint
call_third:
02000150: eb00000c BL 0x2000188 ; Third

- 'DN' Ä¿¸Çµå¸¦ »ç¿ëÇؼ­ À̸§ÀÌ 'call'ÀÎ º¯¼ö º¸±â
MON> dn call*
USER: call_third = 02000150

- '"first' À̸§À» registor r0¿¡ ÇÒ´çÇϱâ
MON> en first = r0
MON> dw r0
.r0 00000004
MON> dw first
.r0 00000004

2) Alias ¸í·ÉÀ» ´ÜÃà¸Þ´º·Î µî·Ï
- Alias command "dw @pc l 10,i" as "DIA".

MON> ea DIA dw @pc l 10,i
MON> DIA
Second:
02000128: e92d4078 STMDB sp!,{r3-r6,lr}
0200012c: e1a04000 MOV r4,r0
02000130: e1a06001 MOV r6,r1
02000134: e1a05002 MOV r5,r2
02000138: e0840006 ADD r0,r4,r6
0200013c: e0800005 ADD r0,r0,r5
02000140: e58d0000 STR r0,[sp]
02000144: e1a00004 MOV r0,r4
02000148: e28f2f0a ADD r2,pc,#0x28
0200014c: e3e01000 MVN r1,#0

-¸ðµç aliases º¸±â

MON> da *
etinst: "fr c etrace.cmd // set up Trace options for instructions "
etdata: "fr c eview.cmd // set up Trace options for Data "
dts: "do ice_trig*; do trace* // display trace control settings"
kts: "eo tt=auto; eo tta=stop; eo tg=none; // kill trace settings (set defaults)
"
dia: "dw @pc l 10,i"



8. Ÿ°Ùº¸µå Memory Test Çϱâ

- MONICE¿¡¼­ MT Ä¡¸é, help¸¦ º¼ ¼ö ÀÖ´Ù.

MON> h mt
Syntax : MT range [,test[,delay]] [,{H|V|Q|S}...] [,repeat]
or MT range, loop [,data] [,repeat]

Description : The Memory Test command initiates a test of the target's
memory system, or one of three "scope loops".

range has form : { [ addr ] L number } | { addr [ addr ] } (See "H RANGE")

test is a decimal number specifying the test type; available tests are
1 - Basic patterns 2 - Walking 1's and 0's
3 - Rotating address 4 - Inverted rotating address
5 - Partial word
8 - Refresh 9 - Default. Each of 1,2,3,4 and 5 in turn.

loop is a loop type: 10 = read-only, 11 = Write only, 12 = Write/Read

delay is a decimal number specifying the delay time in msec, between
writes and reads. It is required only for test 8 (the refresh test).

data is a data value to be written (required if loop = 11 or 12)

H, V, Q, or S specify Halt-on-error, Verbose, Quiet or Silent mode.

repeat specifies how many times to run the test. Default is forever.

-for example we wants to run memory test 0x02040000 - 0x02040190, combination test (test type = 9) , verbose, run once

MON> mt 0x2040000 l 100,9,v,1

---------- Screen Prompt of Memory test command -------------
Running memory with MT command
over address range: 02040000-02040190, 1 times
Completed pass 1 with 0 errors, total errors = 0
Memory test completed with 0 errors in 1 passes
----------------------------------------------------------------------


9. monice Á¾·á
MON> q

Today/Total   0 / 950,511