[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [gnupic] MCHPFSUSB AN950, AN956, ...
From: "rkuhnen (sent by Nabble.com)" ####@####.#### Date: 1 Feb 2006 15:49:03 +0000 Message-Id: <2702332.post@talk.nabble.com> Hi list, I just started with pic 18f2550 and sdcc and used the MC2.tbz code posted here. It compiled fine but running on the chip, it seems that the usb module only goes up to the DEFAULT state. Maybe something goes wrong during adressing. Is there a working port for the sdcc out there? (SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.4 #1198 (Jan 30 2006) (UNIX) and latest CVS of gputils) Raphael -- View this message in context: http://www.nabble.com/Re%3A-MCHPFSUSB-AN950%2C-AN956%2C-...-t503712.html#a2702332 Sent from the MicroControllers - GNUPIC forum at Nabble.com. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
RE: [gnupic] MCHPFSUSB AN950, AN956, ...
From: "Chen Xiao Fan" ####@####.#### Date: 2 Feb 2006 02:52:13 +0000 Message-Id: <7D4AB72251D4D949AB2732ABEABDA54F130016@PFSG-MX1.ap.p-f.biz> > -----Original Message----- > From: rkuhnen (sent by Nabble.com) > Sent: Wednesday, February 01, 2006 11:49 PM > > I just started with pic 18f2550 and sdcc and used the MC2.tbz > code posted here. > It compiled fine but running on the chip, it seems that the > usb module only goes up to the DEFAULT state. Maybe something > goes wrong during addressing. > Is there a working port for the sdcc out there? > Please try the following link and report your progress. Thanks. http://www.geocities.com/tegale2001/downloads/pickit2.tar.gz You need to change main.c and stdp.c so that it will build with later version of sdcc. Attached please find the updated C files. You may need to change the Makefile as well. I have not tested this though but the author said the usb part is working (not the stdp part for dsPIC). You should look into usb.c and comms.c for the usb related information. It is meant for PICkit 2 with the PICkit 2 bootloader so it is using 0x2000 and above memory since the lower memory is reserved by the bootloader. You can also try to port Bradley Minch's C18 USB examples to SDCC. They are less complicated than Microchip's C18 stack. Moreover there are corresponding assembly based version so it will be "easier" to port to sdcc. So far there is one report of SDCC port of those examples but it is not working. Regards, Xiaofan [Content type application/octet-stream not shown. Download] [Content type application/octet-stream not shown. Download] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [gnupic] MCHPFSUSB AN950, AN956, ...
From: Xiaofan Chen ####@####.#### Date: 2 Feb 2006 12:34:13 +0000 Message-Id: <a276da400602020434n1da7d411q810f793cdc13b4a4@mail.gmail.com> On 2/2/06, Chen Xiao Fan ####@####.#### wrote: > You need to change main.c and stdp.c so that it will build > with later version of sdcc. Attached please find the updated > C files. You may need to change the Makefile as well. Here is the Makefile under linux. It should work for Windows as well but I have not tested that. CC=sdcc CFLAGS=-mpic16 -p18f2550 --ivt-loc=0x2000 --use-crt=crt0iz.o #LDFLAGS=-p18f2550 -Wl"-s18f2550.lkr" libio18f2550.lib PROJ=main.hex OBJ=usb.o main.o comms.o vpp.o stdp.o LIB = pic18f2550.lib libsdcc.lib all: $(PROJ) $(PROJ): $(OBJ) gplink -s 18f2550.lkr -I/usr/local/share/sdcc/lib/pic16 -o $@ crt0iz.o $(LIB) $(OBJ) #%.o: %.c # $(CC) $(CCFLAGS) -c $< -o $@ clean: $(RM) *.asm *.cod *.hex *.lst *.o install: all sed 's/^:040000/:042000/' main.hex > main2.hex # ~/project/pickit2/src/pk2_bootload main2.hex # smbclient '\\radio\Share Area' -D pic/usb -N -c 'prompt; mput *' Regards, Xiaofan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [gnupic] MCHPFSUSB AN950, AN956, ...
From: "rkuhnen (sent by Nabble.com)" ####@####.#### Date: 3 Feb 2006 10:33:47 +0000 Message-Id: <2737448.post@talk.nabble.com> Thanks for the hint, I tried the pickit code. I dont have a bootloader, so i used the standard linker skript of gputils. The changes in code I did are: - commented out the vpp and stdp stuff to have the "naked" usb - added "while(UCONbits.SE0);" to usb_init() - added ";" after the Nop() commands What happened: the usb_gettype(0) in comms.c never returns ptSetup ... don't know why... Hardware: pic18f2550 with 20MHz crystal, bus powered portA as input, portB as led outputs (for tracing code) Tried a bootloader I got as .hex file, disassembled it , removed everything but the USB stuff for better understanding, assembled again with my config bits and it was recognized by the computer... seems the hardware works. The code I used can be seen on http://cluster.physik.uni-freiburg.de/~kuhnen/pic/ Regards Raphael -- View this message in context: http://www.nabble.com/Re%3A-MCHPFSUSB-AN950%2C-AN956%2C-...-t503712.html#a2737448 Sent from the MicroControllers - GNUPIC forum at Nabble.com. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |