Commit Graph

28 Commits

Author SHA1 Message Date
582459c5bb panda: non-returning openocd-loop at terminate
Previously for correct termination, the PandaController called
the finish-function of the openocd wrapper, invoked a coroutine
switch and waited for the openocd wrapper to finish up and switch
coroutine again, so the PandaController could exit with correct
exitStatus. Now the openocd-wrapper directly exits with chosen
exit status.

Change-Id: I8d318a4143c53340896ccee4d059a0d79fdcfe89
2014-01-22 17:43:31 +01:00
5638a7473e openocd: refactored register access
Change-Id: I396bd8a89e85d806183106c41070c58e2a37a377
2014-01-22 17:43:31 +01:00
2f6111b2f4 openocd: type-cast fix
Fixed type-cast.
As we are using -fpermissive, it won't compile otherwise.

Change-Id: I97180c3d642065a501540bc0d9c58328d2ed4188
2014-01-13 19:13:26 +01:00
81210d17b2 openocd: include fix
Fixed absolute includes

Change-Id: Idaaa81710b7ace764635c6ab45d86067aadd1220
2014-01-13 19:13:26 +01:00
c03f42db44 openocd: config fix
In the OpenOCD config file for omap4460 an old definition of
Cortex-A9 CPUs was used. Without this fix, OpenOCD would not
start up.

Additionally this commit reduces the number of available Cortex-M
debug targets to one for the sake of simplicity.

Change-Id: Ic690bebd3d171ac0773bb0f1a8087ac96127fb6e
2014-01-13 19:13:26 +01:00
74b4a04d8e openocd: fixed static definition
As the target_to_arm function is needed in the OpenOCD-Wrapper,
it can't be any longer static.

Change-Id: I7099b99f2f1433359567278be16e4d71e06f28a7
2014-01-13 19:13:25 +01:00
f24d9813b6 openocd: speed-up
Normally OpenOCD reads all GP-Registers at halt, which is slow.
Restriction to only necessary Registers 1 and 15.

In the normal use case of OpenOCD this performance reduction does
not matter, because debugging does not need to be optimized for
performance. It just has to be faster than the human perception.

If we need to get the values of the registers 2 to 14, these are
fetched on demand per register.

Change-Id: I8587fbcc41c18722baebca1cec074188fe4cdebb
2014-01-13 19:13:25 +01:00
7e3cabf197 openocd: disabled main
As the openocd-executable won't be needed, the main-function just
prints a warning, which should never be seen in fail context.

Change-Id: I8e5bbd00f152f68058f946b68201c0917db9ec9a
2014-01-13 19:13:12 +01:00
73c39f7787 openocd: header fix
* If included by cpp-file, this will cause trouble. So it gets restricted
to use in c only.
* Prevent usage of "new" as variable name
* No redifinition of true and false, if included by C++
* Definition of bool fixed

Change-Id: Ic5403bd576afd9d2900a8ecfbcfdc50561ba0633
2013-12-02 14:53:35 +01:00
0bb8ff2fa7 openocd: add openocd wrapper
Including
 * Main loop for controlling pandaboard
 * Modification routines like setting halt conditions, reading
   or writing Memory, Registers, etc.
 * Timers

The *.hpp file is defined as *.hpp.in, because the absolute path to
config file must be set by CMake-Script (Will be introduced in later
commit)

Change-Id: I648df4916877dae550943bbb9b264b8d662689b7
2013-12-02 14:53:35 +01:00
5166ddf5e7 openocd: config file for Pandaboard ES + Flyswatter2
Combines the selection of both relevant config files.

Change-Id: Icc7d0add2f0a2ceab5ed715ef8d6b3b6a70ec774
2013-12-02 14:53:35 +01:00
83d72a091e debuggers: import openocd-0.7.0
Initial check-in of openocd-0.7.0 as it can be downloaded from
http://sourceforge.net/projects/openocd/files/openocd/0.7.0/

Any modifications will follow.

Change-Id: I6949beaefd589e046395ea0cb80f4e1ab1654d55
2013-12-02 14:53:22 +01:00
ff2aec5d7e T32SIM: evaluating mem access via trace correctly :) 2013-03-21 18:58:04 +01:00
b8e706b1a5 T32SIM: Integrating Tracing feature of the T32SIM.
After each simulator break, T32Tracer retrieves the latest (16)
trace records from the T32. Memory address and value can now
be evaluated easily from the trace record.

TODO:Nevertheless we still have to traverse the trace to
find the instruction causing the access.
2013-03-21 18:57:46 +01:00
96bc39c05d T32 Simulator: Basic Instruction set sim for ARMM3
The T32 can simulate bare instruction sets without periphery.
For the Cortex-M3 we have complete NVIC model including Systick Timer.
Currently a simple CiAO can run on the simulator.

TODO:
 - Let memlogger log all memory accesses.
 - Interact with FailT32 for a complete simulation/FI
2013-03-20 17:17:38 +01:00
739a62c60b Optionparser: FAILS for non-bochs builds!
bx_startup_flags are only present in a bochs build!
2013-03-20 16:07:02 +01:00
ad3c185b61 core/util: Added CommandLine interface (for bochs) 2013-03-11 15:29:26 +01:00
f586351e79 T32: Dissassembler to evaluate memory instructions.
For the T32 variant we have to evaluate the memory
access instruction to find out, which memory address
was accessed.

Dissassmbly by OpenOCDs arm_disassembler.hpp/.cc:
- fine for ARM / Thumb1
- needs fixes for Thumb2 :( (currently doing that..)
2013-03-11 12:17:53 +01:00
010137cf54 T32: Updated to recent T32 API. 2013-03-05 17:29:48 +01:00
3501050548 T32: FailT32 support for Cortex-M3
Currently working:
 - Connect/Disconnect, Read CPU info
 - CMM Script generation and T32 startup via cmake (make runt32)
 - Read/Write Register, Read Program Pointer
 - Read/Write Memory
 - Single Breakpoint
 - Setting Memory Breakpoint

TODO:
 - Fix mock aspect for T32_GetRam.
 - Fix Thumb2 bit in function addresses from ELFReader
 - Evaluate memory breakpoint hit
2013-03-01 12:47:32 +01:00
5481cbfd39 T32: Default startup scripts for ARM Cortex-M3 2013-02-28 13:03:36 +01:00
a382057aad Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail
Conflicts:
	debuggers/t32/include/T32Connector.hpp
	debuggers/t32/src/T32Connector.cc
2013-02-21 12:37:37 +01:00
447411da9a T32: Evalute memory map, RangeListener, MemAccess 2013-02-21 12:32:55 +01:00
6ca8b5af4b T32: Evalute memory map, RangeListener, MemAccessL 2013-02-17 21:41:30 +01:00
2c6a4c2d6e T32: Parsing cli options for T32 fail-client
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2108 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2013-02-17 17:01:31 +00:00
205c7ec919 T32: Breakpoint test code
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2107 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2013-02-16 23:05:07 +00:00
d86d18bced T32: Code cleanup.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2104 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2013-02-16 22:05:00 +00:00
39a6415001 T32: Integrated Register read/write calls
* Tested without connected Lauterbach.
  T32_* functions are mocked via aspect.

* New target t32cli, for sending T32 command cia cli. (for testing)

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2103 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2013-02-15 18:06:02 +00:00