EmbDev.net

Forum: ARM programming with GCC/GNU tools WinARM Example for AT91SAM7S256 on AT91SAM7S-EK?


Author: Bob Paddock (gracei)
Posted on:

Rate this post
0 useful
not useful
I am looking for simple working example code for the AT91SAM7S-EK
board that has the AT91SAM7S256 part mounted.

I have tried to update the example files (Makefile, board.h, linker
script etc.)  in the WinARM distribution, that where written for the
S64 part.  Alas they do not run, so I don't know where I am going
wrong.  I could figure that out if I had a working example that simply
blinked a LED for the S256 on the EK board.

Does anyone have such code?

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
Bob Paddock wrote:
> I am looking for simple working example code for the AT91SAM7S-EK
> board that has the AT91SAM7S256 part mounted.
>
> I have tried to update the example files (Makefile, board.h, linker
> script etc.)  in the WinARM distribution, that where written for the
> S64 part.  Alas they do not run, so I don't know where I am going
> wrong.  I could figure that out if I had a working example that simply
> blinked a LED for the S256 on the EK board.
>
> Does anyone have such code?

Please see
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...

On my board there is still an AT91SAM7S64 and I do not own a "new" one.
But Ewout Boks provided modified version of the linker-scripts which he
has tested with his board.

Martin Thomas

Author: Bob Paddock (gracei)
Posted on:

Rate this post
0 useful
not useful
> Please see
> 
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...

Thank you.  I had already loaded those, but I did not notice
the note about the Keil vs Atmel samples.

I switched to trying the

\WinARM\examples\at91sam7s64_Atmel_example

that is based on the Atmel examples (Split C/ASM startup).

After I added the 'volatile' key word to the wait() function,
the example worked just fine.  With out 'volatile' the busy
loop was optimized away, and all of the LEDs are lit
no mater what you do to the buttons.

static void wait ( void )
{//* Begin
  volatile unsigned int waiting_time ; /* Added 'volatile' */

  change_speed () ;

  for(waiting_time = 0; waiting_time < LedSpeed; waiting_time++)
    ;
}//* End

BTW this example still has the Makefile bug that creates
main.hex when making binary output files.

Thank you for WinARM.

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.