[riot-devel] OpenOCD-RTOS support for RIOT

Attilio Dona attilio.dona at gmail.com
Fri Oct 16 11:53:54 CEST 2015


Great job Daniel

Just to report that I've tested OCD with this patch on TI cc3200 with a to
be merged RIOT port [1] into mainstream and it works.

[1] https://github.com/attdona/RIOT

Cheers
Attilio





On Thu, Oct 15, 2015 at 6:58 PM, Daniel Krebs <mail at daniel-krebs.net> wrote:

> Dear fellow RIOTing developers,
>
> OpenOCD-RTOS support is coming to RIOT but needs your help. But first what
> am I talking about?
>
> When debugging a RIOT application via GDB you will be able to get an
> overview of all running threads and their states:
>
>> (gdb) info threads
>> [New Thread 2]
>> [New Thread 3]
>>   Id   Target Id         Frame
>>   3    Thread 3 (at86rfxx :  : Blocked receive) 0x00004104 in
>> _msg_receive (m=m at entry=0x20000f00 <_lwmac_stacks+860>, block=block at entry=1)
>> at .../RIOT/core/msg.c:329
>>   2    Thread 2 (main :  : Blocked mutex) mutex_lock (mutex=mutex at entry=0x20000a6c
>> <main_stack+1388>) at .../RIOT/core/mutex.c:53
>> * 1    Thread 1 (idle :  : Running) lpm_arch_set (target=target at entry=LPM_IDLE)
>> at .../RIOT/cpu/samd21/lpm_arch.c:98
>>
>
> You can switch the current thread and investigate the stackframe:
>
>> (gdb) thr 2
>> [Switching to thread 2 (Thread 2)]
>> #0  mutex_lock (mutex=mutex at entry=0x20000a6c <main_stack+1388>) at
>> .../RIOT/core/mutex.c:53
>> (gdb) bt
>> #0  mutex_lock (mutex=mutex at entry=0x20000a6c <main_stack+1388>) at
>> .../RIOT/core/mutex.c:53
>> #1  0x00002c96 in _xtimer_sleep (offset=396000,
>> long_offset=long_offset at entry=0) at .../RIOT/sys/xtimer/xtimer.c:53
>> #2  0x00000fa4 in xtimer_usleep (offset=<optimized out>) at
>> .../RIOT/sys/include/xtimer.h:487
>> #3  main () at .../main.c:79
>>
>
> All you need to get this working is my yet unmerged PR [1] in RIOT and a
> modified version of OpenOCD. But the OpenOCD patches need reviewing at
> their code review tool and I was told to send some RIOT developers to
> actually do that reviewing because nobody @ OpenOCD is using RIOT. So to
> get this upstream please head over to their Gerrit [2] and do the reviewing
> if you want this feature.
> You can directly login with your Github account via OAuth here [3].
>
> To test this on your system you need to compile OpenOCD yourself:
>
> $ git clone https://github.com/daniel-k/openocd.git
> $ cd openocd
> $ git checkout riot_patched
> $ ./bootstrap
> $ ./configure
> $ sudo make install
>
> Then merge my PR to your code and try it out.
>
> Cheers,
> Daniel
>
> [1] https://github.com/RIOT-OS/RIOT/pull/4058
> [2] http://openocd.zylin.com/#/c/3000/
> [3]
> http://openocd.zylin.com/login/%23%2Fregister%2Fq%2Fstatus%3Aopen?id=gerrit-oauth-provider_-github-oauth
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20151016/e3d5c7b0/attachment.html>


More information about the devel mailing list