Search found 11 matches

by cooperised
Tue Mar 08, 2016 5:01 pm
Forum: ChibiStudio
Topic: OpenOCD doens't detect ChibiOS
Replies: 7
Views: 7608

Re: OpenOCD doens't detect ChibiOS

cooperised wrote:I'm about to submit a bug report against OpenOCD to have the requirement for the chSysInit symbol removed, and I'll add the bug tracking number here when I have it.


Bug #121 https://sourceforge.net/p/openocd/tickets/121/. I've also submitted a patch to fix the bug, change 3381.

Andy
by cooperised
Tue Mar 08, 2016 4:59 pm
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

Re: OpenOCD thread support and chSysInit visibility

Just FYI, I've submitted a bug report (#121) to OpenOCD, and then a patch to address the bug report (change 3381) which is currently in code review. Hopefully the next version of OpenOCD will support ChibiOS without having to disable LTO.

Andy
by cooperised
Tue Mar 08, 2016 11:58 am
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

Re: OpenOCD thread support and chSysInit visibility

Thanks Giovanni.

OpenOCD already looks for ch_debug in fact. The relevant code is

if ((target->rtos->symbols != NULL) &&
((target->rtos->symbols[ChibiOS_VAL_rlist].address != 0) ||
(target->rtos->symbols[ChibiOS_VAL_ch].address != 0)) &&
(target->rtos->symbols&#91 ...
by cooperised
Tue Mar 08, 2016 10:09 am
Forum: ChibiStudio
Topic: OpenOCD doens't detect ChibiOS
Replies: 7
Views: 7608

Re: OpenOCD doens't detect ChibiOS

Apologies for resurrecting this old-ish thread. This post is intended to help anyone stumbling across it (as I did) and finding this issue unsolved.

OpenOCD relies on finding the symbol 'chSysInit' in the ch.elf file for ChibiOS detection. It doesn't do anything else with the symbol, it just ...
by cooperised
Tue Mar 08, 2016 9:23 am
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

Re: OpenOCD thread support and chSysInit visibility

Ok, the signature mismatch was entirely my fault - it works this morning, and I think last night I probably just forgot to load the correct binary onto the target, so the ELF files known to gdb and OpenOCD were different.

I plan to file the bug report against OpenOCD as described. Removing the ...
by cooperised
Tue Mar 08, 2016 8:47 am
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

Re: OpenOCD thread support and chSysInit visibility

Hmm, interesting, thank you. The ch_debug symbol is definitely present (OpenOCD would fail sooner if not) but the bytes it's reading are not correct. I'll do some more sleuthing today when I get the chance and report back.

Debugging OpenOCD was not on my to-do list for the week! Oh well...

Andy
by cooperised
Mon Mar 07, 2016 11:00 pm
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

Re: OpenOCD thread support and chSysInit visibility

Thanks Giovanni. That makes perfect sense and indeed disabling LTO does remove that warning. I'll file a bug report against OpenOCD to remove the reliance on this symbol (and perhaps I'll then patch it and issue a pull request ).

Unfortunately it generates an error instead: "Memory signature does ...
by cooperised
Mon Mar 07, 2016 10:22 pm
Forum: ChibiOS/RT
Topic: OpenOCD thread support and chSysInit visibility
Replies: 9
Views: 6401

OpenOCD thread support and chSysInit visibility

Hi all,

I'm trying to use GDB and OpenOCD to get thread-aware debugging of a ChibiOS/RT project. Right now I'm using OpenOCD 0.9.0 (2016-03-03) and the unmodified STM32F4DISCOVERY demo project from Chibios 16.1.4. I have configured OpenOCD to be RTOS-aware, first by using -rtos auto (which failed ...
by cooperised
Thu Oct 29, 2015 1:09 pm
Forum: General Support
Topic: Low-latency HAL timer interrupts
Replies: 5
Views: 3265

Re: Low-latency HAL timer interrupts

Hi,

Good point about fast interrupts! I like to keep my code neat and portable whenever I can (in any context), but I don't really intend to port this anyway, and delegation is neat, so I'll just shut up and do that. :)

Andy
by cooperised
Thu Oct 29, 2015 12:36 pm
Forum: General Support
Topic: Low-latency HAL timer interrupts
Replies: 5
Views: 3265

Re: Low-latency HAL timer interrupts

Thanks for your quick reply Giovanni.

Delegation to PendSV is a possibility, but it's effectively platform-dependent isn't it? Unless ChibiOS has a delegation wrapper of which I'm unaware, PendSV is Cortex specific and even software interrupts are not a universal concept. My hope was to find a way ...