ÀÌ ¸Å´º¾óÀº JKÀüÀÚ(JK Electronics) ¿¡ ÀÇÇؼ­ ¼öÁ¤, ÀÛ¼º µÇ¾ú°í ¼ÒÀ¯±Ç ¶ÇÇÑ
JKÀüÀÚ(JK Electronics)
ÀÇ °ÍÀÔ´Ï´Ù. ¼ÒÀ¯±ÇÀÚÀÇ Çã°¡¸¦ ¹ÞÁö ¾Ê°í ¹«´ÜÀ¸·Î ¼öÁ¤, »èÁ¦Çϰųª ¹èÆ÷ ÇÒ ¼ö ¾ø½À´Ï´Ù.

 

 

ARM JTAG Command »ó¼¼ °¡À̵å


 
* Update history

- 2012.3.26 : Ãʱâ Release


 
1. Introduction
2 Commnand : Target unrelated
2.1 Command [;]
2.2 Command [print]
2.3 Command [wait]
2.4 Command [time]
2.5 Command [check]
2.5.1 check.show
2.5.2 check.data
2.5.3 check.bit
2.6 Example of Command Target unrelated

3 Commnand : Target related
3.1 Command [target]
3.1.1 target.status.jtag
3.1.2 target.status.core
3.1.3 target.status.mode
3.1.4 target.status
3.1.5 target.stop
3.1.6 target.run
3.1.7 Example of Command [target]

3.2 Command [reg]
3.2.1 reg.r<number>.read
3.2.2 reg.pc.read
3.2.3 reg.cpsr.read
3.2.4 reg.spsr.read
3.2.5 reg.all.read
3.2.6 reg.r<number>.write
3.2.7 reg.r<number>.write.before
3.2.8 reg.pc.write
3.2.9 reg.pc.write.before
3.2.10 reg.cpsr.write
3.2.11 reg.spsr.write
3.2.12 Example of Command [reg]

3.3 Command [mem]
3.3.1 mem.read
3.3.2 mem.write
3.3.3 mem.load
3.3.4 Example of Command [mem]

3.4 Command [bp]
3.4.1 bp.set.symbol

3.5 Command [flash]
3.5.1 flash.agent
3.5.2 flash.program
3.5.3 flash.erase

3.6 Command [cp]
3.6.1 cp.mmu.read
3.6.2 cp.mmu.off
3.6.3 cp.cp15.read
3.6.4 cp.cp15.write
3.6.5 Example of Command [cp]

3.7 Command [execute]
3.7.1 execute
3.7.2 Example of Command [execute]


   
 
1. Introduction

JICE ´Â Target À» Á¦¾îÇÒ À¯¿ëÇÏ°í Á÷°üÀûÀÎ ¸í·É¾î¸¦ Á¦°øÇÕ´Ï´Ù. JICECommander Picture 1-0 ´Â ÀÌ JICE ¸í·É¾î¸¦ ½ÇÇàÇÒ ¼ö ÀÖ´Â Tool ÀÔ´Ï´Ù.
JICEditor Picture 1-1 ´Â ÀÌ JICE ¸í·É¾î¸¦ ÀÛ¼ºÇÒ ¼ö ÀÖ´Â ¿¡µðÅÍ Tool ÀÔ´Ï´Ù.
JICECommander ¿Í JICEditor ¸¦ ÅëÇØ ¾Æ·¡¿Í °°Àº ÀÏÀ» ¼öÇàÇÒ ¼ö ÀÖ½À´Ï´Ù.

Test your target connection.
Control your target.
Read/Write Memory.
Flash Download.
Flash Agent Debugging.
¡¦


ÀÌ ¹®¼­´Â JICE °¡ Á¦°øÇÏ´Â ¸í·É¾î¿¡ ´ëÇؼ­ ¼³¸íÇÏ°í JICECommander¸¦ ÀÌ¿ëÇÏ¿© ÀÌ ¸í·É¾î¸¦ ½ÇÇàÇÏ´Â ½ÇÁ¦ ¿¹¸¦ ¼³¸íÇϱâ À§Çؼ­ ¸¸µé¾îÁ³½À´Ï´Ù.

