Commit Graph

4125 Commits

Author SHA1 Message Date
Peter Horn
d4cd6f0320 cortex_m3: add auto maskisr
This patch extends the cortex_m3 maskisr command by a new option 'auto'.
The 'auto' option handles interrupts during stepping in a way they are
processed but don't disturb the program flow during debugging.

Before one had to choose to either enable or disable interrupts. The former
steps into interrupt handlers when they trigger. This disturbs the flow during
debugging, making it hard to follow some piece of code when interrupts occur
often.

When interrupts are disabled, the flow isn't disturbed but code relying on
interrupt handlers to be processed will stop working. For example a delay
function counting the number of timer interrupts will never complete, RTOS
task switching will not occur and output I/O queues of interrupt driven
I/O will stall or overflow.

Using the 'maskisr' command also typically requires gdb hooks to be supplied
by the user to switch interrupts off during the step and to enable them again
afterward.

The new 'auto' option of the 'maskisr' command solves the above problems. When
set, the step command allows pending interrupt handlers to be executed before
the step, then the step is taken with interrupts disabled and finally interrupts
are enabled again. This way interrupt processing stays in the background without
disturbing the flow of debugging. No gdb hooks are required. The 'auto'
option is the default, since it's believed that handling interrupts in this
way is suitable for most users.

The principle used for interrupt handling could probably be used for other
targets too.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-04 11:31:52 +01:00
Spencer Oliver
89fa8ce2d8 Revert "cortex_m3: add auto maskisr"
This reverts commit ff640f197a.

Original patch reverted as Author's name was incorrectly set.
2011-07-04 11:31:52 +01:00
Drasko DRASKOVIC
bad3ee87ac mips_m4k : Fix soft breakpoint endianess handling
In order to compare data read from the target with some marcros or data
defined on the host, we must transform this read data from target
endianess to host endianess.
target_read_memory() gets bytes from target to the host, but keeps them in _target_
endianess. This is OK if we just want to temporary keep this data on the
host, like keeping breakpoint->orig_instr. But if we want to use this
data for any ispections and comparisons on the host side, we must
transform it to _host_ endianess, by using target_buffer_get_u32()
function.
Currently this transformation is missing, and check current_instr ==
MIPS32_SDBBP will never pass if target and host endianess differ,
because current_instr will be kept in _target_ endianess and
MIPS32_SDBBP will be kept in _host_ endianess,

The patch fix this issue by using target_buffer_get_u32() to transform current_instr to
_host_ endianess before comparison.
2011-07-01 21:31:08 +02:00
Øyvind Harboe
d567df02b9 dsp5680xx: disable for now, it generates warnings
Use "git revert <commit>" to revert this commit, then build and
repair and post patch to the mailing list.

Warnings generated with:

nios2-elf-gcc (GCC) 3.4.6 (Altera Nios II 9.1 b222)

openocd/src/target/dsp5680xx.c: In function 'eonce_rx_upper_data':
openocd/src/target/dsp5680xx.c:252: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c: In function 'eonce_rx_lower_data':
openocd/src/target/dsp5680xx.c:268: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c: In function 'eonce_pc_store':
openocd/src/target/dsp5680xx.c:508: warning: dereferencing type-punned
pointer will break strict-aliasing rules
openocd/src/target/dsp5680xx.c: In function 'dsp5680xx_read':
openocd/src/target/dsp5680xx.c:736: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c:737: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c: In function 'dsp5680xx_write_8':
openocd/src/target/dsp5680xx.c:823: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c: In function 'dsp5680xx_write':
openocd/src/target/dsp5680xx.c:938: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c:941: warning: cast increases required
alignment of target type
openocd/src/target/dsp5680xx.c: In function 'dsp5680xx_f_wr':
openocd/src/target/dsp5680xx.c:1355: warning: cast increases required
alignment of target type
2011-06-28 18:39:01 +02:00
Øyvind Harboe
2482244b07 mips4k: fix big-endian hosts and host alignment problems
the code was making assumptions about the endianness of the host.
2011-06-28 18:22:32 +02:00
Øyvind Harboe
e4c054cada dsp5680xx: fix compilation problems
use a more specific global variable name than "context", which
can easily conflict with other things.
2011-06-28 18:09:48 +02:00
Spencer Oliver
ff640f197a cortex_m3: add auto maskisr
This patch extends the cortex_m3 maskisr command by a new option 'auto'.
The 'auto' option handles interrupts during stepping in a way they are
processed but don't disturb the program flow during debugging.

