20 lines
562 B
Python
20 lines
562 B
Python
|
DBGMCU_CR = 0xE00E1004
|
||
|
DBGMCU_VALUE = 0x00700007
|
||
|
|
||
|
def will_init_target(target, init_sequence):
|
||
|
def set_traceclken():
|
||
|
LOG.info("old DBGMCU_CR: " + hex(target.aps[2].read_memory(DBGMCU_CR)))
|
||
|
target.aps[2].write_memory(DBGMCU_CR, DBGMCU_VALUE)
|
||
|
LOG.info("new DBGMCU_CR: " + hex(target.aps[2].read_memory(DBGMCU_CR)))
|
||
|
return
|
||
|
|
||
|
def wrap(seq):
|
||
|
return seq
|
||
|
|
||
|
init_sequence.wrap_task('discovery', lambda seq:
|
||
|
seq.insert_before('find_components',
|
||
|
('set_traceclken', set_traceclken)
|
||
|
)
|
||
|
)
|
||
|
|