This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: [avr-gcc-list] problem with compiling avrmon]


Hi all..
Because there was no response on my message on avr-gcc list, I am trying
to send it here. I hope, it could be succesfull.
Many thanks, for your suggestions...


I have some problem with compiling TARGET part of avrmon-stk200-0.6.0.
I am not familiar with avr inline assembler, and I was trying to
understand it, I can not recognize what is the problem.

Target part consist of 
main.c
monitor.c
monitor.h

I have set paths to avr tools, and try to compile by typing make, as is
written in INSTALL file, it gives this error:

[durec@nezabudka target]$ make
/usr/bin/avr-gcc -g -Wall -mmcu=at90s8515 -O -I/usr/avr/include   -c -o
monitor.o monitor.c
monitor.c: In function `_overflow0_':
monitor.c:333: warning: asm operand 0 probably doesn't match constraints
monitor.c:337: warning: asm operand 0 probably doesn't match constraints
monitor.c:340: warning: asm operand 1 probably doesn't match constraints
monitor.c:333: error: impossible constraint in `asm'
monitor.c:337: error: impossible constraint in `asm'
monitor.c:340: error: impossible constraint in `asm'
make: *** [monitor.o] Error 1



Here is part of monitor.c:

  asm volatile ("_stepping_:push r31");
//line 333:
  asm volatile
    ("in        r31, %0\n"
     "ori       r31, %1\n"
     "out       %0, r31" :: "I" (TIMSK), "I" (BV (TOIE0)));
//line 337:
  asm volatile                  /* set timer 0 counter */
    ("ldi       r31,-4\n"
     "out       %0, r31" :: "I" (TCNT0));
//line 340:
  asm volatile                  /* start timer 0 clocks */
    ("ldi       r31, %0\n"
     "out       %1, r31" :: "I"(TIMER0_CK), "I"(TCCR0));
  asm volatile
    ("pop       r31\n"
     "andi      r30,0x7f\n"     /* clear I flag */
     "out       __SREG__, r30\n"
     "pop       r30\n"
     "reti");



Could someone help to solve this problem?

Many thanks, 
Duro.
-- 

----------------------------
email:	duro@gsm.eurotel.sk
	durec@szm.sk
http://	durec.szm.sk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]