EmbDev.net

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


von Lisong Y. (bufang)


Rate this post
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
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
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
Hello
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.

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.