how to flash header board at91SAM through USB

Hi,

I am trying to flash the header board Atmel SAM7-256 through USB:

http://www.sparkfun.com/commerce/produc … cts_id=775

I use SAM-BA.

Problem is that when launching SAM-BA, it does not find the board. It says “no board” even if it could find the USB serial port correctly (the one attached to the board).

If i set the board to “at91sam7S256-ek” and then hit connect, then SAM-BA is hang and do not give the hand again.

If I stay to “no board”, and then try to flash the blink bin example, then the “verify” always tell mismatch between what is written and bin image.

This is from Linux, and I have installed the most recent version of SAM-BA.

Any suggestion ?

Thanks,

Have you done the “SAM-BA boot recovery procedure”? You need to do this to copy the USB firmware from the ARM chip’s ROM into its flash so that it will actually be run. (And if you overwrite it with your own code, you will need to repeat the procedure if you want to use it again.)

Yes, I did that: put the jumper tst during 10 sec with power on. The red light stays always on.

I have an identical setup. I’m going to guess that you’re using SAM-BA 2.9 - I actually found 2.9 to be nonfunctional on my Linux machine, throwing those exact same errors you report. I even tried to do the “No Board” type flashes at first as well, with the same results.

The solution: version 2.8 worked fine. [See my journal for a writeup. Also check the JTAG posts which explain why you shouldn’t use SAM-BA recovery too much, as you can ultimately brick your board with it…](http://carrierwave.wordpress.com)

Thanks carrierwave,

This is very useful information, and it helped me a lot.

I am now able to store in sram a blink bin image I found, and the memory check pass successfully. But the LED does not blink.

Following your blog, I downloaded the Atmel AT91 package, and tried to compile the “getting started example”.

No success.

Compilation with CodeSourcery fails with the following error:

arm-none-linux-gnueabi-gcc -Wall -mlong-calls -ffunction-sections -g -Os -I../at91lib/boards/at91sam7s-ek -I../at91lib/peripherals  -I../at91lib/components -I../at91lib -Dat91sam7s256 -DTRACE_LEVEL=4 -Dflash -c -o obj/flash_stdio.o ../at91lib/utility/stdio.c
../at91lib/utility/stdio.c:64: error: variable 'r' has initializer but incomplete type

From this post: http://www.at91.com/samphpbb/viewtopic.php?f=8&t=5352 it looks to be a known problem, but I can’t use the GNU ARM toolchain because i did not succeed to compile it either. Did you have the same problem ?

My background is also “avr”, that I compile under Linux. I found on AVR the toolchain much more straightforward to use on Linux than for ARM.

Olivier

For the RAM image, all I can think of is to make sure you issue the command to start it.

I do remember getting very similar error messages before I got my compiler squared away. I would suggest reinstalling CodeSourcery. Compiling your own gcc is more risky and takes time, and I didn’t notice any difference.