EmbDev.net

Forum: ARM programming with GCC/GNU tools newbie AT91SAM7-EK


Author: Chaz Virtual (chaz)
Posted on:

Rate this post
0 useful
not useful
Hi Folks,

although I have done numerous projects using microcontrollers I am
totally new to ARM, WinARM, and the ARM-GCC toolset. I have had a look
at the documentation provided in the download, and at number of posts on
this forum, and wish to pose a few questions regarding getting started.

I purchased an AT91SAM7S-EK board (with AT91SAM7S256) together with the
Segger J-Link JTAG device.

I am very keen to get to know the ARM-GCC tools and to use WinARM with
the eval board. I searched the forum in an attempt to find information
regarding the setup and use of the eval baord with the J_Link device,
yet it does not appear as though many forum users have used this
combination. I was hoping someone on the forum could guide me in setting
the device and tools up.

Further, if users have found that the J-Link device and/or the
AT91SAM7S-EK is not really the route to go if using WinARM / ARM-GCC I
would appreciate being pointed in the right direction.

Thanks in anticipation,

Chaz

Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
I've been using the AT91SAM7A3-EK with the Atmel SAM-ICE, but I believe
the SAM-ICE uses the Segger drivers, so hopefully my set up should be
comparable to yours.

For programming my board, I've been using the the SAM-PROG v2.3 provided
at the Atmel website.  This works pretty well about 95% of the time, but
if you screw up something in the code (which I think I've narrowed down
to firing off an interrupt, and then never properly acknowledge it so it
continues firing) then you might run into some problems of this program
never being able to halt the CPU.  If that happens, use Seggers J-Link
ARM command prompt program, that can usually stop it much better.

For debugging, I've been using the JLink GDB Server and arm-elf-insight
provided with WinArm (under the Utils folder).  It works fairly well,
although it is not such a big fan of virtual functions.  Even though
your code might execute them (with the proper linker script
modifications made) they will be skipped over in the debugger (they get
run, but it never shows it to you).

If you end up using the JLinkGDB/arm-elf-insight debug combo, you are
going to want your Run Options to be 'Attach to Targert', 'Continue from
Last Stop', and the Command to issure after attaching is:  monitor reset
It took me about 2 days to get the debugger to work reliably, but those
settings do the trick.  Figured I'd save you the trouble :)

Author: Chaz Virtual (chaz)
Posted on:

Rate this post
0 useful
not useful
Jim Kaz wrote:
> I've been using the AT91SAM7A3-EK with the Atmel SAM-ICE, but I believe
> the SAM-ICE uses the Segger drivers, so hopefully my set up should be
> comparable to yours.
>
> For programming my board, I've been using the the SAM-PROG v2.3 provided
> at the Atmel website.  This works pretty well about 95% of the time, but
> if you screw up something in the code (which I think I've narrowed down
> to firing off an interrupt, and then never properly acknowledge it so it
> continues firing) then you might run into some problems of this program
> never being able to halt the CPU.  If that happens, use Seggers J-Link
> ARM command prompt program, that can usually stop it much better.
>
> For debugging, I've been using the JLink GDB Server and arm-elf-insight
> provided with WinArm (under the Utils folder).  It works fairly well,
> although it is not such a big fan of virtual functions.  Even though
> your code might execute them (with the proper linker script
> modifications made) they will be skipped over in the debugger (they get
> run, but it never shows it to you).
>
> If you end up using the JLinkGDB/arm-elf-insight debug combo, you are
> going to want your Run Options to be 'Attach to Targert', 'Continue from
> Last Stop', and the Command to issure after attaching is:  monitor reset
> It took me about 2 days to get the debugger to work reliably, but those
> settings do the trick.  Figured I'd save you the trouble :)


Hi Jim,

Many thanks for the info. I'm sure gratefull I don't have to find all
that out for myself. I'll keep posting.

Cheers, Chaz

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.