JICECommander


JICEditor
arm jtag

2 Command : Target unrelated
2.1 Command [;]
Format :
;

Description :
ÁÖ¼® »ç¿ë ½Ã ÀÌ¿ëÇÏ´Â ¸í·É¾î ÀÔ´Ï´Ù. JICECommander ¿¡¼­´Â ¾Æ¹«·± Àϵµ ÇÏÁö ¾Ê½À´Ï´Ù. Scirpt »ó¿¡¼­ ÁÖ¼®À» ´Þ ¶§ »ç¿ëÇÕ´Ï´Ù.

Example :
*.jcs script ÆÄÀÏ¿¡¼­ ÀÌ ¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Script made by JK Electronics-------------------
; Target test 2010.01.01---------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

2.2 Command [print]
Format :
print ¡°XXXX¡±

Description :
JICECommander LOG â¿¡ XXXX ¸¦ Âï¾î ±×´ë·Î º¸¿©ÁÝ´Ï´Ù. print ¸í·É¾î¿Í ¡°XXXX¡± »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
print "###### S3C2413 ID Read Script ######"

2.3 Command [wait]
Format :
wait <number>

Description :
number milliseconds ½Ã°£µ¿¾È wait ÇÏ´Â ¸í·É¾î ÀÔ´Ï´Ù. ÀÌ ½Ã°£µ¿¾È JICEComamnder ´Â ¾Æ¹«·± Àϵµ ÇÏÁö ¾Ê°Ô µË´Ï´Ù.
º¸ÅëÀº Target ÀÇ Register ¸¦ Control(Write) ÇÑ ÈÄ ¾ó¸¶°£ ±â´Ù·Á¾ß ÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù.
wait ¸í·É¾î¿Í <number> »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
wait 4000

2.4 Command [time]
Format :
time

Description :
ÇöÀç ½Ã°£À» º¸¿©ÁÝ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
time

2.5 Command [check]
2.5.1 Command [check.show]
Format :
check.show ¡°XXXX¡±

Description :
ÀÌ ¸í·ÉÀ» ¸¸³ª¸é JICE LOG View â¿¡´Â ¡°XXXX¡± ³»¿ëÀ» º¸¿©Áָ鼭 ÇöÀç ÁøÇà ÁßÀÎ ½ºÅ©¸³Æ®¸¦ ¸ØÃß°í ´ÙÀ̾ó·Î±× ¹Ú½º¸¦ ¶Ù¿ì°Ô µË´Ï´Ù.
´ÙÀ̾ó·Î±× ¹Ú½º¿¡¼­ GO ¸¦ ¼±ÅÃÇϸé ÁøÇà ÁßÀÌ´ø ½ºÅ©¸³Æ®¸¦ °è¼Ó ½ÇÇàÇϸç,STOP À» ¼±ÅÃÇÏ¸é ´õ ÀÌ»ó ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÏÁö ¾Ê°í ¸¶Ä¡°Ô µË´Ï´Ù.

arm jtag

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
check.show ¡°ALL LED OFF¡±

2.5.2 Command [check.data]
Format :
check.data <value-hex number>

Description :
ÀÌ ¸í·ÉÀ» ¸¸³ª¸é ÀÌÀü¿¡ »ç¿ëµÇ¾ú´ø data ¿Í <value-hex number> °ªÀ» ºñ±³ÇÏ¿© µ¿ÀÏÇϸé ÁøÇà ÁßÀÌ´ø ½ºÅ©¸³Æ®¸¦ °è¼Ó ½ÇÇà ÇÏ°í, µ¿ÀÏÇÏÁö ¾ÊÀ¸¸é ´õ ÀÌ»ó ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÏÁö ¾Ê°í ¸¶Ä¡°Ô µË´Ï´Ù. ºñ±³ÇÏ°Ô µÇ´Â ÀÌÀü data ´Â mem.read ¸í·É¾î¸¦ ÅëÇؼ­ read ÇÑ data Áß °¡Àå ÃÖ±ÙÀÇ °ª ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
check.data 0x5F

