> On 14 Jul 2023, at 01:30, Tomas Vanek <tom_...@users.sourceforge.net> wrote:
> 
> ... it takes at least 30 milliseconds
> on average adapter and Cortex-M - all that time the core is in debug halt and 
> interrupts cannot be serviced.

I see. That's a lot, but, at least for my unit tests, it is not a problem.

FYI, SEGGER J-Link semihosting stdout, is much, much, faster than OpenOCD + 
STLink. 

>> This is definitely not a problem for unit tests, the only interrupt of 
>> interest is SysTick, and the slight inaccuracy in time keeping is perfectly 
>> acceptable.
> Agree, this is probably the only possible use case.
> BTW did you consider using RTT channel instead of semihosted stdout? It suits 
> much better for an app with enabled interrupts.

All my debug sessions use J-Link and the debug trace channel is routed via RTT, 
and is **really** fast.

However, this improvement is specific only to de debug trace channel, used by 
the debug build configurations.

Full semihosting is a lot more than a trace channel:

- 
https://github.com/ARM-software/abi-aa/blob/main/semihosting/semihosting.rst#6semihosting-operations

Similarly to native portable application, fully semihosted applications usually 
get a command line for main(argc, argv), report progress on stdout, report 
errors on stderr, sometimes read input files with test parameters, write output 
files with test results, and return an exit code with the test result.

You cannot do this via RTT, you have to use semihosting.


Liviu


Reply via email to