Eclipse debug plugin for ChibiOS/RT

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Jacon
Posts: 143
Joined: Wed Dec 08, 2010 7:52 am
Has thanked: 50 times
Been thanked: 5 times

Re: Eclipse debug plugin for ChibiOS/RT

Post by Jacon »

And don't forget to push yellow "refresh" button before each read attempt...
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: Eclipse debug plugin for ChibiOS/RT

Post 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.
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Eclipse debug plugin for ChibiOS/RT

Post by barthess »

Is it possible to add measuring of summary time consumed to ISR handling? Sometimes that information is very useful.
User avatar
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

Post 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
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: Eclipse debug plugin for ChibiOS/RT

Post 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.
User avatar
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

Post by Giovanni »

Hi,

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

Giovanni
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Eclipse debug plugin for ChibiOS/RT

Post by barthess »

Hi Giovanni,
how about adding total interrupt counter field in drivers to monitor their activity in debug plugin window?
User avatar
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

Post 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
User avatar
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

Post by Giovanni »

Hi mabl,

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

Giovanni
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: Eclipse debug plugin for ChibiOS/RT

Post 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.
Post Reply