2.5.3 Command [check.bit]
Format :
check.bit <bit field-hex number> high/low

Description :
ÀÌ ¸í·ÉÀ» ¸¸³ª¸é ÀÌÀü¿¡ »ç¿ëµÇ¾ú´ø data ¿Í <bit field-hex number> °ªÀ» ºñ±³ÇÕ´Ï´Ù. high ¸í·ÉÀ̸é bit field °ªÀÌ ¸ðµÎ high À̾î¾ß ÁøÇà ÁßÀÌ´ø ½ºÅ©¸³Æ®¸¦ °è¼Ó ½ÇÇàÇÕ´Ï´Ù.
¸¶Âù°¡Áö·Î low ¸í·ÉÀ̸é bit field °ªÀÌ ¸ðµÎ low À̾î¾ß ÁøÇà ÁßÀÌ´ø ½ºÅ©¸³Å͸¦ °è¼Ó ½ÇÇàÇÕ´Ï´Ù.
±×·¸Áö ¾ÊÀ¸¸é ´õ ÀÌ»ó ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÏÁö ¾Ê°í ¸¶Ä¡°Ô µË´Ï´Ù. ºñ±³ÇÏ°Ô µÇ´Â ÀÌÀü data ´Â mem.read ¸í·É¾î¸¦ ÅëÇؼ­ read ÇÑ data Áß ¸¶Áö¸·ÀÇ °Í ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
check.bit 0x1 low

2.6 Example of Command Target unrelated

arm jtag

arm jtag

arm jtag

arm jtag

3 Command : Target related
3.1 Command [target]
3.1.1 Command [target.status.jtag]
Format :
target.status.jtag

Description :
JICE ¿Í Target »çÀÌÀÇ JTAG ¿¬°á¿¡ ¹®Á¦°¡ ¾ø´ÂÁö º¸¿©ÁÝ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.status.jtag

3.1.2 Command [target.status.core]
Format :
target.status.core

Description :
Target ÀÌ stopped (debug status) »óÅÂÀÎÁö ¶Ç´Â running (normal status) »óÅÂÀÎÁö ¸¦ È®ÀÎÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.status.core

3.1.3 Command [target.status.mode]
Format :
target.status.mode

Description :
Target ÀÌ arm (32bit) mode ÀÎÁö ¶Ç´Â thumb (16bit) mode ÀÎÁö¸¦ È®ÀÎÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.status.mode

3.1.4 Command [target.status]
Format :
target.status

Description :
ÀÌ ¸í·ÉÀº ¾Æ·¡ 3°³ÀÇ ¸í·É¾î¸¦ Çѹø¿¡ ½ÇÇàÇÕ´Ï´Ù.
target.status.jtag
target.status.core
target.status.mode

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.status

3.1.5 Command [target.stop]
Format :
target.stop

Description :
Target À» stop (debug status) ½ÃÅ°°í Target ÀÌ Á¦´ë·Î stop µÇ¾ú´ÂÁö ´Ù½Ã È®ÀÎÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.stop

3.1.6 Command [target.run]
Format :
target.run

Description :
Target À» ÇöÀç stop µÈ pc ¿¡¼­ºÎÅÍ ´Ù½Ã run ½Ãŵ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
target.run

Notice :
ÀÌ ¸í·É¾î¸¦ ½ÇÇàÇϸé target Àº run »óÅ°¡ µÇ°í ARMJTAG Commander ´Â °è¼Ó running ÁßÀÎ target À» °¨½ÃÇÏ°Ô µÇ¾î¼­ ´Ù¸¥ ¸í·É¾î¸¦ ½ÇÇà ÇÒ ¼ö ¾ø°Ô µË´Ï´Ù.
µû¶ó¼­ ´Ù¸¥ ¸í·É¾î¸¦ ½ÇÇàÇϱâ À§Çؼ­´Â ARMJTAG Commander ¿¡¼­ ¾Æ·¡ STOP ¹öÆ°À» ´­·¯¼­ target À» ´Ù½Ã STOP ½ÃŲ ÈÄ ÁøÇàÇÏ¿©¾ß ÇÕ´Ï´Ù.

