Commit Graph

23 Commits

Author SHA1 Message Date
Tim Newsome 477f702896 Copy tool files from upstream.
Copy .travis.yml and tools/scripts/checkpatch.pl from upstream
ee31f1578a.

Addresses #913.

Change-Id: I69ad6b734ebf2cf7110010aa0481b6676124610e
Signed-off-by: Tim Newsome <tim@sifive.com>
2023-09-29 15:23:19 -07:00
Tim Newsome 868ebdd89c Merge commit '1293ddd65713d6551775b67169387622ada477c1' into from_upstream
This includes
https://sourceforge.net/p/openocd/mailman/message/37710818/, which
should fix #814.

Conflicts:
	.travis.yml
	contrib/loaders/flash/stm32/stm32f1x.S
	contrib/loaders/flash/stm32/stm32f2x.S
	doc/openocd.texi
	src/rtos/FreeRTOS.c
	src/server/gdb_server.c
	src/target/riscv/riscv-013.c
	src/target/riscv/riscv.c
	src/target/riscv/riscv.h
	src/target/riscv/riscv_semihosting.c
	tcl/target/esp_common.cfg
	tcl/target/gd32vf103.cfg
	tools/scripts/checkpatch.pl

Change-Id: I1986c13298ca0dafbe3aecaf1b0b35626525e4eb
2023-03-16 18:02:35 -07:00
Antonio Borneo 25a374a187 openocd: fix syntax of SPDX tags
Put the SPDX tag alone in a comment in the first line of the file.
Replace the obsolete GPL-2.0+ tag

The SPDX tag on files *.c is incorrect, as it should use the C99
single line comment using '//'. But current checkpatch doesn't
allow C99 comments, so keep using standard C comments, by now.

Change-Id: Ia91b0f7da42c439b6340bbe81983b86b68f6d65c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7156
Tested-by: jenkins
2022-09-13 22:03:24 +00: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
Tim Newsome 0a63eda7f2
Disable signed-off-by requirement. (#520)
Change-Id: Ie84d63bd190dc5843a636037d092457239df4240
2020-08-31 14:15:58 -07:00
Tim Newsome f5a44b0d14
Make checkpatch require Signed-off-by (#516)
* Make checkpatch require Signed-off-by

This will make it easier to send changes contributed here to mainline
OpenOCD.

(Intentionally not including the required line here to make sure I can't
just merge this.)

Change-Id: I089084d38f3e08859d62cf7eface405f37af4799

* Whitespace fix.

This PR isn't building on travis. Maybe because I only changed
.travis.yml. Here's a source change to force a build (hopefully).

Change-Id: I8a828fe1d56a1960bc4bfb91d3d2f3a0790ad571

* Can't check for signoff on sources alone.

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

* Actual whitespace fixes.

Why didn't this fail to build before?

Change-Id: I339c03c4ef96546dbef5f16e635921a4fdaf9b35
Signed-off-by: Tim Newsome <tim@sifive.com>
2020-08-31 13:20:46 -07:00
Marek Vasut 21b9a0e1e3 travis: Add .travis.yml
Add basic Travis-CI .travis.yml, to let Travis CI run automated build tests.

Change-Id: Iceae442c13f30b57842b300c0920108b614c75f7
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Reviewed-on: http://openocd.zylin.com/5414
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-04-10 13:58:09 +01:00
Tim Newsome f9bc528478 Fix filterdiff line.
We don't want to enforce code style on libjaylink, which in mainline is
a subrepository.

Change-Id: Ic72dff4b56f5781dd1ba94519eb4b067903ceaae
2019-09-30 12:47:34 -07:00
Tim Newsome 005cfca219
Install patchutils for the build. (#321)
* Install patchutils for the build.

This contains filterdiff, which we need to check that our changes
conform to OpenOCD style.

Change-Id: Id522f4e62fee3efad4e0e00933abfeada9635624

* Fix paths for filterdiff line.

Change-Id: Ic50e13c7fe64e65b2d2af0260fb19c07a9f10e20

* Conform to OpenOCD style.

Change-Id: I51660d30404c0a625b58c9bed2d948695575e72e
2018-11-05 11:50:09 -08:00
Tim Newsome a81b6d075a Exclude submodules from code style check. 2018-08-30 15:29:00 -07:00
Tim Newsome dc8c5eeac9 Re-enable style check.
Tell git to give us 20 lines of context, which hopefully is enough to
deal with some spurious warnings.

Change-Id: I97cb572f7b89ff305f46290d20ed0b4674af1f5b
2018-04-20 14:47:27 -07:00
Tim Newsome 5fa6dae9df Disable style check for now.
Fixes #242

Change-Id: I4d151350bf26bd3ea7733cb5247e4990fb487194
2018-04-20 14:47:27 -07:00
Tim Newsome 69a426038d
Enforce OpenOCD style guide. (#239)
* Enforce OpenOCD style guide.

Change-Id: I579a9f54ed22a774bf52f6aa5bc13bcbd2e82cd8

* Fail if `git diff` fails

Change-Id: I57256b0a24247f6123cb0e25a89c1b59867cb3f9

* Maybe every line gets its own shell?

Change-Id: I1a6f83e9f3d7cfd39f8933f0dba13c3cf76f71f6

* Maybe this will error properly.

Change-Id: I50803cfc229e61158569fb6b609195f7191ecac9

* Take different approach than merge-base

Change-Id: I345cbc4eecc4755c7127e8e36e403f7b727010b1

* Fix style issues.

Change-Id: I90e71f710858524812d0ab160b25c486b7b099e7
2018-04-18 13:11:08 -07:00
Tim Newsome cf895486b6 Add a build with --disable_target64
Change-Id: Ibe52a678ab7b8145ffaa54dce38149aa95bdb48c
2018-02-19 14:25:48 -08:00
Tim Newsome d942bce996 Conform to OpenOCD style guide.
Change-Id: I2b23ac79639ed40e9d59db5c52ea2196df0349bc
2017-12-26 11:38:11 -08:00
Tim Newsome 3624d5e5eb Add win32 build to travis.
Change-Id: I8ce62ff321c6f3627d42fff13236f7fc9440d429
2017-12-14 12:36:21 -08:00
Tim Newsome a4472f6d66 Build OpenOCD the way we expect users to build it.
Change-Id: I3769137bc3109b44da76f2ca689d351bb93e7832
2017-10-31 13:21:37 -07:00
Tim Newsome 702cb0dd46 Another try at 32/64 gcc/clang 2017-09-18 14:05:32 -07:00
Tim Newsome bf737b8985 Remove osx, do 32/64 gcc/clang. 2017-09-18 13:52:49 -07:00
Tim Newsome a715500912 Try clang build.
Travis takes a long time to start OSX builds.
2017-09-18 13:47:03 -07:00
Tim Newsome 21bd5e7b68 Try OSX build. 2017-09-18 13:37:51 -07:00
Tim Newsome 708b05ba07 Build 32- and 64-bit binaries with Travis. 2017-07-06 14:53:14 -07:00
Tim Newsome 3be99ac884 Perform regular build with travis. 2017-07-05 10:33:42 -07:00