Hello, I am new to ARM programming and C. I have a task to create device to measure temperature, display it in LCD and send it trough USB to PC. I have: 1. OpenOCD toolchain ('Winarm' named as I understood) All is latest versions, but Eclipse is 3.2, not 3.3 2. Olimex's SAM7-H64 with AT91SAM7S64 3. Olimex's ARM-USB-OCD I took an led blink example from manual "Using Open Source Tools for AT91SAM7S Cross Development" and modify it to read ADC and put this value into LCD. Now I am trying to implement USB in my project. When I was investigating software for ARM programming, I have compiled BASIC USB project code in IAR and modifyed it to sent to computer char 'A'. And it work good. I get 'A' in computer. Now I have investigated all posible examples trying to compile it in WinARM, but it useless. They have problems during compilation beacuse of makefile. Some times they need dependance files, some times something also. Then I decided to port my IAR old code into my project. And I get 'compilable' code. Uploaded into MC but enumeration does not happens. I do not understand why. Maybe because of makefile (modified manual's version, very simple in comparation of another examples) Or maybe I have to write something in crt.s file... I do not know. Please, help me Give advice what to do I have no ideas to try. The project is http://www.bulkin.info/download/ADCLCDUSB.zip You can just import it in Eclipse.
Dima Bulkin wrote: > ... > Now I have investigated all posible examples trying to compile it in > WinARM, but it useless. They have problems during compilation beacuse of > makefile. Some times they need dependance files, some times something > also. Not enough information given to help with this. > Then I decided to port my IAR old code into my project. And I get > 'compilable' code. Uploaded into MC but enumeration does not happens. What is the "IAR code"? Is it some kind of example included in the EWARM package? AFAIK IAR includes a adapted version of Atmel's AT91 USB codes. > I do not understand why. Maybe because of makefile (modified manual's > version, very simple in comparation of another examples) Or maybe I have > to write something in crt.s file... I do not know. So you did not port the Startup-code from IAR- to GNU-assembler? Did you compare the codes? Maybe extensions are needed. Did you check if "structure packing" is needed? Did you adapt the settings for packing and maybe alignment? Did you check if there are flags set in ISR's which are also accessed by the main-loop but are not declared with volatile (it seems the IAR compiler is more tolerant about missing volatiles)?
Hello, Martin Thank you for your reply! I realy appricate it. Unfortunetly I am just starter. I do not know what is "structure packing" etc. Yes, I should read some manulas, do step-by-step tutorials to understand everything. But it will take a lot of time wich I do not have. Thus to solve my current tasks I just take examples and modify them. This is my way to study and to quick start. According this logic I decided to try again to compile and start Basic USB example, but for WinARM this time. I hope, with your help I will start it ant after that implement it into my project. I took at91sam7s64_basicusb_20060901_public. Import it into Eclipse under WinXP. Delete PC exec directory, HTML, SrcIAR, USB.ewd, USB.ewp, USBSam7.eww. Move makefile in root directory, open it and change SHELL = sh to SHELL = cmd Everything from AT91SAM7S-BasicUSB move to root directory. Try to compile Have problems with some pathes. Move all from src to root. Compile. Have about 100 errors. Wrong patchs. Move all from SrcWinArm to root. Compile Have 5 errors. Here are: fatal error: opening dependency file .dep/main.o.d: No such file or directory fatal error: opening dependency file .dep/interrupt_Usart.o.d: No such file or directory fatal error: opening dependency file .dep/dbgu.o.d: No such file or directory fatal error: opening dependency file .dep/cdc_enumerate.o.d: No such file or directory And also No rule to make target `../compil/SrcWinARM/Cstartup_SAM7.c', needed by `../compil/SrcWinARM/Cstartup_SAM7.o'. in console And now I do not know what I have to do. :( The 'google' gives me nothing.
PS. You can take current results at http://www.bulkin.info/download/mi.zip Console output is make -k all ‘Ёб⥬Ґ Ґ г¤ Ґвбп ©вЁ гЄ § л© Їгвм. ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. -------- begin -------- arm-elf-gcc (GCC) 4.0.2 Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ЌҐЇаҐ¤ўЁ¤Ґ®Ґ Ї®пў«ҐЁҐ: -f. make: *** [sizebefore] Error 1 make: *** No rule to make target `../compil/SrcWinARM/Cstartup.S', needed by `../compil/SrcWinARM/Cstartup.o'. ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. \"Compiling C (ARM-only):\" interrupt_Usart.c arm-elf-gcc -c -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DVECTORS_ROM -D__WinARM__ -Os -Wall -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=interrupt_Usart.lst -I../compil/SrcWinARM -I../.. -MD -MP -MF .dep/interrupt_Usart.o.d -Wnested-externs -std=gnu99 interrupt_Usart.c -o interrupt_Usart.o interrupt_Usart.c:169: fatal error: opening dependency file .dep/interrupt_Usart.o.d: No such file or directory compilation terminated. make: *** [interrupt_Usart.o] Error 1 make: *** No rule to make target `../compil/SrcWinARM/Cstartup_SAM7.c', needed by `../compil/SrcWinARM/Cstartup_SAM7.o'. ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. Compiling C: main.c arm-elf-gcc -c -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DVECTORS_ROM -D__WinARM__ -Os -Wall -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=main.lst -I../compil/SrcWinARM -I../.. -MD -MP -MF .dep/main.o.d -Wnested-externs -std=gnu99 main.c -o main.o main.c:31:2: warning: #warning "make sure syscalls.c is added to the source-file list (see makefile)" main.c:117: fatal error: opening dependency file .dep/main.o.d: No such file or directory compilation terminated. make: *** [main.o] Error 1 ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. Compiling C: cdc_enumerate.c arm-elf-gcc -c -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DVECTORS_ROM -D__WinARM__ -Os -Wall -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=cdc_enumerate.lst -I../compil/SrcWinARM -I../.. -MD -MP -MF .dep/cdc_enumerate.o.d -Wnested-externs -std=gnu99 cdc_enumerate.c -o cdc_enumerate.o cdc_enumerate.c:506: fatal error: opening dependency file .dep/cdc_enumerate.o.d: No such file or directory compilation terminated. make: *** [cdc_enumerate.o] Error 1 ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. Compiling C: dbgu.c arm-elf-gcc -c -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2 -DROM_RUN -DVECTORS_ROM -D__WinARM__ -Os -Wall -Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=dbgu.lst -I../compil/SrcWinARM -I../.. -MD -MP -MF .dep/dbgu.o.d -Wnested-externs -std=gnu99 dbgu.c -o dbgu.o dbgu.c:143: fatal error: opening dependency file .dep/dbgu.o.d: No such file or directory compilation terminated. make: *** [dbgu.o] Error 1 ЌҐЇаҐ¤ўЁ¤Ґ®Ґ Ї®пў«ҐЁҐ: -f. make: *** [sizeafter] Error 1 Errors: none -------- end -------- ђҐ¦Ё¬ ўлў®¤ Є®¬ ¤ нЄа (ECHO) ўЄ«озҐ. make: Target `all' not remade because of errors.
First of all: try to build outside eclipse, just from the command-line with make all. Do you still get errors?
Martin Thomas wrote: > First of all: try to build outside eclipse, just from the command-line > with make all. Do you still get errors? I made attempt. The results in cmd window: C:\workspace\mi>make all System can not find described patch (translated from Russian by me) ECHO mode is swithed off (translated from Russian by me) -------- begin -------- arm-elf-gcc (GCC) 4.0.2 Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. unforeseen appear: -f. make: *** [sizebefore] Error 255 C:\workspace\mi> I used make 3.81. Just copy it to C:\workspace\mi
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.