arm jtag

3.1.7 Example of Command [target]

arm jtag

3.2 Command [reg]
3.2.1 Command [reg.r<number>.read]

Format :
reg.r<number>.read

Description :
register r0, r1, r2, ¡¦,r14 Àб⠸í·É¾î ÀÔ´Ï´Ù.
number : 10Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.
0, 1, 2, 3, 4, ¡¦, 14 Áß ÇϳªÀÇ ¼ýÀÚ À̾î¾ß ÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.r0.read

3.2.2 Command [reg.pc.read]
Format :
reg.pc.read

Description :
register pc Àб⠸í·É¾î ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.pc.read

3.2.3 Command [reg.cpsr.read]
Format :
reg.cpsr.read

Description :
register cpsr Àб⠸í·É¾î ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.cpsr.read

3.2.4 Command [reg.spsr.read]
Format :
reg.spsr.read

Description :
register spsr Àб⠸í·É¾î ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.spsr.read

3.2.5 Command [reg.all.read]
Format :
reg.all.read

Description :
register r0, r1, r2, ¡¦, r14, pc, cpsr, spsr ¸ðµÎ Àб⠸í·É¾î ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.all.read

3.2.6 Command [reg.r<number>.write]
Format :
reg.r<number>.write <value-hex number>

Description :
register r0, r1, r2, ¡¦,r14 ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ¿Í <value-hex number> »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.
number : 10Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.
0, 1, 2, 3, 4, ¡¦, 14 Áß ÇϳªÀÇ ¼ýÀÚ À̾î¾ß ÇÕ´Ï´Ù.
value-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.r0.write 0x20002000

3.2.7 Command [reg.r<number>.write.before]
Format :
reg.r<number>.write.before

Description :
register r0, r1, r2, ¡¦,r14 ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ÇÏ´Â value ´Â ÀÌÀü¿¡ mem.read ¸í·É¾î¸¦ ÅëÇؼ­ read ÇÑ data Áß °¡Àå ÃÖ±ÙÀÇ °ª ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.r13.write.before

3.2.8 Command [reg.pc.write]
Format :
reg.pc.write <value-hex number>

Description :
register pc ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ¿Í <value-hex number> »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.
value-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.pc.write 0x20002000

3.2.9 Command [reg.pc.write.before]
Format :
reg.pc.write.before

Description :
register pc ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ÇÏ´Â value ´Â ÀÌÀü¿¡ mem.read ¸í·É¾î¸¦ ÅëÇؼ­ read ÇÑ data Áß °¡Àå ÃÖ±ÙÀÇ °ª ÀÔ´Ï´Ù.

Example :

¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.pc.write.before

3.2.10 Command [reg.cpsr.write]
Format :
reg.cpsr.write <value-hex number>

Description :

register cpsr ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ¿Í <value-hex number> »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.
value-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.cpsr.write 0x20002000

3.2.11 Command [reg.spsr.write]
Format :
reg.spsr.write <value-hex number>

Description :
register spsr ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.
write ¿Í <value-hex number> »çÀÌ¿¡´Â 1 Ä­ÀÇ space bar °¡ ÇÊ¿äÇÕ´Ï´Ù.
value-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
reg.spsr.write 0x20002000

3.2.12 Example of Command [reg]

arm jtag

arm jtag

arm jtag

arm jtag

arm jtag

3.3 Command [mem]
3.3.1 Command [mem.read]
Format :
mem.read <address-hex number> %<format-32,16,8> [<number of times-hex number>] [repeat,bin]

