Forum: ARM programming with GCC/GNU tools Failed run code in flash or AT91SAM7S256

von Lisong Y. (bufang)

Rate this post
0 useful
not useful
I am new for ARM. I am using latest version of WinArm. My target is AT91
evaluation board AT91SAM7S-EK with AT91SAM7S256. I tried the AT91SAM7
GPIO Example posted on AT91 ARM-Projects Web site, and using the link
script for
AT91SAM7S256 provide by Martin THOMAS on the same web site. The example
can be successfully run in RAM, but failed to run in Flash. Using
TRACE32 to debug the code, I found that the AT91F_LowLevelInit() never
got called, the program jumped to a wrong address 0x000000F5, instead of
0x0010013C which is the entry point of AT91F_LowLevelInit(). Thank you
very much for any help.

von Martin T. (mthomas) (Moderator)

Rate this post
0 useful
not useful
Please use the AT91 "gamma" example to get started. It's prepared for
different AT91SAM7S incl. the sam7S256.

Martin Thomas

von Lisong Y. (bufang)

Rate this post
0 useful
not useful
Thank you for response. I tried to run the gamma example, and got
similar problem.

1) When the program was running in flash, the AT91F_LowLevelInit() never
got called, the board got reset.

1) When the program was running in RAM, I could get the following
message from hypeterminal:
AT91SAM7-Demo for the GNU-Toolchain
MCK clock frequency: 48054857 Hz
However, after that the program was stucked in the following line of
code, and never got out.
stored_int = IntGetCPSR(); // save initial-state

I did not do any modification on your code, except that I modified the
make file to compile the code for AT91SAM71256. Thanks.


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.