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>
We use configure.gnu to pass options to the jimtcl submodule.
Make sure a distclean removes any generated files
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
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.
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).
This is only for the case of a make distcheck.
During a normal release build these flags will be created by configure.gnu
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
- 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
The following mini6410/tiny6410 functions are available:
init_6410 - initialize clock, timer, DRAM
init_6410_flash - initializes NAND flash support
install_6410_uboot - copies u-boot image into RAM and runs it