EmbDev.net

Forum: ARM programming with GCC/GNU tools No interrupt in debug mode, OK freerunning.


von Nils S. (nilswed)


Rate this post
useful
not useful
Hi,
can anybody give me a tip to solve this: No interrupt when I run in
debug mode, when I reset the board and let it run free interrupts are
OK!
Do I need any change in my debug setup when running revision 717 of
OpenOCD compared with r279??? Probably?! I am "naturally" using the very
good tutorial by Jim Lynch, but can't find any revision for r717 on the
net.
I have the latest Yagarto (Thankyou very much Martin!!!!!) toolbox
installed, AND the program is running when let loose! But it is
debugging like I did in the 70's with Z80!
Anyone having a idéa what can be the problem?
Best regards
Nils

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Nils Soderman wrote:
> Hi,
> can anybody give me a tip to solve this: No interrupt when I run in
> debug mode, when I reset the board and let it run free interrupts are
> OK!

Maybe the controller did not execute the startup-code correctly or it's
a problem with remapping.

> Do I need any change in my debug setup when running revision 717 of
> OpenOCD compared with r279??? Probably?! I am "naturally" using the very
> good tutorial by Jim Lynch, but can't find any revision for r717 on the
> net.

As far as I know Jim Lynch's tutorials describe the usage of rather old
versions of OpenOCD. OpenOCD is a very "moving target". Please see the
OpenOCD documentation.

> I have the latest Yagarto (Thankyou very much Martin!!!!!)

Yagarto is a work done by Michael Fischer not by me. So you have to
thank him.
(I'm the one who creates the "WinARM" package)

> toolbox
> installed, AND the program is running when let loose! But it is
> debugging like I did in the 70's with Z80!
> Anyone having a idéa what can be the problem?

I'm currently using this setup and debugging works as expected (hope I
have not forgotten something). Maybe you can get some useful information
for you setup from this:

- Codesourcery G++ lite arm-none-eabi Q1-2008 (GNU toolchain and gdb)
- Eclipse "Ganymede" (3.4) with CDT
- Eclipse C/C++ GDB Hardware Debugging plugin (this is not the Zylin
Plugin)
- OpenOCD SVN922 self-build with mingw/minsys from berlios svn-checkout
  the "directory tree" for openocd looks like this:
  c:\embeddev\tools\bin - openocd.exe here
  c:\embeddev\tools\interface - the interface directory for openocd svn
  c:\embeddev\tools\event - the event directory from openocd svn
  c:\embeddev\tools\target - the target directory from openocd svn
  (this is because openocd will start search in ".." from the exe)
- Amontec JTAGkey
- AT91SAM7SE512 on AT91SAM7SE-EK
- Openocd launched with
  openocd -d1 -f interface/jtagkey.cfg -f openocd.cfg
  jtagkey.cfg is from the openocd SVN (you can browse it from berlios)
  for the Olimex-"cable" you can use interface/arm-usb-ocd.cfg

  openocd.cfg looks like this:

debug_level 3
fast disable
jtag_speed 200
jtag_nsrst_delay 200
jtag_ntrst_delay 200
script target/eir-sam7se512.cfg
jtag_khz 6000
fast enable
gdb_flash_program enable
init
debug_level 1

  air-sam7se512.cfg is again from the openocd SVN ("target-library")

- I have 3 debug configurations in Eclipse using the
  "CDT GDB hardware debugging":
  (a) "debug"
      Tab Main:
      - Project from Workspace (the only on in my workspace)
      - C/C++ application: the elf-file generated during build
      Tab Debugger:
      - gdb-command: arm-none-eabi-gdb (comes with CS G++ lite)
      - Command set Standard, Protocol MI, Verbose console checked
      - Use Remote Target checked, Device generic, Host: localhost,
Port: 3333
      Tab Startup:
      - Halt checked
      - Entry in textfield:
         set mem inaccessible-by-default off
      - Run Commands textfield:
        stepi
      (everything else unchecked)
      Tab Source: did not change anything
      Tab Common:
      - Save as local file
      - Display in favorite Debug checked
      - Allocate console checked
      - Launch in background checked
  (b) "reset and debug"
      Everything as in (a) but halt unchecked and in the Init-Command
Textfield:
       monitor debug_level 3
       set mem inaccessible-by-default off
       monitor soft_reset_halt
       monitor debug_level 1
  (c) "load, reset and debug"
      Everything as in (a) but halt unchecked and in the Init-Command
Textfield:
       monitor debug_level 3
       monitor soft_reset_halt
       monitor flash probe 0
       load
       monitor soft_reset_halt
       set mem inaccessible-by-default off
       monitor debug_level 1

The used application's startup and linker-script is configured to run
code from the internal flash (not RAM or external Flash) and is based on
an example from the Atmel software-package V1.4 for the AT91SAM7SE-EK.

I'm all but sure if this is the best or even a correct configuration but
it works for me. I have to say that now that the debugging is working I
really enjoy developing with Eclipse.

Hope this helps
Martin Thomas


Edit (b) and (c): added halt unchecked

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.