Commit Graph

3178 Commits

Author SHA1 Message Date
Palmer Dabbelt cdb4e1de4f Clear that first error 2018-05-31 23:42:13 -07:00
Palmer Dabbelt 6cbbf5317e Whoops... 2018-05-31 23:36:30 -07:00
Palmer Dabbelt b32d012997 Also skip errors for the first word 2018-05-31 23:28:48 -07:00
Palmer Dabbelt 0dccc04b04 woohps 2018-05-31 23:14:48 -07:00
Palmer Dabbelt 51b5bc1955 This code has really gone to shit 2018-05-31 23:11:57 -07:00
Palmer Dabbelt b5c0f70aa8 Make the "step any thread" message a DEBUG message 2018-05-31 20:26:27 -07:00
Palmer Dabbelt 05190fabd8 Make those fences less loud 2018-05-31 00:22:36 -07:00
Palmer Dabbelt 99eb9ac0f2 More info about fences 2018-05-31 00:21:39 -07:00
Palmer Dabbelt 6db8afb9d6 Flush the current cache first 2018-05-30 21:31:53 -07:00
Palmer Dabbelt 9d975bf8f0 Be a bit stricter about fences 2018-05-30 21:30:51 -07:00
Palmer Dabbelt 2c30659de8 Define a debug reason from the start 2018-05-30 19:40:47 -07:00
Palmer Dabbelt 07fcaa226b Keeep the RTOS hartid and the current hart in sync 2018-05-30 18:19:29 -07:00
Palmer Dabbelt 91e544d66c Invalidate the register cache more often 2018-05-30 17:48:48 -07:00
Palmer Dabbelt d2cd725dd3 Invalidate the register cache when touching another hart
The 0.13 code now caches registers interally, so when reading registers
on a diferent hart we need to invalidate the cache.
2018-05-30 17:36:22 -07:00
Palmer Dabbelt 6d9e69499f Don't rely on the RTOS hartid for the register cache 2018-05-30 07:04:14 -07:00
Palmer Dabbelt 06bc6cccd4 Revert "Don't make callbacks from riscv_openocd_{halt,resume}"
This reverts commit bfddd9af64.
2018-05-30 06:26:57 -07:00
Palmer Dabbelt bfddd9af64 Don't make callbacks from riscv_openocd_{halt,resume}
I'm not sure why this would be an issue, but it looks like for some
reason this is causing extraneous halt messages in Eclipse.
2018-05-30 06:20:16 -07:00
Palmer Dabbelt 395592ece3 Revert "Try saving the halted state when examining a target"
This reverts commit f1e8dee522.
2018-05-30 06:00:30 -07:00
Palmer Dabbelt 2ec501a8b3 Revert "double result"
This reverts commit 1b227f1f49.
2018-05-30 06:00:14 -07:00
Palmer Dabbelt 1b227f1f49 double result 2018-05-30 05:56:42 -07:00
Palmer Dabbelt f1e8dee522 Try saving the halted state when examining a target 2018-05-30 05:54:56 -07:00
Palmer Dabbelt ec42c4300e Whoops 2018-05-30 02:25:30 -07:00
Palmer Dabbelt 47731c68d2 If we don't know which thread should be halted then just don't set one 2018-05-30 02:22:59 -07:00
Palmer Dabbelt a7e00a8e72 More debugging 2018-05-30 01:42:20 -07:00
Palmer Dabbelt fccc20ad7a More debug info 2018-05-30 01:29:15 -07:00
Palmer Dabbelt 3c00bd8ff2 Enable debug during the poll 2018-05-30 01:11:17 -07:00
Palmer Dabbelt 0be30cc58c Print a bit more when a hart is halted
I think I'm getting some "wrong hart halted" issues here.
2018-05-30 01:03:02 -07:00
Palmer Dabbelt 755bf8d558 Revert "Don't raise HALT when we're examining a target"
This reverts commit dd382bb6fb.
2018-05-30 00:59:41 -07:00
Palmer Dabbelt a2d118f8e4 Revert "Don't make callbacks from riscv_openocd_{halt,resume}"
This reverts commit fb54cc4fa5.
2018-05-30 00:33:19 -07:00
Palmer Dabbelt dd382bb6fb Don't raise HALT when we're examining a target 2018-05-30 00:29:36 -07:00
Palmer Dabbelt fb54cc4fa5 Don't make callbacks from riscv_openocd_{halt,resume}
I'm not sure why this would be an issue, but it looks like for some
reason this is causing extraneous halt messages in Eclipse.
2018-05-30 00:20:45 -07:00
Palmer Dabbelt e373719ac1 Don't halt whenever GDB attaches 2018-05-30 00:05:27 -07:00
Palmer Dabbelt 3ce353cafa Revert "Don't make callbacks from riscv_openocd_{halt,resume}"
This reverts commit 43092445df.
2018-05-30 00:05:16 -07:00
Palmer Dabbelt 43092445df Don't make callbacks from riscv_openocd_{halt,resume}
I'm not sure why this would be an issue, but it looks like for some
reason this is causing extraneous halt messages in Eclipse.
2018-05-29 23:34:56 -07:00
Palmer Dabbelt 6b85d0945c Revert "Don't raise HALT when we're examining a target"
This reverts commit b39d196489.
2018-05-29 23:27:41 -07:00
Palmer Dabbelt b39d196489 Don't raise HALT when we're examining a target 2018-05-29 23:18:23 -07:00
Palmer Dabbelt d7bb150086 Move JTAG batch printing to DEBUG_LVL_IO 2018-05-29 19:59:14 -07:00
Palmer Dabbelt 052b4e3142 Don't print verbose messages when polling
I'm not 100% sure what the right thing to do here is, but I've found
that when I'm not debugging a polling issue there's way too much
verbosity in the debug level as it currently stands.
2018-05-29 19:51:00 -07:00
Tim Newsome ab7ab8a867
Merge pull request #261 from riscv/trigger_enum
Delay trigger enumeration until it's required.
2018-05-25 11:52:10 -07:00
Tim Newsome c3ffbc66e6
Merge pull request #257 from riscv/comment
Comment riscv_set_register, register_write_direct
2018-05-22 14:39:28 -07:00
Tim Newsome b629bbeade Delay trigger enumeration until it's required.
This improves startup time, which is important when connecting to
simulators. One problem is that triggers that are set when the debugger
connects are not cleared until enumeration happens. Execution may halt
due to a trigger set by a previous debug session, which could confuse
the user. If this happens, triggers will be instantly enumerated, so it
will only happen once per session.

