aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/rtos.c
AgeCommit message (Collapse)Author
2013-07-26rtos: issue warning on auto detect failureSpencer Oliver
Currently if we fail to auto detect an rtos then no warning is given. This can also be triggered if we only find some of the rtos symbols. Change-Id: I215991bbce0909bc6af93560b0f55db13defd123 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1514 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-01keep gdb aware of threads if RTOS is set but no threads are createdZied Guermazi
if gdb server (openocd) answers qfThreadInfo with an empty string during boot, gdb will not request thread info anymore. to keep thread awareness in gdb, we have to answer with a non empty string, 'l' indicates an end of list, and is a valid answer here. Change-Id: I7870a5db1090c786f306db16a25871e69b8a9760 Signed-off-by: Zied Guermazi <guermazi.zied@gmail.com> Reviewed-on: http://openocd.zylin.com/1432 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1426 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2013-05-10Added: RTOS awareness for embKernelRavaz
Change-Id: I98b60f50a5fc486bda83b83ad7ec73826ee11607 Signed-off-by: Ravaz <embkernel@gmail.com> Reviewed-on: http://openocd.zylin.com/1334 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-03-24rtos: fixed handling of qThreadExtraInfo packetsChristian Gudrian
The commit "gdbserver: use common hexify/unhexify routines" [3d62c3d] mis-replaced a call to "str_to_hex" with a call to "unhexify". "hexify" should have been used instead. Change-Id: I5f5904b1b422f819a6308e2c0740ea43d22c7d0b Signed-off-by: Christian Gudrian <christian.gudrian@gmx.de> Reviewed-on: http://openocd.zylin.com/1308 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2013-02-26gdbserver: use common hexify/unhexify routinesSpencer Oliver
Change-Id: I9989b625666e9c60ec9867cf6f4d94f41c998c3f Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1105 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-01-27rtos: fix error messageFreddie Chopin
Probably a copy&paste error or remainings of some older version. Change-Id: Ifb81a9a1fe8242f3b114cd0686dd264fbaad4920 Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/1123 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-01-27rtos: do not use LOG_OUTPUTSpencer Oliver
LOG_OUTPUT is not intended for general output so use the correct LOG_* functions instead. Change-Id: I48d0fe765637024dbafc68f2ea08219d3ff42754 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1104 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27rtos: Fix regression preventing use of first RTOS & clean up rtos_qsymbol()Evan Hunter
ThreadX support was not working due to it being first in the list of RTOS - regression. Auto-detect off, an RTOS was always be marked as successfully detected, even if symbols are not found. Lines 223-227 were unnecessary as they are done in rtos_try_next() Added lots of comments Improved readability by separating: GDB not finding a symbol vs no more symbols being available Regression caused by patch which was allowed only 52 minutes for review : http://openocd.zylin.com/895 Change-Id: Ib4decb01db595ddb3796837c6d8338ce6b9a91ca Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/986 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-10-28gdb: fix broken qCRC packet handlingSpencer Oliver
The rtos layer was incorrectly handling a qCRC packet as a qC packet. Make sure we check for the qCRC packet and return unhandled so the gdb server gets a chance to handle it. This packet is used in the gdb compare-sections cmd. Change-Id: I21f8e5fa7225fccd13d65cf9e40186895065a7e3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/933 Tested-by: jenkins Reviewed-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-28gdb: use strncmp rather than strstrSpencer Oliver
All the packets received will be at start of the packet buffer, so use more efficient strncmp. Change-Id: Ib9c45d8f53425367006b1f880c1bde27f03a6cf9 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/932 Tested-by: jenkins Reviewed-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-28rtos: fix gdb qC command answerMatthias Blaicher
rtos->current_thread is of type int64_t. All other commands already respect this. Change-Id: I9951946ff2a09c53cd78c6ab882c80cdd2ab7ac6 Signed-off-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-on: http://openocd.zylin.com/917 Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-16rtos: Add ChibiOS/RT supportMatthias Blaicher
This patch adds ChibiOS/RT support. This patch requires at least ChibiOS/RT development version starting from SVN revision 4734. Note, that the Thread structures depend not only on the target but also on the ChibiOS configuration at build time. To correct this ChibiOS includes a new "memory signature" which specifies the offsets. Special thanks go to Peter Stuge and Spencer Oliver for their continous input and feedback to this patch. Change-Id: I842bf7ba6c2309a4efe93d29ea6cd0784a8b22a3 Signed-off-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-on: http://openocd.zylin.com/901 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-09rtos: Don't crash on qSymbol GDB packet when no RTOS is configuredMatthias Blaicher
Commit 43902905bbc8fdc9d764f3843d697161d9b5fd92 fixed a bug but also introduced a regression. The RTOS GDB packet handler is always called, not only when an RTOS is actually configured, so it is important to check if an RTOS has been configured or not before actually processing the qSymbol packet. Change-Id: I1aed54f6c2817e1ebf99ddcda051df4554ea5a3a Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://openocd.zylin.com/907 Tested-by: jenkins
2012-10-05rtos: Rewrite rtos_qsymbol() and fix auto-detect false positivePeter Stuge
Matthias Blaicher submitted a patch at http://openocd.zylin.com/#/c/891/ to fix the false positive; when no RTOS was detected OpenOCD used the last RTOS in the list. While reviewing the code affected by Matthias' patch a rewrite seemed appropriate, to make the code readable. Matthias has abandoned his change and this change also fixes the false positive. Change-Id: Ic3327ccd036da52ba0a7e21ef93018205e74149c Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://openocd.zylin.com/895 Reviewed-by: Matthias Blaicher <matthias@blaicher.com> Tested-by: jenkins
2012-10-05rtos: Rewrite rtos_try_next() for readabilityPeter Stuge
The new code is almost functionally equivalent to the old. The function now returns 0 instead of -1 if target->rtos has not yet been allocated. All call sites only test for success, and in practise that is also the only thing that matters; if the function successfully iterated to the next RTOS or not. Other than that the only difference is that the code is now readable. Many thanks to Matthias Blaicher for the fix to the iteration error! Change-Id: I3342826f653b5e46c99ad1f58eec26ff10795c33 Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://openocd.zylin.com/894 Reviewed-by: Matthias Blaicher <matthias@blaicher.com> Tested-by: jenkins
2012-10-05rtos: Rewrite rtos_create() for readabilityPeter Stuge
The new code is almost functionally equivalent to the old; besides error handling the only difference is that the code is now readable. Many thanks to Matthias Blaicher for pointing out an iteration error in the rtos_try_next() change, which also affected this change. Change-Id: If38b87439e9de2303b220b3a7e3200ceaa8391da Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://openocd.zylin.com/893 Tested-by: jenkins Reviewed-by: Matthias Blaicher <matthias@blaicher.com>
2012-08-24build: fix memory leaksSpencer Oliver
Fix the memory leaks found by clang-3.1 Change-Id: Iaae68627ef599c324c9c9ee5737c22e92512862d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/775 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-02-06build: cleanup src/rtos directorySpencer Oliver
Change-Id: I24bc62d12409dbfc20a0a986acf6b3f2c913e36d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/416 Tested-by: jenkins
2012-01-15rtos : linux awarenessMichel JAOUEN
Change-Id: I41294ccaa4a3cd253919c8b1b558205903bcb695 Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/348 Tested-by: jenkins Reviewed-by: Heythem Bouhaja <heythem.bouhaja-nonst@stericsson.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : create qsymbol interface and add str_to_hex interfaceMichel JAOUEN
Change-Id: I1b26f7efd3ad4a060f772dd12408e77a03d93cea Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/347 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : smp supportMichel JAOUEN
Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/344 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : current_threadid move to rtos contextMichel JAOUEN
Change-Id: I49d9d6d64c418be601d8723cb3eea9c3716ecb6b Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/343 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos :introduce possible overload by rtos of gdb_thread_packetMichel JAOUEN
Change-Id: I17381b581556fa75098a84699dbbf69423fe20eb Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/342 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : remove unused parameterMichel JAOUEN
Change-Id: I98c9f28a0085bd4713b694181ab544777091eac6 Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/341 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-29Add stack alignment support to RTOS awareness - needed for ARM ABI processorsEvan Hunter
Change-Id: I69a2f3d0606a97d48b7738561a85da87f458b82b Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/238 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-05warning fix: add self-consitency check to remove warningØyvind Harboe
verify promise of code that more code can be pasted with an assert at the end condition of the code passage that builds string. Change-Id: I76a4e5f91b9142fff932e1493cb43c29eb6a0f80 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/143 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-20rtos: remove broken code for handling the deprecated qP packetAndreas Fritiofson
Change-Id: Icca522c1e2a2877abb20665b171c61079b1d8f48 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/37 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2011-10-20rtos: return the correct value if the T or H packets are handledAndreas Fritiofson
Change-Id: Iea31e20ee4e35c1a9cb7b93424c92b3f38081067 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/38 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Peter Stuge <peter@stuge.se>
2011-08-24remove target argument from gdb packet handling functionsJie Zhang
2011-06-04Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixesFreddie Chopin
2011-05-25Report actual current threadAlan Bowman
2011-05-25Add eCos/Cortex RTOS supportAlan Bowman
2011-05-18Corrected test for invalid current_threadidAlan Bowman
2011-05-14Correct stacking direction and use of address offsetAlan Bowman
2011-04-19rtos : compilation error on amd64Michel Jaouen
2011-04-15RTOS Thread awareness support wipBroadcom Corporation (Evan Hunter)
- works on Cortex-M3 with ThreadX and FreeRTOS Compared to original patch a few nits were fixed: - remove stricmp usage - unsigned compare fix - printf formatting fixes - fixed a bug with overrunning a memory buffer allocated with malloc.