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
Hello Tharon, you wrote: > -After issues, updated the following: > OpenOCD - Updated to latest from yagarto In this case you should have a new version like 717 from 2008-06-19 and not a version from 2007-09-05 ! It looks that you have not uninstall the old OpenOCD and the old one is in your path before the new one or something else. Why do you work with two compilers, Olimex WinARM for Dummies and YAGARTO ? Best regards, Michael
Michael Fischer wrote: > Hello Tharon, > In this case you should have a new version like 717 from > 2008-06-19 and not a version from 2007-09-05 ! > > It looks that you have not uninstall the old OpenOCD > and the old one is in your path before the new one or > something else. > > Why do you work with two compilers, Olimex WinARM for Dummies > and YAGARTO ? > > Best regards, > > Michael Michael, Thank you for taking the time to respond and noting the discrepancy. I wish that was the answer. The output I gave was collected before I switched my tools over to yagarto. The output was exactly the same, other than the date field, so I didn't bother to change it. To clarify, I started by doing the Olimex install. When I couldn't even compile, I began fixing bad path references and issues in various make files. I then referend the SAM7 Eclipse tools tutorial that is available on the net, which set me down the yagarto path. I have since moved over everything to yagarto. Right now the issue appears to be with arm-elf-gdb. There is probably some magic tweak that will make it work, but I am at a loss what it would be. I think I would have been better off by not installing from the Olimex CD. It does not run out of the box like you would expect and it has no wizard to help you configure it for your system. If it happens to magically work, great, but if not, you have to figure out for yourself how to fix it. If I had followed the tutorial from start to finish, I would have had a much better handle on what I had installed and would have tried to configure correctly as I went. If things didn't work, I would have a much better idea of how to fix it. Giving up is not an option, so I will keep plugging away at it. I can definitely say I have learned much more than if the Olimex install had worked the first time. Regards!
Michael Fischer wrote: > > Best regards, > > Michael PS - I went back to the Jim Lynch tutorial and realized you are "Mr. Yagarto". Thanks for all the work you have put into bringing it all together. I am not sure we go far enough to thank folks that support open source tools. To review: 1. Initially installed Olimex's all-in-one toolchain 2. Project demo from FreeRTOS 3. Installed yagarto and have since reconfigured for that toolchain I have to confess that I did not initially realize the Olimex toolchain was based on WinAVR. For what it is worth, I am going back to studying the fine print of Mr. Lynch's tutorial. It may be a problem with my kludged configuration. I did copy over some lines from the armusbocd.cfg into the .cfg file that came with the FreeRTOS demo and it did clean up an error on OpenOCD, but gdb is still not quite there. I considered that yagarto was intended run native and not under Cygwin, so I went ahead and run it under Zylin native (as opposed to Zylin cygwin), with everything else being the same. I got rid of the file warnings, but it otherwise acts exactly the same. It still has an error and suspends, but with no indication what the issue is. An observation: Even though .gdbinit is the default init file in various projects for (arm-elf-)gdb, not one project actually includes a .gdbinit file. Best Regards!
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
Log in with Google account
No account? Register here.