Change-Id: I3396f713f16980a8b74745a1672fe8b8a2d4abae
2018-05-22 13:07:25 -07:00
Dan Robertson 0493ff81a1
Fix posible null deref in get_target_type
A null deref occurs if riscv_deinit_target is called and the
target has not been initialized.

Change-Id: Ic34057508ed6686eb48e9fe8220110c42ba2fc5e
2018-05-22 02:57:16 +00:00
Tim Newsome 0ad060d97a Review feedback.
Change-Id: If58c011fc8d89d329d65a6c624ffb631f111cef2
2018-05-17 18:08:08 -07:00
Tim Newsome 41c42bf2df Comment riscv_set_register, register_write_direct
Fixes #241

Change-Id: Ia199f15106a0bda465d3918d052ddd4d03655031
2018-05-17 18:01:00 -07:00
Tim Newsome bb86173f37
Merge pull request #251 from riscv/from_upstream
From upstream
2018-05-17 16:47:48 -07:00
Megan Wachs 802c3b4003
riscv: remove unexpected check during reset
I'm not sure what this check is adding, and it causes problems for implementations that take some time to report that they are halted out of reset (e.g. by executing Debug ROM).
2018-05-16 22:25:38 -07:00
Tim Newsome dabaf170ba blank_check_memory prototype has changed.
Just remove our nop implementation. The default behavior when this is
left NULL does the same thing.

Change-Id: I865976c694d24661941584cb0efc92fc26612316
2018-05-08 15:21:49 -07:00
Philipp Tomsich da7113e02d arm_dpm: flush both scratch registers (R0 and R1)
Neither the initial loop to clear dirty registers (which visits all
registers starting at R2 and counting upwards) nor the final explicit
flushes ensure a write-back in arm_dpm_write_dirty_registers.

This change makes sure that both our scratch registers (i.e. R0 and
R1) are written back to the target.

Change-Id: If65be4f371cd40af9a0cfa97f3730b070b92e981
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-on: http://openocd.zylin.com/4506
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2018-05-08 15:21:49 -07:00
Tomas Vanek e3e31fc15f target/cortex_m: allow setting the type of a breakpoint
Cortex-M target used 'auto_bp_type' mode. The requested type
of breakpoint was ignored and hard (FPB) breakpoints were set in
'code memory area' 0x00000000-0x1fffffff, soft breakpoints were set above
0x20000000.

The code memory area of Cortex-M does not mean the memory is flash and
vice versa. External flash (parallel or QSPI) is usually mapped above
code memory area. Cortex-M7 ITCM RAM is mapped at 0. Kinetis
has a RAM block under 0x20000000 boundary.

Remove 'auto_bp_type' mode, set breakpoints to requested type.

Change 'cortex_m maskisr auto' handling to use a hard temporary
breakpoint everywhere: it can also workaround not working soft breakpoints
on Cortex-M7 with ICache enabled.

Change-Id: I7a9f9464c5e10bfd7f17cba1037ed07a064fa2e8
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4429
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2018-05-08 15:21:49 -07:00
Matthias Welwarsky e2fe63f1fb armv8: valgrind memleak fixes
Various fixes for memory leaks, adds a target cleanup for aarch64
and ARM CTI objects.

Change-Id: I2267f0894df655fdf73d70c11ed03df0b8f8d07d
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/4478
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2018-05-08 15:21:49 -07:00