I have been trying since yesterday to get a valid SAM7 development environment going.
Hardware:
Olimex SAM7-EX256 development board
Olimex JTAG USB OCD Tiny
Software:
Started with: Olimex “WinARM” for Dummies install
-After issues, updated the following:
Eclipse - Updated to latest
Eclipse CDT - Updated to latest
Zylin - Updated to latest
Cygwin - Updated to latest
yagarto - Updated to latest
OpenOCD - Updated to latest from yagarto
Source Code:
USB-RS232 Sample Code downloaded from Spark Fun
SAM7EX256 Ethernet Eclipse project from FreeRTOS
One thing I can definitely say is that this debug environment is no where near “plug and play”. I don’t want to list all the things I have had to play with to get as far as I have.
I am almost at wits end. As you can see, I have been trying everything I can imagine to get my configuration working.
Now, to the problem:
I finally have both project compiling just fine. I can also start OpenOCD, though I do get an error and some warnings as given below:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG instruction failed,
debugging is likely to be broken
Info: target.c:232 target_init_handler(): executing reset script ‘sam7flash.script’
Info: configuration.c:50 configuration_output_handler(): requesting target halt…
Warning: arm7_9_common.c:933 arm7_9_halt(): target was already halted
Info: configuration.c:50 configuration_output_handler(): target already halted
Info: configuration.c:50 configuration_output_handler(): waiting for target halted…
Info: configuration.c:50 configuration_output_handler(): target halted
Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
Info: configuration.c:50 configuration_output_handler(): waiting for target halted…
Info: configuration.c:50 configuration_output_handler(): target halted
Info: configuration.c:50 configuration_output_handler(): core state: ARM
Info: configuration.c:50 configuration_output_handler(): flash ‘at91sam7’ found at 0x00100000
Info: configuration.c:50 configuration_output_handler(): #0: at91sam7 at 0x00100000, size 0x00040000,
buswidth 4, chipwidth 0
Info: configuration.c:50 configuration_output_handler(): #0: 0x00000000 (0x40000kB) erase state
unknown, protection state unknown
Info: configuration.c:50 configuration_output_handler():
Info: configuration.c:50 configuration_output_handler(): at91sam7 information: Chip is AT91SAM7X256
Info: configuration.c:50 configuration_output_handler(): cidr: 0x275b0940, arch: 0x0075, eproc:
ARM7TDMI, version:0x000, flashsize: 0x00040000
Info: configuration.c:50 configuration_output_handler(): master clock(estimated): 54275kHz
Info: configuration.c:50 configuration_output_handler(): pagesize: 256, lockbits: 16 0x0000, pages in
lock region: 64
Info: configuration.c:50 configuration_output_handler(): securitybit: 0, nvmbits: 0x4
Info: configuration.c:50 configuration_output_handler():
Info: configuration.c:50 configuration_output_handler(): cleared protection for sectors 0 through 15 on
flash bank 0
Info: configuration.c:50 configuration_output_handler(): erased sectors 0 through 0 on flash bank 0 in
0s 46875us
Info: configuration.c:50 configuration_output_handler(): wrote 8496 byte from file main.bin to flash
bank 0 at offset 0x00000000 in 1s 62486us (7.808926 kb/s)
I don’t know if that is a problem or not.
I then try and launch gdb. I get some strange warnings:
source .gdbinit
Warning: /cygdrive/C/gccfd/projects/sam7ex256/include: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/drv_inf: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/srcWinARM: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/srcIAR: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/Resource: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/.dep: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/include: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/drv_inf: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/srcWinARM: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/srcIAR: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil/Resource: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/Compil: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256/.dep: No such file or directory.
Warning: /cygdrive/C/gccfd/projects/sam7ex256: No such file or directory.
No registers.
The debug window indicates the following:
sam7ex256 Debug [Zylin Embedded Degu(Cygwin)]
Embedded GDB (7/19/08 5:14 PM) (Suspended)
c:\gccfd\yagarto\bin\arm-elf.exe (7/29/08 5:14 PM)
I suspect an issue with cygwin, so I run bash and get the following:
tharon@tharonpc ~
$ cd /cygdrive/c/gccfd/projects/sam7ex256
tharon@tharonpc /cygdrive/c/gccfd/projects/sam7ex256
$ ls
AT91SAM7S-EK.h interrupt_Usart.lst main_org.o
Compil interrupt_Usart.o openocd_env_info.cmd
Makefile main.bin openocd_go_flash.cmd
armusbocd.cfg main.c readme.txt
cdc_enumerate.c main.elf sam7flash.script
cdc_enumerate.h main.lss sam7s_usb_uart.pnproj
cdc_enumerate.lst main.lst sam7s_usb_uart.pnps
cdc_enumerate.o main.map swi_handler_user.c
drv_inf main.o swi_handler_user.lst
include main.out swi_handler_user.o
interrupt_Usart.c main.sym
tharon@tharonpc /cygdrive/c/gccfd/projects/sam7ex256
$
So, when I try the directories that are giving it trouble from bash, I see them just fine using the same path. I don’t know if that is why gdb is not starting or not.
I am running out of ideas and I am getting very frustrated with this entire setup. I thought that by installing the environment from Olimex’s CD I would avoid this exact scenario of fighting with the tools for two days now. If it wasn’t for the fact that I know I can’t get another toolchain past management due to $$$, I think I would consider it right now.
If anyone would be kind enough to suggest something, I would very much appreciate it!
Regards