Description :
Memory Àб⠸í·É¾î ÀÔ´Ï´Ù.
address-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖÀ¸¸é VA(Virtual address)·Î accsss.

format-32,16,8 : 32 ¶Ç´Â 16 ¶Ç´Â 8 Áß Çϳª À̾î¾ß ÇÕ´Ï´Ù.
%32 -> data size 32bit.
%16 -> data size 16bit.
%8 -> data size 8bit.
number of times-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. address ¸¦ Áõ°¡½ÃÅ°¸ç ¸î ¹øÀ» ÀÐÀº °ÍÀΰ¡¸¦ °áÁ¤ÇÕ´Ï´Ù.
repeat : repeat ¸¦ ºÙÀ̸é address ¸¦ Áõ°¡½ÃÅ°Áö ¾Ê°í µ¿ÀÏÇÑ address ¸¦ number of times ¸¸Å­ ÀнÀ´Ï´Ù. NAND Flash read ½Ã ÀÌ¿ëÇϸé À¯¿ëÇÕ´Ï´Ù.
bin : bin À» ºÙÀ̸é read ÇÑ °ªÀ» bin ÆÄÀÏ Æ÷¸äÀ¸·Î ÀúÀåÇÕ´Ï´Ù. Memory dump °ªÀ» bin ÆÄÀÏ ÇüÅ·Πbackup Çسõ°í ½ÍÀ» ¶§ ÀÌ¿ëÇÏ¸é µË´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
mem.read 0x00200000 %32
--> read 32bit(4Byte) from address 0x00200000, 1 time.

mem.read 0x00200000 %32 0x1
--> read 32bit(4Byte) from address 0x00200000, 1time.

--> mem.read 0x00200000 %32 ¿Í mem.read 0x00200000 %32 0x1 ´Â µ¿ÀÏÇÑ °á°ú¸¦ º¸¿©ÁÝ´Ï´Ù.

Áï ¸¶Áö¸·¿¡ number of times-hex number °¡ ºÙÁö ¾ÊÀ¸¸é ±âº»ÀûÀ¸·Î 1¹ø Àб⸦ ¼öÇàÇÕ´Ï´Ù.

mem.read 0x00200000 %32 0x3
--> read 32bit(4Byte) 3 times increasing address
--> address : 0x00200000, 0x00200004, 0x00200008

mem.read 0x00200000 %16 0x3
--> read 16bit(2Byte) 3 times increasing address
--> address : 0x00200000, 0x00200002, 0x00200004

mem.read 0x00200000 %8 0x11
--> read 8bit(1Byte) 11 times increasing address
--> address : 0x00200000, 0x00200001, 0x00200002, ¡¦ ,0x00200010

mem.read 0x00200000 %8 0x11 repeat
--> read 8bit(1Byte) 11 times not increasing address(same address)
--> address : 0x00200000, 0x00200000, 0x00200000, ¡¦ ,0x00200000

mem.read 0x08000000 %8 0x100000 bin
--> read 8bit(1Byte) 0x100000 times increasing address and save as bin file format

3.3.2 Command [mem.write]
Format :
mem.write <address-hex number> %<format-32,16,8> <value-hex number>

Description :
Memory ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.

address-hex number : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖÀ¸¸é VA(Virtual address)·Î accsss.

<format-32,16,8> : 32 ¶Ç´Â 16 ¶Ç´Â 8 Áß Çϳª À̾î¾ß ÇÕ´Ï´Ù.
%32 -> data size 32bit.
%16 -> data size 16bit.
%8 -> data size 8bit.

<value-hex number> : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
mem.write 0x00200000 %32 0x12345678
--> write 32bit(4Byte) value(0x12345678) to address 0x00200000

mem.write 0x00200000 %16 0x1234
--> write 16bit(2Byte) value(0x1234) to address 0x00200000

mem.write 0x00200000 %8 0x12
--> write 8bit(1Byte) value(0x12) to address 0x00200000


3.3.3 Command [mem.load]
Format :
mem.load ¡°file location-bin file format¡± <address-hex number>

