2021. 9. 27. 13:27ㆍEnv/Tools
- 목차
on chip break point 제한
do not real-time tracing
ETM
38 pins
- file load -
Data.LOAD.Elf <fileName> [/opt]
Data.LOAD.Binary <fileName> [/opt]
ex.
data.load.elf * /nocode
하고 t32-> debug-> project.axf 를 열도록 한다.
- Load option
Compare
NOCODE
NosYmbol
NoClear ; do not delete the symbols written previsouly
VM ; VM, virtual memory, is to download cod to the virtual memory
PlusVm ;
C:0x30000000 <- SDRAM
32M binary
- Dump -
// dump
data.save.binary test.bin 0x30000000++0xfff
d <- dump
data.load.binary c:\t32\test.bin vm:0x90000000++0xfff
하면 virtual 로 upload (PC에 upload됨)
little endian코드를 big endian으로 올리는 경우
swap option사용
data.save.binary test.bin 0x30000000++0xfff
data.load.binary c:\t32\test.bin vm:0x90000000++0xfff
d vm:0x90000000
--------------------------- cmm file -----------------
// B:: <- ICD should be followed by B::
B::
// RESET
sys.res
sys.cpu s3c2410x
// JTAG CLK.
sys.jc 10.Mhz
// UP
;sys.m.u == sys.u
sys.u
data.load.elf c:\t32\example\debug\project.axf /NOCODE
sYmbol.SourcePATH + C:\T32\example\교육용코드
MAP.BOnchip 0x0--0x3FFFFF
GO Main
ENDDO
----------------------------------------------------
data.view 0x0--0x1000
symbol 정보를 볼 수 없을 경우(when you moved your source code path)
you can see the symbol information by adding symbol path.. like below
- symbol 정보 볼 수 있도록 지정 -
symbol.SPATH.List <-
and then Add Dir..
; or you can just use your mouse to show up the window having symbol path
- go 사용하여 워하는 곳으로 pc를 옮기기 -
go ..
if you want to go to the function you have determined to go there.
the name of the function is 'func0'
ex.
B:: go func0 <- you can type like that
- Peripherals 정보 보기 -
you can see peripherals of the CPU.
by typing like that
ex.
B::per <-
- 방금 했던 연산 되돌리기 -
To trace back, type like this
r.undo <-
---- Break point ---
- 종류 -
1. onchip break point ; depends on CPU type
MPIS has 4 onchip break points
ARM has 2 onchip break points
2. software break point
Infinite number of break points
default break point of power view is S/W break point
so to avoid checking On-chip break point, you just use below command.
MAP.BOnchip 0x0--0x3FFFFF <-
so you can make a break point as an on-chip break point in this region.
--------------------
- Area 창에서 print message(디버거에서 뿌리는)를 보기 -
ex.
print "check... Sunny[0] = " v.value(sunny[0])
memory range break point
break.set 0x30000020--0x3000007f <-
ex.
'tptr' is a pointer.
and tptr is pointing some area.
And you have to stop CPU when as soon as tptr has 0x5 value.
How can you do that?
- answer -
1. d address <- address pointed by tptr
2. fold up break point option by clicking mouse's right button.
3. setting option like below
type -> write
data -> 0x5
data type -> byte
implementation -> Onchip
action -> stop
go !! then you can see break point is made
cmm file
--------------------
1. basic template
b::
~~~
enddo
~~ <- ignored cause ~~ is followed by enddo
--------------------
global <- can be used in the other cmm file
local <- only...in this cmm file
ex.
local &a <-- definition of variable
local &b &c
&a=10. <-- give it value (. <- decimal)
&b=0.
&c=0.
&c=&a+&b
print &c
--------ex. calculator ------------
b::
local &a ;<-- definition of variable
local &b &c
&a=10. ;<-- give it value (. <- decimal)
&b=0.
&c=0.
local &operator
; user input
print "input value to a->"
enter &a
print "input value to b->"
enter &b
print "input operator(+, -, *, /)->"
enter &operator
if "&operator"=="+"
(
&c=&a+&b
)
else if "&operator"=="-"
(
&c=&a-&b
)
else if "&operator"=="*"
(
&c=&a*&b
)
else if "&operator"=="/"
(
&c=&a/&b
)
print %d "result=>" &c
;if &a>&b
;(
; &c="true"
;)
;else
; &c="false"
if "&c"=="true"
print "c=true"
else
print "c=false"
print "a와 b를 비교" "&c"
enddo
----------ex. control seqeuence of the program --------------
B::
area
area.clear
;r.s pc 0x000011c0 <- set program counter(register set)
break.set again ; b.s again --- ex. b.s fun9\24 ;<- line 24 of fun9
go
wait !run() ; wait till target stops
print "Done.."
print "go main?(y/n)-->"
enter *in
if "&in"=="y"
(
print "..."
b.res
r.s pc main
)
else
(
b.res
print ".."
go
)
enddo
;----------------------------
loop:
screen ; monitoring to show freshed screen
step
goto loop
;go
;wait 3.ms ; 3 mili seconds
;wait 3.s ; 3 seconds
;break
enddo
----------------------------
'Env > Tools' 카테고리의 다른 글
tmux 사용법 (0) | 2021.11.30 |
---|---|
iTunes에 앱 별 파일 넣기 (0) | 2021.11.30 |
VirtualBox Ubuntu 메뉴가 안보일 때 (no menu) (0) | 2021.10.09 |
Sublime에서 javaScript 코드 실행 (0) | 2021.10.02 |
Sublime editor: setting (0) | 2021.10.02 |