Hey folks,
I am currently trying the orbcode tools to profile a STM32H753. I followed the guide in this blog post to install the finstrument-function hooks.
I think there is an issue in orbstat with the detection of Exception routines. I am missing certain interrupt calls and get lots of Invalid Address errors when running orbstat.
In symbol.h, there is
#define SPECIALS_MASK 0xfffffff0
to define addresses that are used in the link register when executing exceptions. However, the cortex M7 has more EXC_RETURN values than defined there. here is the User guide for cortex M7 processors, I'd say the mask should be 0xFFFFFFE0.
Looking at the arm documentation for armv8-M architecture, it looks to me that an even broader mask, 0xFFFFFFF80 should be used. Otherwise you will be missing Interrupts for cortex M33 processors.
I do not fully understand where SymbolLookup() is used, and if there are cases where this has a side effect, but I think the armv8 manual is quite clear that there never can be a valid address starting with 0xFF in the highest bits. Addresses with 0xFFFFF80 will always indicate Exception context.
If you want to I'll be happy to make a PR.
Hey folks,
I am currently trying the orbcode tools to profile a STM32H753. I followed the guide in this blog post to install the finstrument-function hooks.
I think there is an issue in orbstat with the detection of Exception routines. I am missing certain interrupt calls and get lots of Invalid Address errors when running orbstat.
In symbol.h, there is
to define addresses that are used in the link register when executing exceptions. However, the cortex M7 has more EXC_RETURN values than defined there. here is the User guide for cortex M7 processors, I'd say the mask should be 0xFFFFFFE0.
Looking at the arm documentation for armv8-M architecture, it looks to me that an even broader mask, 0xFFFFFFF80 should be used. Otherwise you will be missing Interrupts for cortex M33 processors.
I do not fully understand where
SymbolLookup()is used, and if there are cases where this has a side effect, but I think the armv8 manual is quite clear that there never can be a valid address starting with 0xFF in the highest bits. Addresses with 0xFFFFF80 will always indicate Exception context.If you want to I'll be happy to make a PR.