Description :

Memory Load ¸í·É¾î ÀÔ´Ï´Ù. ½ÇÁ¦·Î´Â Flashloader(FlashAgent) bin ÆÄÀÏÀ» Ÿ°ÙÀÇ ¸Þ¸ð¸®¿¡ ·Îµå ÇÏ´Â ¿ëµµ·Î ÁÖ·Î »ç¿ë ÇÕ´Ï´Ù.

file location-bin file format : RAM »ó¿¡ Load ÇÒ bin ÆÄÀÏÀÇ À§Ä¡ÀÔ´Ï´Ù. ¡° ·Î ½ÃÀÛÇÏ°í ¡±·Î ¸¶ÃÄ¾ß ÇÕ´Ï´Ù.
<address-hex number> : Load µÉ bin ÆÄÀÏÀÇ RAM ÀÇ start address ÀÔ´Ï´Ù. 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖ´õ¶óµµ PA(Physical address)·Î accsss.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
mem.load ¡°C:\Binary\stm32f103_flash_agent.bin¡± 0x20000000

arm jtag

Notice :
¾Æ·¡ÀÇ Á¶ÇÕÀ¸·Î RAM ¿¡ bin ÆÄÀÏÀ» Load ÇÏ°í ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù.
;casche&mmu off (cashe ¸¦ °¡Áø system ¿¡¼­ enable µÇ¾úÀ» °æ¿ì ÇÊ¿äÇÔ.)

mem.load "D:\LN2413SBC\9. Binary Image\Bootstrap\Bootstrap_2413.bin" 0x00000000
reg.pc.write 0x00000000
target.run

3.3.4 Example of Command [mem]

arm jtag

arm jtag

3.4 Command [bp]
3.4.1 Command [bp.set.symbol]

Format :
bp.set.symbol agentend

Description :
HW breakpoint ¸¦ code »ó¿¡¼­ symbol(agentend) ÀÌ ÀÖ´Â address ¿¡ ³õ¾Æ ¼³Á¤ÇÕ´Ï´Ù.
Flash agent ¿Í »óÈ£ µ¿ÀÛÇØ¾ß ÇÕ´Ï´Ù. (º¸ÅëÀº Flash agent ¿¡¼­¸¸ »ç¿ëÇÕ´Ï´Ù.)

Example :

¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
bp.set.symbol agentend

Notice :
1) ÀÌ ¸í·É¾î »ç¿ë½Ã´Â ÀÎÅÍ¿öÅ·(ARM/Thumb ¸ðµå°£ º¯È­)À» »ç¿ëÇÏÁö ¸»°í ARM(32bit) mode ¸¸À» »ç¿ëÇϽʽÿä.
2) ÀÌ ¸í·É¾î´Â Äڵ忡¼­ Çѹø¸¸ »ç¿ëÇϽʽÿä.
3) Cortex-M Äھ¼­´Â ÀÌ ¸í·É¾î¸¦ »ç¿ëÇÏÁö ¸¶½Ê½Ã¿ä.
Cortex-M ÄÚ¾î´Â º°µµ·Î Assembly ÀÛ¼ºÀÌ ÇÊ¿ä ¾øÀ¸¹Ç·Î ÀÌ ¸í·É¾î¸¦ »ç¿ëÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. ¶ÇÇÑ Flash agent ÀÛ¼º ½Ã¿¡µµ ÀÌ ¸í·ÉÀÌ ÇÊ¿ä¾ø½À´Ï´Ù.
4) Flash agent ¼Ò½º¿¡´Â ¾Æ·¡¿Í °°ÀÌ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. Áï

agentend DCD 0xEEDEEEDE (ARM ADS ÄÄÆÄÀÏ·¯¿¡¼­ »ç¿ë ½Ã)
agentend: DCD 0xEEDEEEDE (IAR EWARM ÄÄÆÄÀÏ·¯¿¡¼­ »ç¿ë ½Ã)


°¡ »ç¿ëµÇ¾î¾ß ÇÕ´Ï´Ù.

