EmbDev.net

Forum: ARM programming with GCC/GNU tools Newbie: Insight-GDB, interrupts, & AT91SAM7S256


Author: Holger Schellwat (fzippo)
Posted on:

Rate this post
0 useful
not useful
Hello,

I was able to compile the at91sam7s_example_gamma_20060910b
example for my Olimex SAM7-P256 board into RAM, I even
suceeded in using SAM-BA (USB) to upload the binary.
I want to step through it with Insight, connected via ocdremote
and Olimex wiggler (connects nicely). However, Insight
would hang unless I comment out anything involving interrupts.
Sure, since these are my first steps on the new platform,
I know too little about ARM and GDB. I wonder whether such
debugging is impossible in principle, perhaps because GDB
uses software interrupts for breakpoints, or if this should be
possible in general.


Many thanks to Martin THOMAS for the excellent WinARM distribution,
regards,

Holger.#

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
Holger Schellwat wrote:
> Hello,
>
> I was able to compile the at91sam7s_example_gamma_20060910b
> example for my Olimex SAM7-P256 board into RAM, I even
> suceeded in using SAM-BA (USB) to upload the binary.
> I want to step through it with Insight, connected via ocdremote
> and Olimex wiggler (connects nicely). However, Insight
> would hang unless I comment out anything involving interrupts.
> Sure, since these are my first steps on the new platform,
> I know too little about ARM and GDB. I wonder whether such
> debugging is impossible in principle, perhaps because GDB
> uses software interrupts for breakpoints, or if this should be
> possible in general.
>
>
> Many thanks to Martin THOMAS for the excellent WinARM distribution,
> regards,
>
> Holger.#

I expect the reason for your problem is that the core still expects the
exception-vectors at 0x0 but they are located at 0x00200000 for
"RAM_RUN".
In the RAM_RUN configuration of "gamma 20060610b" remapping is not
enabled by the startup-code. In my optionion it's the task of the
debugging-software to enabled remap (i.e. in a "debugger-script") before
setting PC to 0x00200000 so it's not enabled by default in "RAM_RUN".

Anyway: for a test you could try to replace
/*---------------------------------------------------------------------- 
--------
/*- Remapping
/*---------------------------------------------------------------------- 
--------*/
.if (VECTREMAPPED)

with

.if (1)

in startup.S so the remapping-code is alway included and executed at
startup.


Hope this helps,
Martin Thomas

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.