Olimex SAM7-P64 board + WINARM issue

I have olimex SAM7-P64 board. I tried to setup the board with WINARM tool chain. I downloaded LED blinking sample application. I wanted to run the sample from RAM, so I changed the mode in make file as RUN_FROM_RAM. In the board.h file there is #define to define board type(Atmel_AT91SAM7S_EK\Olimex_SAM7_P64). I chose Olimex_SAM7_P64.

The code compiled fine with WINARM(arm-elf-gcc 4.1.1). I tried running sample in two ways.

  1. Started OCD Remote and tried load the main.elf from gdb insight available with WINARM. Without any breakpoints I tried running the sample only my gdb insight hanged.

  2. Samething I did along with eclipse environment. I ran ocdremote as external tool. I chose gdb from WinARM\utils\insight\bin. I connected to the target and loaded the elf image. Neither I was able to see results nor the code break anywhere. I tried pausing the thread (int he context of eclipse debug), the thread paused but it was not able to show the symbol. I tried to step but the program terminated.

I am not able to figure out “what I am doing wrong” :? . Please help me out.

Regards,

VS

[/code]

I was using the version of GDB included in WinARM a couple of days ago and I had a problem I think was similar to yours. It wouldn’t allow me to step through code or anything like that. I had an older version installed on my machine and I used it - everything went just fine.

My hint is to try loading the code into flash and running it without using JTAG just to test if the code was built properly and will run. If so, you may want to consider trying an older build of GDB.

Thank you Brennen.

I was previously using WINARM-20060606. After your suggestion I download WINARM-20060331. The situation was still bad, The gdb gave error while opening itself. Then according to your second suggestion, I build the code for ROM and programmed the Flash(using SAMBA). With that I found main() function had some problem and I fixed that. Then I programmed the resultant main. bin and it worked fine with flash. After that I switched back to RAM debug with gdb available with WINARM-20060606. With the current build I am able to step through C-startup assembly. Lowlevel init was not called during the C-Startup and whenever I pressed step , the debugger showed me only “Undefined instruction 0xffffffff”.

Brennen please let me know which version of WINARM or GDB that would work fine.

If somebody has already worked with olimex SAM7-P64 board. Please share some sample that I could use with WINARM tool chain.

The version of WinARM I am using is 20060331. I switched to the GNUARM build of GDB, and the version of GDB is 6.1 (I don’t know the GNUARM version, however). I am building my stuff for a Philips LPC2148, so my problems might not necessarily be the same as yours since you’re using an Atmel chip.

I also use Jim Lynch’s startup and makefiles, so I can’t really tell you much about the startup code that WinARM uses in their makefiles. I always found the WinARM build process to be rather bloated and time-consuming, so that’s why I use Jim’s stuff. I don’t think he has stuff for your chip though, and I think that WinARM has a forum that they link from their site, so you may want to run your stuff by them there for better help.