Commit Graph

21 Commits

Author SHA1 Message Date
Tim Newsome 39934a3de4
Remove gnulib. (#615)
Just use regular lists in FreeRTOS.c. O(n) lookups should be fine.

Change-Id: I5dc7b2fd209e0214a87d73bd6c4b63fd664bf49a
Signed-off-by: Tim Newsome <tim@sifive.com>
2021-05-28 13:24:51 -07:00
Tim Newsome 50a5971be2
RISC-V Freertos support (#582)
Support reading names/status of all threads, as well as all registers that are stored on the stack.

Limited to RV32, no FPU.

---

* WIP

Change-Id: I09417c2e45748504be449d74c39ae0b6b311e277

* WIP

Change-Id: I975fa2cabbf43ccf64f5162337c394f9c8e3017f

* Import rbtreehash-list from gnulib.

The main change to get this to build was to remove 3 includes from
config.h (actual code change in configure.ac) because lib/Makefile.am
doesn't contain the correct flags to find the files referenced there.
Instead I sprinkled necessary includes throughout the source code.

This feels like less of a hack regardless, so hopefully that's OK.

I'm not actually using the new library. Just got it to build.

Change-Id: I824000d8be0b6f58b6f2036498b37c33f453515a

* Actually use linkedhash_map.

Moved some files around to get it to link. Also note I'm using a
different module than before. This is the one I want (I think right
now).

Change-Id: I6161bffd4b5f916602c33c1930be6e061cefe982

* Properly track TCB/threadid mappings.

Change-Id: I725abb96f880745d78c5634d5faff7385c2773e1

* OpenOCD no longer crashes reading rv32 freertos regs

Change-Id: Ia84502dbf007145995d4fba8661153ab7f58f26f

* WIP

The register values reported for threads that aren't the current thread
look believable to me.

Change-Id: I94b109565c8cc2029fa77657a7fc10291bcb36e3

* Correctly mark the current thread.

Change-Id: Id94ababb55a222292090e6465e47ebf92ca26291

* Try to make the build pass.

Change-Id: I0fddd10fe22c013464f9a1e106cd21470fa7afe1
Signed-off-by: Tim Newsome <tim@sifive.com>

* Exclude new gnulib files.

Change-Id: I8b95615908034124f2236422771b5079f3304e37
Signed-off-by: Tim Newsome <tim@sifive.com>

* Style fixes.

Change-Id: I4aef0b1d0b0e366893c740ab89756fe8ea033ddb
Signed-off-by: Tim Newsome <tim@sifive.com>

* Don't include string.h.

It breaks the i686-w64-mingw32-gcc build, which complains:
error: incompatible implicit declaration of built-in function ‘strndup’

Change-Id: I8d758fe092efa503e015f71f34721f2c44632516
Signed-off-by: Tim Newsome <tim@sifive.com>

* Hopefully fix mingw32 build.

Change-Id: I8703b834b5679588b3aa6602ae4add7258dbd879
Signed-off-by: Tim Newsome <tim@sifive.com>

* Include winsock2 in replacements.

Change-Id: I77cfc90736c771a3cdefb39062e6c5b59de52cd5
Signed-off-by: Tim Newsome <tim@sifive.com>

* Zero now gets the correct value.

Change-Id: Ia7da043439a82081629b8a5991ed8cbc382d5ac8
Signed-off-by: Tim Newsome <tim@sifive.com>

* Accommodate non-general regs on the stack.

Also refactor FreeRTOS a little to separate out target-specific code
from target-indepent code.

Change-Id: Icc74d85b24f35d069be091e32e23144573560e9f

* All registers now read sane values.

It appears that FreeRTOS wastes a space on the stack, where x0 would be
saved. Am I missing something?

Correctly read mstatus as it is saved on the stack as well. This same
mechanism should also work for FPU registers, although there's more work
to be done before we get there.

Change-Id: Iabacc3af2ab368aa7b9090c1ff719451a087b5ed
Signed-off-by: Tim Newsome <tim@sifive.com>
2021-03-05 15:52:33 -08:00
R. Diez 583a65644b Make autotools warnings visible.
Change-Id: Ibcdac7100faca7a66d9b3440431e74a8a8c5f042
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: http://openocd.zylin.com/5639
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-07-30 12:26:24 +01:00
Marc Schink f60d42b0e2 Fix autogen.sh invocation of libjaylink
Move autogen.sh invocation of libjaylink from the configure to the
bootstrap script because the configure script is included in tarball
releases but autotools are not required to be available on end-user
machines.

Thanks to Paul Fertser for spotting this.

Change-Id: I5489ae83885157a01803eed51a7328e47d67ea6d
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/3569
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-11-05 20:40:18 +00:00
Paul Fertser ab90b87778 configure: remove AM_MAINTAINER_MODE, effectively always enabling all the rules
There're strong arguments against using this macro (mostly regarding
build consistency), so remove it altogether.

Change-Id: I90c8e9a86a24571019366435bd868a6799a09c45
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1476
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-15 10:13:51 +00:00
Tormod Volden fa1f2682d4 bootstrap: Various code improvements
- Do not specify -e twice.
- Use "which" instead of calling commands that might not exist.
- Fix bashism ("==" is C not sh)
- Carefully quote potentially empty variables
- Check command arguments before doing anything
- Rewrite argument checking to be more easily extensible
- Consistent indentation
- UNIX style error messages
2011-06-01 21:45:50 +02:00
Laurent Charpentier 4da551732e bootstrap: fix argument handling
- no argument => run submodule init
- "nosubmoudle" => do not run submodule
- other values => error message
2011-06-01 07:21:11 +02:00
Øyvind Harboe 37f4978f95 bootstrap: by default the submodules are initialized
use "nosubmodule" to skip setting up submodules.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-12-22 14:39:16 +01:00
Spencer Oliver c40571e6b9 build: update bootstrap comments
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-11-19 09:08:09 +00:00
Øyvind Harboe 70b1538996 bootstrap: add quick start build instructions
leave some bread-crumbs for users to figure out how
to build OpenOCD

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-29 15:18:52 +02:00
Antonio Borneo 7c5acf8660 whitespace cleanup, mostly for docs
Remove useless space/tab at end of lines.
Remove spaces in indentation and replace with tab.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30 11:51:29 -08:00
Øyvind Harboe 146e841fc9 bootstrap: stop execution upon error
When tools are not installed, exit immediately. This makes
the error messages clearer.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-04 12:46:45 +01:00
dbrownell 03c9e48f88 Change most in-tree references from SVN to GIT.
Also, talk about "mainline" not "trunk".

The release.txt and release.sh files need more updates.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2825 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-10-08 00:13:50 +00:00
zwelch ef733b48e9 Switch automake handling to use --gnu mode, not --foreign.
Remove INSTALL file; automake generates a copy of the latest version.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2435 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-30 21:44:48 +00:00
zwelch 3aa4e9ebf6 Remove redundant call to autoheader in bootstrap script.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1940 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-28 23:47:37 +00:00
zwelch 53b67960a2 Fix bootstrap typo noticed by Edgar Grimberg <edgar.grimberg@zylin.com>.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1780 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 23:37:29 +00:00
zwelch 3df27e5ce5 Fix bootstrap script to support MacOS glibtoolize oddity.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1779 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 21:55:16 +00:00
zwelch 647e61cc6d Extend autotools build to create shared library libopenocd with libtool:
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 22:03:57 +00:00
oharboe 002fdcf016 Zach Welch <zw@superlucidity.net> add --enable-maintainer-mode reminder
git-svn-id: svn://svn.berlios.de/openocd/trunk@1523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-24 16:14:21 +00:00
drath df4b030df7 - documentation fixes (thanks to Uwe Hermann)
- bootstrapping changes to accomodate packaging (thanks to Uwe Hermann)


git-svn-id: svn://svn.berlios.de/openocd/trunk@182 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-26 09:34:49 +00:00
drath 8b4e882a16 - prepare OpenOCD for branching, created ./trunk/
git-svn-id: svn://svn.berlios.de/openocd/trunk@64 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-06-02 10:36:31 +00:00