¡Ü ARM ADS ÄÄÆÄÀÏ·¯ »ç¿ë ½Ã :

arm jtag


¡Ü IAR EWARM ÄÄÆÄÀÏ·¯ »ç¿ë ½Ã :

arm jtag

3.5 Command [flash]
3.5.1 Command [flash.agent]
Format :
flash.agent <address1-hex number> <address2-hex number> <valuehex number>

Description :
Flash agent Á¤º¸¸¦ ¼³Á¤ÇÕ´Ï´Ù.

<address1-hex number> : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. RAM »ó¿¡ Load µÈ Flash agent ¹ÙÀ̳ʸ®ÀÇ start address ¸¦ ±âÀÔÇÕ´Ï´Ù.
Flash agent ¹ÙÀ̳ʸ®¸¦ RAM »ó¿¡ Load ÇÒ ¶§ mem.load ¸í·ÉÀ» »ç¿ëÇϹǷΠmem.load ¸í·É¿¡ »ç¿ëµÈ address °ª°ú µ¿ÀÏÇÑ °ªÀ» »ç¿ëÇÏ¸é µË´Ï´Ù.
<address2-hex number> : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. Flash agent ÀÇ parameter ¿µ¿ªÀÇ start address ¸¦ ±âÀÔÇÕ´Ï´Ù.
<value-hex number> : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. RAM »óÀÇ flash buffer size ¸¦ ±âÀÔÇÕ´Ï´Ù.
(buffer size of the user flash image to be loaded in ram)

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.

flash.agent 0x00200000 0x00202000 0x1000

Notice :
Reference document : ARMJTAGFlash Fusing and Agent Development Guide

3.5.2 Command [flash.program]
Format :
flash.program ¡°file location-bin file format¡± <address-hex number>

Description :
flash memory fusing ¸í·É¾î ÀÔ´Ï´Ù. flash agent ¿Í »óÈ£ µ¿ÀÛÇØ¾ß ÇÕ´Ï´Ù.

file location-bin file format : Flash ¿¡ Fusing ÇÒ bin ÆÄÀÏÀÇ À§Ä¡ÀÔ´Ï´Ù. ¡° ·Î ½ÃÀÛÇÏ°í ¡±·Î ¸¶ÃÄ¾ß ÇÕ´Ï´Ù.
<address-hex number> : Fusing µÉ bin ÆÄÀÏÀÇ Flash ÀÇ start address ÀÔ´Ï´Ù. 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
flash.program ¡°C:\Binary\stm32f103.bin¡± 0x08000000

3.5.3 Command [flash.erase]
Format :
flash.erase

Description :
flash memory erase ¸í·É¾î ÀÔ´Ï´Ù.
flash agent ¿Í »óÈ£ µ¿ÀÛÇØ¾ß ÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
flash.erase

3.6 Command [cp]
3.6.1 Command [cp.mmu.read]
Format :
cp.mmu.read

Description :
MMU »óÅ Àб⠸í·É¾î ÀÔ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
cp.mmu.read

3.6.2 Command [cp.mmu.off]
Format :
cp.mmu.off

Description :
MMU ¸¦ Disable ÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
cp.mmu.off

Notice :
Memory access ½Ã ARM CPU ÀÇ ÇöÀç Ư¼ºÀ» ±×´ë·Î À¯Áö Çϸ鼭 Á¢±ÙÇÕ´Ï´Ù. µû¶ó¼­ MMU °¡ enable µÇ¾î ÀÖÀ¸¸é memory access ´Â Virtual address·Î Á¢±ÙÇÕ´Ï´Ù.
Memory access ¸í·É ½Ã ¾Æ·¡¸¦ ÁÖÀÇÇؼ­ ±â¾ïÇϽʽÿä.

mem.read :
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖÀ¸¸é VA(Virtual address)·Î accsss.

mem.write :
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖÀ¸¸é VA(Virtual address)·Î accsss.