Before one had to choose to either enable or disable interrupts. The former
steps into interrupt handlers when they trigger. This disturbs the flow during
debugging, making it hard to follow some piece of code when interrupts occur
often.

When interrupts are disabled, the flow isn't disturbed but code relying on
interrupt handlers to be processed will stop working. For example a delay
function counting the number of timer interrupts will never complete, RTOS
task switching will not occur and output I/O queues of interrupt driven
I/O will stall or overflow.

Using the 'maskisr' command also typically requires gdb hooks to be supplied
by the user to switch interrupts off during the step and to enable them again
afterward.

The new 'auto' option of the 'maskisr' command solves the above problems. When
set, the step command allows pending interrupt handlers to be executed before
the step, then the step is taken with interrupts disabled and finally interrupts
are enabled again. This way interrupt processing stays in the background without
disturbing the flow of debugging. No gdb hooks are required. The 'auto'
option is the default, since it's believed that handling interrupts in this
way is suitable for most users.

The principle used for interrupt handling could probably be used for other
targets too.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-28 14:16:48 +01:00
Peter Horn
e53f7e5fc0 cortex_m3: add BKPT_TYPE_BY_ADDR define
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-28 14:12:00 +01:00
Martin Schmölzer
5141ab3e69 Include ULINK driver in src/jtag/drivers/Makefile.am
A new variable "nobase_dist_pkglib_DATA" is introduced to install
the OpenULINK firmware image to $PREFIX/lib/openocd/OpenULINK/ulink_firmware.hex

Also, the variable "EXTRA_DIST" is used to include the OpenULINK firmware source
in the OpenOCD source distribution.
2011-06-26 17:43:51 +02:00
Martin Schmölzer
29f6f6ae5f Include ULINK driver in src/Makefile.am 2011-06-26 17:43:51 +02:00
Martin Schmölzer
f279e54347 Include ULINK driver in src/jtag/interfaces.c 2011-06-26 17:43:51 +02:00
Martin Schmölzer
3c3f3c4247 Add OpenULINK firmware
Build requires SDCC, the Small Device C Compiler.
2011-06-26 17:43:51 +02:00
Martin Schmölzer
03e4ae8481 Add source code for new ULINK driver 2011-06-26 17:43:50 +02:00
Drasko DRASKOVIC
37aaa28292 Fix load_image for ELF with all p_paddr set to zero
So far image_load command tries to load ELF binaries to address
discovered by reading p_paddr member of a Program header of an ELF
segment.

However, ELF specifications says for p_paddr : ...Because System V
ignores physical addressing for application programs, this member has
unspecified contents for executable files and shared objects.

ARM ELF specifiaction goes even further, demanding that this member
be set to zero, using the p_vaddr as a segment load address.

