Skip to content

Commit

Permalink
Added 'pyocd' to commander Python eval namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
flit committed Mar 17, 2019
1 parent 261555b commit 5bdf5be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyocd/tools/pyocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ def handle_exit(self, args):

def handle_python(self, args):
try:
import pyocd
env = {
'session' : self.session,
'board' : self.board,
Expand All @@ -1057,6 +1058,7 @@ def handle_python(self, args):
'aps' : self.target.dp.aps,
'elf' : self.elf,
'map' : self.target.memory_map,
'pyocd' : pyocd,
}
result = eval(args, globals(), env)
if result is not None:
Expand Down

0 comments on commit 5bdf5be

Please sign in to comment.