Should the Chibi plugin in ChibiStudio_2020 work with Chibi 19 applications? Specifically, the trace functionality; the other tabs seem to work. I just get a memory access error.
As a minor detail, mousing over the 'Refresh' button in the plugin always says "Refresh Timer List" regardless of the active tab.
And while I'm here, is there a way to extract the displayed information on the plugin's pages? Copy/Paste and print don't seem to work. (Ideal would be copy/paste into a spreadsheet, I think)
ChibiStudio 2020
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: ChibiStudio 2020
I will re-check it but trace worked last time I tried.
The plugin is pretty basic, working with Eclipse is not so easy and I am not exactly a Java fan.
Giovanni
The plugin is pretty basic, working with Eclipse is not so easy and I am not exactly a Java fan.
Giovanni
Re: ChibiStudio 2020
Not doing well on this.
The project itself is identical to what I was running under ChibiStudio_21; same compiler version (9.3.1), same Chibi version (19.1), same target hardware. Trace worked there.
There don't appear to be any relevant differences between Chibi 19 (RT6.0) and Chibi 20 (RT6.1)
I've tried using my earlier version of openOCD.
I've tried using Java 14 (rather than a much older version).
Initially I used my older debug launch configuration files, edited to select OpenOCD TCP/IP. Maybe there's some subtlety there; I had a lot more errors on the debug interface than I'm used to.
I went to use the new functionality for generating debug launch configurations, but don't get the relevant menu options when I've selected the elf file. I thought it might be because the file is not called "ch.elf", but a quick test on another project suggests that's not the case. (I also removed the "debug" subdirectory in case that made a difference).
I found the debug launch configuration templates, and matched mine up with those.
Not found a combination which gives me the trace buffer.
Incidentally, the offending memory location which can't be read is 134926580 (0x80AD0F4) or others in that vicinity, such as 134926420, 134926376.
What have I missed?
Ironically I only moved to ChibiStudio_2020 for this project because I was having some obscure problems setting breakpoints under ChibiStudio_21.
The project itself is identical to what I was running under ChibiStudio_21; same compiler version (9.3.1), same Chibi version (19.1), same target hardware. Trace worked there.
There don't appear to be any relevant differences between Chibi 19 (RT6.0) and Chibi 20 (RT6.1)
I've tried using my earlier version of openOCD.
I've tried using Java 14 (rather than a much older version).
Initially I used my older debug launch configuration files, edited to select OpenOCD TCP/IP. Maybe there's some subtlety there; I had a lot more errors on the debug interface than I'm used to.
I went to use the new functionality for generating debug launch configurations, but don't get the relevant menu options when I've selected the elf file. I thought it might be because the file is not called "ch.elf", but a quick test on another project suggests that's not the case. (I also removed the "debug" subdirectory in case that made a difference).
I found the debug launch configuration templates, and matched mine up with those.
Not found a combination which gives me the trace buffer.
Incidentally, the offending memory location which can't be read is 134926580 (0x80AD0F4) or others in that vicinity, such as 134926420, 134926376.
What have I missed?
Ironically I only moved to ChibiStudio_2020 for this project because I was having some obscure problems setting breakpoints under ChibiStudio_21.
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: ChibiStudio 2020
I'm seeing something similar with chibios_stable- 20.3.x. In my case the address is 134401324 (0x0802cd2c), which is at the word at end of the interrupt handler - this is from the list file:
I don't normally use ChibiStudio, but looks like it will make some debugging easier.
Just to add this is on Linux, using the ST_NUCLES144_H743ZI board.
I also just tried the RT-STM32H743ZI_REV_V-NUCLEO144 demo where the TraceBuffer works fine.
Mike
Code: Select all
08007530 <SysTick_Handler>:
/**
* @brief Interrupt handler.
*
* @isr
*/
OSAL_IRQ_HANDLER(ST_HANDLER) {
8007530: b508 push {r3, lr}
OSAL_IRQ_PROLOGUE();
8007532: f002 fe9d bl 800a270 <_stats_increase_irq>
8007536: 4807 ldr r0, [pc, #28] ; (8007554 <SysTick_Handler+0x24>)
8007538: f001 fd22 bl 8008f80 <_trace_isr_enter>
800753c: f001 fc18 bl 8008d70 <_dbg_check_enter_isr>
st_lld_serve_interrupt();
8007540: f000 f826 bl 8007590 <st_lld_serve_interrupt>
OSAL_IRQ_EPILOGUE();
8007544: f001 fc3c bl 8008dc0 <_dbg_check_leave_isr>
8007548: 4802 ldr r0, [pc, #8] ; (8007554 <SysTick_Handler+0x24>)
800754a: f001 fd49 bl 8008fe0 <_trace_isr_leave>
800754e: f004 f837 bl 800b5c0 <_port_irq_epilogue>
}
8007552: bd08 pop {r3, pc}
8007554: 0802cd2c .word 0x0802cd2c
...
I don't normally use ChibiStudio, but looks like it will make some debugging easier.
Just to add this is on Linux, using the ST_NUCLES144_H743ZI board.
I also just tried the RT-STM32H743ZI_REV_V-NUCLEO144 demo where the TraceBuffer works fine.
Mike
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: ChibiStudio 2020
Hi,
I tested:
It works for me on both Linux and Windows 10 (in a VM, I don't have Windows installed). I tested.
- ChibiStudio 2020-04.
- G474 demo of version 20.3.
- Trace options to ALL.
- No other debug options.
Exactly what is failing for you?
BTW, I saw the wrong tooltip.
Giovanni
I tested:
It works for me on both Linux and Windows 10 (in a VM, I don't have Windows installed). I tested.
- ChibiStudio 2020-04.
- G474 demo of version 20.3.
- Trace options to ALL.
- No other debug options.
Exactly what is failing for you?
BTW, I saw the wrong tooltip.
Giovanni
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: ChibiStudio 2020
When using a demo, I can refresh on the TraceBuffer fine, and still works fine if I turn off tickless mode.
When I use my code, the refresh takes a long time, then pops up an error message. The popup title bar is:
ChibiOS/RT Views
The error message is:
Error:error reading memory at 134401324
That address is 0x0802cd2c which I can find in the listing as posted earlier. So there's a difference between the demo and my code that's triggering this issue.
I also notice that in the threads view, my TCPIP thread shows StkUnused as zero, I suspect because it's allocated at too high a memory address (Address 0x2407FF48, StkLimit 0x2407FB78, Stack 0x2407FDFC, StkUnused 0) as the other threads report a sensible value. I don't know if that calculation is from ChibiOS or ChibiStudio.
Mike
When I use my code, the refresh takes a long time, then pops up an error message. The popup title bar is:
ChibiOS/RT Views
The error message is:
Error:error reading memory at 134401324
That address is 0x0802cd2c which I can find in the listing as posted earlier. So there's a difference between the demo and my code that's triggering this issue.
I also notice that in the threads view, my TCPIP thread shows StkUnused as zero, I suspect because it's allocated at too high a memory address (Address 0x2407FF48, StkLimit 0x2407FB78, Stack 0x2407FDFC, StkUnused 0) as the other threads report a sensible value. I don't know if that calculation is from ChibiOS or ChibiStudio.
Mike
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: ChibiStudio 2020
I've just had a search through the source, and I'm guessing that the problem is readCString with something that's not a string - likely candidates:
Elsewhere in the code there are checks like:
Mike
Code: Select all
chibistudio_trunk/tools/chibios-rt6_debug_support/src/org/chibios/tools/eclipse/debug/utils/KernelObjects.java:441
// Fields specific to a CH_TRACE_TYPE_ISR_ENTER and CH_TRACE_TYPE_ISR_LEAVE events.
if ((type.compareTo("2") == 0) || (type.compareTo("3") == 0)) {
long name = evaluateExpressionNumber("(uint32_t)(((ch_trace_event_t *)" + tbptr + ")->u.isr.name)");
String name_s = readCString(name, 16);
map.put("isr_name_s", name_s);
}
// Fields specific to a CH_TRACE_TYPE_HALT event.
if (type.compareTo("4") == 0) {
long reason = evaluateExpressionNumber("(uint32_t)(((ch_trace_event_t *)" + tbptr + ")->u.halt.reason)");
String reason_s = readCString(reason, 16);
map.put("halt_reason_s", reason_s);
}
Elsewhere in the code there are checks like:
Code: Select all
if (n == 0)
name = "<no name>";
else
name = readCString(n, 16);
} catch (DebugProxyException e)
Mike
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: ChibiStudio 2020
StkUnused == 0 means a likely stack overflow.
You should have some filler left in each stack.
Giovanni
You should have some filler left in each stack.
Giovanni
-
- Posts: 166
- Joined: Wed Jan 09, 2019 12:37 pm
- Has thanked: 19 times
- Been thanked: 31 times
Re: ChibiStudio 2020
I've looked at the runtime memory and it contains the string "SysTick_Handler" and a trailing 0x00 so should be a good value.
Mike
Mike
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: ChibiStudio 2020
Thread names are set by the application, it is assumed those are zero terminated.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 10 guests