To avoid the cases to wrong addr where p_paddr is zero,
we are now using p_vaddr to as a load destination in case that *all*
p_paddr == 0. Basically, this patch re-implements the approach present in
BDF's elf.c, which is used by GDB also (so that we can be consistent).
2011-06-24 11:00:35 +02:00
Spencer Oliver
e7c611deea build: do not included generated files in distribution
We have to use this method as automake seems to ignore nodist_ on libs.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-17 12:22:37 +01:00
Spencer Oliver
16cbe1216a build: add missing files to make dist
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-17 12:21:01 +01:00
Spencer Oliver
3428035a7e build: add missing files from dist release
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-17 09:31:13 +01:00
Tomek CEDRO
37d5ac6378 ADAPTER: Fixed transport selection mechanism to support transports other than jtag (if defined). 2011-06-16 19:49:54 +02:00
Tomek CEDRO
9f40d41f68 OPENOCD: Renamed ambiguous main2() into openocd_thread() to show possible solution for thread support in future. 2011-06-16 17:27:12 +02:00
Øyvind Harboe
c8b5719802 transport: move files over to transport folder
as we introduce swd and jtag as two transports, we want
to start up with a new transport folder to organize the
code a bit.
2011-06-13 15:51:04 +02:00
Rodrigo L. Rosa
47aa65b3e8 doxy more 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
d343941386 doxy & cleanup 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
cbe201fe6b fix protection behavior 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
7b0ead520d cleanup trailing whitespaces 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
f4b9a2fc8b flash speed improved 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
ca76e4a423 removed unnecessary actions/controls 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
c4bcb0b95a cleanup flash module command 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
d539fc856f fix read for verify_image 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
f42353d821 fix read speed improved by queueing commands 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
f4a3db0d4a fix flash driver size, sector erase 2011-06-12 11:18:27 +02:00
Rodrigo L. Rosa
56d3927abf Added minimodule (ftdi) interface 2011-06-12 11:18:27 +02:00
Øyvind Harboe
33f9bec9ec Silence -O3 warning 2011-06-07 17:58:41 +02:00
Freddie Chopin
1cfb2287a6 Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - leftover changes 2011-06-07 17:53:33 +02:00
Stefan Mahr
5d9b7cdd2b mips: add nor flash write from memory block 2011-06-05 22:45:21 +02:00
Rodrigo L. Rosa
c989de0cea crc check on flashed data 2011-06-04 09:52:14 +02:00
Rodrigo L. Rosa
d09bef2622 code cleanup 2011-06-04 09:52:14 +02:00
Freddie Chopin
f499bab698 Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - dubious fixes 2011-06-04 09:46:48 +02:00
Freddie Chopin
f6315d5e5b Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixes 2011-06-04 09:35:13 +02:00
Stefan Mahr
796086cd49 mips: fixup fastdata
fixup fastdata
2011-06-01 07:23:42 +02:00
Stefan Mahr
524d79ebe7 mips: fix some more endian madness 2011-06-01 07:23:35 +02:00
Stefan Mahr
875298bc53 mips: fix swapping if running on big endian host 2011-05-29 23:21:23 +02:00
Damjan Marion
9b4628ddab Fixed values for Samung NAND chips 2011-05-28 19:44:17 +02:00
Damjan Marion
db91a36fdd Improve NAND flash detection
Detect based on both manufacturer id and chip id
if manufacturer id is defined in table
2011-05-28 14:30:58 +02:00
Damjan Marion
acdf14eb43 Reorganize NAND flash table
- added manufacturer field
- name moved to the end for better text alignment
2011-05-28 14:27:48 +02:00
Stefan Mahr
73988aea1f mips: fix swapping if openocd is running on big endian host 2011-05-28 14:25:06 +02:00
Alan Bowman
212db44fcf Report actual current thread 2011-05-25 22:05:26 +02:00
Alan Bowman
a57daf23db Add eCos/Cortex RTOS support 2011-05-25 22:05:23 +02:00
Stefan Mahr
6d6837f988 add support for spansion flash on mindspeed c300 eval board
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
2011-05-25 22:02:40 +02:00
Spencer Oliver
5d7d08a1f0 dsp5680xx: whitespace cleanup
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-05-23 10:23:34 +01:00
Spencer Oliver
d16b0ea6d4 Fix build issue under cygwin
cygwin does not define sleep, so use our internal win32 version.
caused by commit 9d4aec6bda

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-05-23 10:22:12 +01:00