Eclipse debug plugin for ChibiOS/RT
Re: Eclipse debug plugin for ChibiOS/RT
Is it possible to add measuring of summary time consumed to ISR handling? Sometimes that information is very useful.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Eclipse debug plugin for ChibiOS/RT
I will be adding a measurement subsystem next week, that could be used for that purpose. It will be able to measure the worst/best/last case of any portion of code with clock resolution and few clocks error.
Changes to the plugin could follow.
Giovanni
Changes to the plugin could follow.
Giovanni
Re: Eclipse debug plugin for ChibiOS/RT
Hi Giovanni,
i think there is a bug in DebugProxy.java
Which will fail if stack = stklimit because
where MIDataReadMemory tries to read 0 bytes of memory, which will fail.
i think there is a bug in DebugProxy.java
Code: Select all
if ((stklimit < 0) || (stack < 0))
map.put("stkunused", "-");
else {
if ((stack < 0) || (stack < stklimit))
map.put("stkunused", "overflow");
else {
long stkunused = scanStack(stklimit, stack, 0x55555555);
map.put("stkunused", Long.toString(stkunused));
}
}
Which will fail if stack = stklimit because
Code: Select all
public long scanStack(long base, long end, long pattern)
throws DebugProxyException {
if (mi_session.getMIInferior().isRunning())
return -1;
MIDataReadMemory mem = cmd_factory.createMIDataReadMemory(0,
Long.toString(base),
MIFormat.HEXADECIMAL,
4,
1,
(int)(end - base),
'.');
where MIDataReadMemory tries to read 0 bytes of memory, which will fail.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Eclipse debug plugin for ChibiOS/RT
Hi,
Thanks for finding, I will try to fix this before next release.
Giovanni
Thanks for finding, I will try to fix this before next release.
Giovanni
Re: Eclipse debug plugin for ChibiOS/RT
Hi Giovanni,
how about adding total interrupt counter field in drivers to monitor their activity in debug plugin window?
how about adding total interrupt counter field in drivers to monitor their activity in debug plugin window?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Eclipse debug plugin for ChibiOS/RT
Not a bad idea, I was already thinking to add an option for instrumenting chSysLock() and chSysUnlock() using the RTC counter and store the worst case measurement and also instrument CH_IRQ_PROLOGUE() and CH_IRQ_EPILOGUE() in order to obtain the worst case ISR handling.
All those info could go into a new "Performance" tab in the Eclipse plugin.
It must also be said that the Cortex-M3 has a lot of support for performance measurements in the DWT unit but all the features are little known, probably would be a good idea to develop a "Cortex Eclipse Plugin" in order to make the features accessible. It is a bit out of scope of this project however.
Giovanni
All those info could go into a new "Performance" tab in the Eclipse plugin.
It must also be said that the Cortex-M3 has a lot of support for performance measurements in the DWT unit but all the features are little known, probably would be a good idea to develop a "Cortex Eclipse Plugin" in order to make the features accessible. It is a bit out of scope of this project however.
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Eclipse debug plugin for ChibiOS/RT
Hi mabl,
I committed an updated plugin in trunk, do you mind giving it a try?
Giovanni
I committed an updated plugin in trunk, do you mind giving it a try?
Giovanni
Re: Eclipse debug plugin for ChibiOS/RT
Giovanni wrote:Hi mabl,
I committed an updated plugin in trunk, do you mind giving it a try?
Giovanni
Thank you Giovanni, this seems to fix the bug for me.