Page 7 of 8

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Fri Dec 02, 2011 10:31 pm
by Jacon
And don't forget to push yellow "refresh" button before each read attempt...

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Sat Dec 03, 2011 11:58 am
by mobyfab
Jacon wrote:And don't forget to push yellow "refresh" button before each read attempt...


That was it :oops:

Thanks a lot for your help.

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Thu Jan 05, 2012 9:28 pm
by barthess
Is it possible to add measuring of summary time consumed to ISR handling? Sometimes that information is very useful.

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Fri Jan 06, 2012 2:44 pm
by Giovanni
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

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Mon Jan 16, 2012 7:54 pm
by mabl
Hi Giovanni,

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.

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Mon Jan 16, 2012 8:55 pm
by Giovanni
Hi,

Thanks for finding, I will try to fix this before next release.

Giovanni

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Fri Jan 20, 2012 7:07 am
by barthess
Hi Giovanni,
how about adding total interrupt counter field in drivers to monitor their activity in debug plugin window?

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Fri Jan 20, 2012 9:14 am
by Giovanni
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

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Sat Feb 04, 2012 11:31 am
by Giovanni
Hi mabl,

I committed an updated plugin in trunk, do you mind giving it a try?

Giovanni

Re: Eclipse debug plugin for ChibiOS/RT

Posted: Tue Feb 07, 2012 12:10 pm
by mabl
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.