aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/ThreadX.c
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16rtos: support gdb_get_register_packetSteven Stallion1-41/+40
This patch adds support for p packet responses by targets configured with RTOS support. This change required moving to a rtos_reg struct, which is similar to struct reg used by targets, which resulted in needing to update each stacking with register numbers. This patch also allows targets with non-linear register numbers to function with RTOSes as well. Change-Id: I5b189d74110d6b6f2fa851a67ab0762ae6b1832f Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/4121 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2017-12-06rtos: Use 'bool' as return type for detect_rtos()Marc Schink1-4/+4
Change-Id: I91ad0431d44ed94f48d20c4690f8642d66f52a9b Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4274 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-12-08gdb_server: support qXfer:threads:read packetSteven Stallion1-2/+2
This patch adds support for the qXfer:threads:read packet. In addition to providing a more efficient method of updating thread state, recent versions of GDB (7.11.1 and up) can also report remote thread names. While thread names are not enabled in this patch due to its limited applicability at the moment, it can be enabled at a later date with little effort. As a part of revamping how threads are presented to GDB, extra info strings for each of the supported RTOSes were updated to match conventions present in the GDB source code. For more information, see remote_threads_extra_info() in remote.c. This results in a much smoother experience when interacting with GDB. It is also worth mentioning that use of qXfer:threads:read works around a number of regressions in older versions of GDB regarding remote thread display. Trust me, it's great. Change-Id: I97dd6a93c342ceb9b9d0023b6359db0e5604c6e6 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3559 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-08-14rtos: remove display_str memberSteven Stallion1-5/+0
This patch removes the display_str member in the thread_detail struct. This member was not being used and provides no additional benefit over the thread_name_str and extra_info_str members. This change is made in preparation of support for the qXfer:threads:read packet, which will modernize how thread information is shared with GDB. Change-Id: I1f8bc6325e6aa790e02ea6caee9d6f44c5fedf36 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3558 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink1-3/+1
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-10-30rtos: turn stack alignment into a function pointerAndrew Ruder1-2/+2
Some targets (Cortex M) require more complicated calculations for turning the stored stack pointer back into a process stack pointer. For example, the Cortex M stores a bit in the auto-stacked xPSR indicating that alignment had to be performed and an additional 4 byte padding is present before the exception stacking. This change only sets up the framework for Cortex-M unstacking and does not add Cortex-M support. Note: this also fixes the alignment calculation nearly addressed by change #2301 entitled rtos/rtos.c: fix stack alignment calculation. Updated calculation is in rtos_generic_stack_align. Change-Id: I0f662cad0df81cbe5866219ad0fef980dcb3e44f Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Cc: Paul Fertser <fercerpav@gmail.com> Cc: Andreas Fritiofson <andreas.fritiofson@gmail.com> Cc: Evan Hunter <evanhunter920@gmail.com> Cc: Jon Burgess <jburgess777@gmail.com> Reviewed-on: http://openocd.zylin.com/3002 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2015-08-06RTOS: ThreadX support on ARM926E-JSAlexander Drozdov1-2/+160
ThreadX uses two stacking schemas on ARM926E-JS, extend API to use more then one stecking at time. Change-Id: I92d445ad0981b6409ea4c4e7e438d3a7ae39cbe7 Signed-off-by: Alexander Drozdov <adrozdoff@gmail.com> Reviewed-on: http://openocd.zylin.com/2848 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24rtos: allow symbols to be optional for a particular RTOSPaul Fertser1-2/+2
Default to non-optional. Change-Id: Ifc9ddb1ab701a19c3760f95da47da6f7d412ff2e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2355 Tested-by: jenkins Reviewed-by: Christian Gudrian <christian.gudrian@gmx.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06rtos: constify symbol names and listsSpencer Oliver1-7/+6
Change-Id: I72f3cd50fc6a33a178e72e169c9660e707751524 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2292 Tested-by: jenkins
2014-03-30Don't cast return value of [cm]allocAndreas Fritiofson1-8/+8
Change-Id: I0028a5b6757b1ba00031893d9a2a1725f915a0d5 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2069 Tested-by: jenkins Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04RTOS: Unify wipe-out of thread listChristian Eggers1-19/+1
Each RTOS implementation uses it's own (similar) code to free the thread list. There are some additional issues: <---> if (pointer != NULL) free(pointer); <---> This is not necessary, free(NULL) is perfectly ok. <---> free(rtos->thread_details); rtos->thread_details = NULL; rtos->thread_count = 0; <---> The 3rd line has been missing for all RTOS but ChibiOs. There are paths in the code where rtos->thread_count is never set to NULL, which can lead to null pointer dereference of rtos->thread_details. Change-Id: I6f7045c3d4518b925cb80dd5c907a566536b34ad Signed-off-by: Christian Eggers <ceggers@gmx.de> --- Changelog: v7: - rtos_wipe_threadlist() --> rtos_free_threadlist() - removed non related changes in gdb_server.c from this patch v3: - Removed world "topic" from first line of commit message v2: - typo: "whipe" --> "wipe" Reviewed-on: http://openocd.zylin.com/1916 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver1-1/+1
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-04-28target: rename cortex_m3 to cortex_mSpencer Oliver1-1/+1
Rename cortex_m3 target to use a more correct cortex_m name. This also adds a deprecated_name var so that older scripts issue a warning to update the target name. cfg files have also been updated to the new target name. Change-Id: Ia8429f38e88da677249c5caa560c50f8ce56ea10 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1129 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27rtos: do not use LOG_OUTPUTSpencer Oliver1-15/+15
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>
2012-12-14rtos: Add Cortex-R4 support for ThreadXEvan Hunter1-1/+10
Change-Id: I0b55af690ed917ca783d90d11dcf012f49792ed7 Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/994 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-28rtos: Use ARRAY_SIZE instead of coding it by handMatthias Blaicher1-4/+3
Use ARRAY_SIZE in helper/types.h to determine the size of the symbol list. Change-Id: Icc9838323510f8602efa5d0162a4daed33f863b9 Signed-off-by: Matthias Blaicher <matthias@blaicher.com> Reviewed-on: http://openocd.zylin.com/935 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-02-06build: cleanup src/rtos directorySpencer Oliver1-266/+207
Change-Id: I24bc62d12409dbfc20a0a986acf6b3f2c913e36d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/416 Tested-by: jenkins
2011-07-10Fix typo in command outputLuca Bruno1-1/+1
Fix a bunch of minor typo in user facing output. Signed-off-by: Luca Bruno <lucab@debian.org>
2011-04-19rtos : compilation error on amd64Michel Jaouen1-9/+9
2011-04-15RTOS Thread awareness support wipBroadcom Corporation (Evan Hunter)1-0/+536
- 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.