mem.load :
MMU°¡ disasble µÇ¾î ÀÖÀ¸¸é PA(Physical address)·Î accsss.
MMU°¡ enable µÇ¾î ÀÖ´õ¶óµµ PA(Physical address)·Î accsss.

µû¶ó¼­ MMU°¡ enable µÇ¾î ÀÖ°í mem.read ¶Ç´Â mem.write ¸í·É¾î¸¦ »ç¿ëÇÏ°íÀÚ ÇÒ ¶§ ¸¸¾à Physical address ·Î Á¢±ÙÇØ¾ß ÇÒ °æ¿ì
cp.mmu.off ¸í·É¾î¸¦ »ç¿ë ÈÄ mem.read ¶Ç´Â mem.write ¸í·É¾î¸¦ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.

3.6.3 Command [cp.cp15.read]
Format :
cp.cp15.read <operation code-hex number>

Description :
Coprocessor cp15 »óÅ Àб⠸í·É¾î ÀÔ´Ï´Ù.
<operation code-hex number> : cp15 register, operation ÀÇ °ª ÀÔ´Ï´Ù. 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÏ°í 4Byte Å©±â ÀÔ´Ï´Ù.
CRn, Op1, CRm, Op2 ¼ø¼­·Î À§Ä¡ÇÏ¸ç °¢°¢Àº 1Byte Å©±â¸¦ °¡Áý´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.

cp.cp15.read 0x0F000204

À§ ¿¹´Â ARM1176JZF-S ¿¡¼­
C15 Peripheral Port Memory Remap
CP15 Coprocessor Register ¸¦ Àд ¿¹ ÀÔ´Ï´Ù.
À̶§ÀÇ <operation code-hex number> ´Â 0x0F000204 ÀÔ´Ï´Ù. ARM1176JZF-S TRM ¿¡ ÀÌ Register ¿¡ ´ëÇÑ ¼³¸íÀÌ ÀÖ½À´Ï´Ù.

operation code 0x0F000204 ´Â ¾Æ·¡ÀÇ Á¶ÇÕ°ú ¼ø¼­·Î ¸¸µé¾îÁø °Í ÀÔ´Ï´Ù.
CRn : c15 -> 0x0F
Op1 : 0 -> 0x00
CRm : c2 -> 0x02
Op2 : 4 -> 0x04

3.6.4 Command [cp.cp15.write]
Format :
cp.cp15.write <operation code-hex number> <cp value-hex number>

Description :
Coprocessor cp15 ¾²±â ¸í·É¾î ÀÔ´Ï´Ù.

<operation code-hex number> : cp15 register, operation ÀÇ °ª ÀÔ´Ï´Ù. 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÏ°í 4Byte Å©±â ÀÔ´Ï´Ù.
CRn, Op1, CRm, Op2 ¼ø¼­·Î À§Ä¡ÇÏ¸ç °¢°¢Àº 1Byte Å©±â¸¦ °¡Áý´Ï´Ù.
<cp value-hex number> : 0x ·Î ½ÃÀÛÇÏ´Â 16Áø¼ö Çü½ÄÀ̾î¾ß ÇÕ´Ï´Ù. ¾²°íÀÚ ÇÏ´Â °ªÀ» ÀǹÌÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.

cp.cp15.write 0x0F000204 0x70000013

3.6.5 Example of Command [cp]

arm jtag

3.7 Command [execute]
3.7.1 Command [execute]

Format :
execute ¡°file location-jcs file format¡±

Description :
jcs(ARMJTAG Command Script) script file À» ½ÇÇàÇÕ´Ï´Ù.
file location-jcs file format : jcs file À§Ä¡ÀÔ´Ï´Ù. ¡° ·Î ½ÃÀÛÇÏ°í ¡±·Î ¸¶ÃÄ¾ß ÇÕ´Ï´Ù.

Example :
¸í·É¾îÀÇ »ç¿ë ¿¹´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
execute ¡°D:\script\at91script.jcs¡±

3.7.2 Example of Command [execute]

arm jtag