Hi Raphael,

thank you very much for your quick response! I corrected the lines as you 
suggested and it looks much better.

I have following output (maybe some problems with gputils) - there is EEPROM 
memory. I noticed it in some other projects as well so it is not a bug of USB 
code or SDCC itself.

d:\v\USB-test\PICHID>make
sdcc -I. -Id:\v\sw\sdcc\include --vc --denable-peeps --optimize-goto 
--optimize-cmp --optimize-df --obanksel=9 --opt-code-size 
--fommit-frame-pointer -mpic16 -pp18f2550  -c main.c
sdcc -I. -Id:\v\sw\sdcc\include --vc --denable-peeps --optimize-goto 
--optimize-cmp --optimize-df --obanksel=9 --opt-code-size 
--fommit-frame-pointer -mpic16 -pp18f2550  -c usb.c
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:399:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:400:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:401:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.asm:402:Warning [220] Address exceeds maximum range for this processor.
usb.c(704) : warning 110: conditional flow changed by optimizer: so said EVELYN 
the modified DOG
gplink.exe -I. -Id:\v\sw\sdcc\lib -Id:\v\sw\sdcc\lib\pic16 -m pic18f2550.lib 
libio18f2550.lib libc18f.lib libsdcc.lib crt0.o main.o usb.o  -s 18f2550.lkr -o 
USBHID.hex
warning: processor mismatch in "main.o"
warning: processor mismatch in "usb.o"

d:\v\USB-test\PICHID>gpasm --version
gpasm --version
gpasm-0.13.5 beta

Strange is the EVELYN stuff - I can't find "SET_DESCRIPTOR" (line 704) in the 
ASM ... Is it correct ?

Regarding mismatches - I don't know. Maybe libraries were generated for 
different PIC processor - hopefully register addresses are OK. Should I 
re-generate them ?

Raphael, (or anybody else), if you need some help with the debugging I am 
prepared to do everything I am able to do.

Best Regards,
Vaclav

> Hi Vaclav,
> 
> > at 1: warning 117: unknown compiler option '--fstack' ignored
> 
> Just remove --fstack from the compiler flags OPTS in Makefile. You will
> also want to remove -t 128 from the gplink command line, as SDCC
> provides the symbol _stack in the libraries; gplink's stack would
> collide with it...
> 
> > usb.c(352) : error 47: indirections to different types assignment
> > from type 'unsigned-char const-[32] code-code* '
> > to type 'unsigned-char generic* '
> 
> and following (467!, 477!, 486! (these are not warned about!), 500, 502,
> 504): You need to explicitly cast the right hand side to (code byte *)
> for now. The problem here is that casts from pointer to array type to
> pointer to simple type are not implicitly allowed.
> 
> > usb.c(693) : error 47: indirections to different types assignment
> > from type 'volatile-unsigned-char [32] near* '
> > to type 'unsigned-char generic* '
> 
> Watch out: This one wants to be cast to (data byte *) instead!
> 
> > Can somebody help me what do these messages mean ? How to correct them ?
> 
> The above measures will allow you to build the project, but manual
> inspection of the code generated for usb.c, l.309 revealed that there is
> severe bug in the code generator: instead of just reading
> SetupPacket.wValue1 (offset 3), the generated code overwrites
> SetupPacket.bmRequestType (offset 0). There seems to be lack of scratch
> register allocation. I'll have to investigate this further... Just
> thought you might want to now.
> 
> Regards,
> Raphael 

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to