# Forum: ARM programming with GCC/GNU tools Beginner's problem with SAM7

 Author: Antônio Padilha (Guest) Posted on: 2006-07-13 00:45

Rate this post
 0 ▲ useful ▼ not useful
I was using WinAVR for a while but I was a bit disappointed with
ATmega8's performance for some applications, so I bougth an Olimex
SAM7-H64. I managed to program it with SAM-BA (with WinARM) and OpenOCD
(with ARM-GCC), so I thought the next steps would be easy. But the
problem is that I used the .bin provided in Olimex and SparkFun websites
for the SAM7-P64 and till now I haven't managed to blink any led with
the codes i've compiled by myself. I am mainly using the GPIO (modifying
board.h to use the Olimex board) and the OpenOCD examples provided by
Martin Thomas (and their makefiles, linker scripts, startup files).

So, my questions are: should I edit anything in the makefile provided in
those examples? Am I missing any step?

Antônio Padilha

 Author: Martin Thomas (Guest) Posted on: 2006-07-14 00:11

Rate this post
 0 ▲ useful ▼ not useful
Antônio Padilha wrote:
> I was using WinAVR for a while but I was a bit disappointed with
> ATmega8's performance for some applications, so I bougth an Olimex
> SAM7-H64. I managed to program it with SAM-BA (with WinARM) and OpenOCD
> (with ARM-GCC), so I thought the next steps would be easy. But the
> problem is that I used the .bin provided in Olimex and SparkFun websites
> for the SAM7-P64 and till now I haven't managed to blink any led with
> the codes i've compiled by myself. I am mainly using the GPIO (modifying
> board.h to use the Olimex board) and the OpenOCD examples provided by
> Martin Thomas (and their makefiles, linker scripts, startup files).
>
> So, my questions are: should I edit anything in the makefile provided in
> those examples? Am I missing any step?

Hmm, WinARM does not include the SAM-BA client-software and I don't
understand what you mean by "OpenOCD (with ARM-GCC)".

Could you please try another example? You should find other examples in
the AT91 yahoo-group file-section or in the WinARM collection at
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...
. Maybe I have made a mistake in the example for OpenOCD so it just
works with "here" with the AT91SAM7S-EK.

Martin Thomas

 Author: Antônio Padilha (Guest) Posted on: 2006-07-14 01:26

Rate this post
 0 ▲ useful ▼ not useful
Thanks for the answer, Thomas, but I've just solved my problem. I do not
follow it really well, but I guess the #if and #elif from "Board.h" were
not being recognized in the compilation. I don't know why. But after I
edited the file it worked fine with OpenOCD, though a different reset
script was more stable in my case.

> Hmm, WinARM does not include the SAM-BA client-software and I don't
> understand what you mean by "OpenOCD (with ARM-GCC)".
I guess I meant to say I am using WinARM in Windows and the latest
ARM-GCC toolchain available from this website in Linux. The SAM-BA

Thanks again.

Antônio Padilha

• $formula (LaTeX syntax)$