forked from stemnic/pyAVRdbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testMain.py
63 lines (61 loc) · 1.21 KB
/
testMain.py
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
import debugger
import logging
import time
dbg = debugger.Debugger("atmega4809")
dbg.stop()
dbg.breakpointSWClearAll()
dbg.breakpointHWClear()
#logging.info(dbg.readRegs())
#logging.info(dbg.readSRAM(0x00, 1024))
#logging.info(dbg.readSREG())
#logging.info(dbg.readStackPointer())
event = dbg.pollEvent()
while event != None:
event = dbg.pollEvent()
dbg.readRunningState()
print("Started running")
dbg.run()
dbg.readRunningState()
while True:
if dbg.readRunningState() == False:
event = dbg.pollEvent()
while event != None:
event = dbg.pollEvent()
print("Started running")
dbg.run()
time.sleep(1)
#dbg.breakpointSWSet(0x154)
#dbg.pollEvent()
#dbg.pollEvent()
#time.sleep(1)
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.run()
#dbg.pollEvent()
#print(dbg.readProgramCounter())
#print("\n")
#dbg.step()
#dbg.step()
#dbg.step()
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.pollEvent()
#time.sleep(1)
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.run()
#dbg.pollEvent()
#
#time.sleep(1)
#
#print(dbg.readProgramCounter())
#print(dbg.readProgramCounter())
#print("\n")
#dbg.run()
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.pollEvent()
#dbg.pollEvent()
#logging.info(dbg.readRegs())
dbg.cleanup()