]> git.gag.com Git - fw/openocd/commit
itm: rework itm commands before 'init'
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 13 Nov 2020 18:41:41 +0000 (19:41 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Wed, 10 Mar 2021 21:33:09 +0000 (21:33 +0000)
commitf9509c92dba370be363f5641d3fefe2250bee10c
tree448e9a04f6afa2e3bbbe96dbe433e3bdc553113a
parentfaaa42283f5c06830fe997b80d6c64f6469c6cf0
itm: rework itm commands before 'init'

If the command 'itm port[s]' is issued before 'init', the ITM can
not be programmed because OpenOCD cannot access the target yet.
The configuration is recorded and applied after target examine.
The current test to trigger the ITM delayed-programming is based
on the TPIU configuration. This is allowed because the only use of
ITM it so send data through TPIU.
In case of system TPIU, not belonging anymore to the target, there
is no more association between target ITM and system TPIU.

Add a flag to record the pending ITM configuration requested
before 'init' and test the flag to trigger the delayed-programming
of the ITM.

Change-Id: I101eb97a116d7925cd2ff068f3e8813fc008b08e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6029
Tested-by: jenkins
src/target/armv7m_trace.c
src/target/armv7m_trace.h
src/target/cortex_m.c