PDA

View Full Version : PBP v2.50a Vs 2.60 and USB compile errors



trout59
- 14th March 2010, 16:08
I'm trying to recompile on PBP v2.60 a program that was originally compiled under PBP v2.50a, it uses USB on a 18F4550, I get the following Assembler errors

Error[113] c:\pbp\pbpic18.lib 715:Symbol not previously defined (USBDeviceInit)

I get this twice and then similar for USBDeviceTasks and PutUSB

The original code had usb18.asm, usb18.inc, usb18mem.asm and usbdesc.asm with the pbp source files (I think these are the same as in the USB18OLD directory under C:\pbp) I have read the USB.txt in the USB18 directory and have tried adding usb_dev.asm, usb_dev.inc etc to the source directory but still get same errors.

I'm also a bit new to USB so I maybe missing something simple........

Darrel Taylor
- 14th March 2010, 18:53
Due to changes made to MPLAB 8.20 and above, the old USB files would no longer compile and new ones had to be written by meLabs.

Different USB files need to be used in the project now, and a new descriptor must be generated. EasyHID descriptor files no longer work.

For HID, see this post ...
http://www.picbasic.co.uk/forum/showthread.php?p=77423#post77423
--- and this one ---
http://www.picbasic.co.uk/forum/showthread.php?p=80434#post80434


For CDC, check this one ...
http://www.picbasic.co.uk/forum/showthread.php?p=80301#post80301
<br>

Acetronics2
- 18th March 2010, 08:32
Hi, Darrel

I tried to update my "USBdemo" as stated in the first link you provide ...

BUT got:



C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\USBDEMODESC.BAS ERROR Line 7: Bad BANK number.Halting build on first failure as requested.
BUILD FAILED: Thu Mar 18 09:15:16 2010


and line 7 is :


USBReservedMemory Var Byte[USBMEMORYSIZE] USBMEMORYADDRESS ' Reserve memory used by USB assembler code


that sends us to



USBMEMORYSIZE Con 256 ' USB RAM size in bytes

and


.
.

include "PBPPIC18.RAM"
USBMEMORYADDRESS Con $400 ' USB RAM starts here


...

resulting in that I do not see what's wrong ...

Dong, Dong, Dong, Dong ....

Alain

PS: PBP2.60 + MPLAB 8.46

Darrel Taylor
- 18th March 2010, 08:58
Which all seems good for an 18F2455/2550/4455/4550 series.

Some of the newer chips use $200 for the USBMEMORYADDRESS.
But that's taken care of automatically.

Which PIC are you using?
<br>

Acetronics2
- 18th March 2010, 09:16
I use a 4550, the one I used for the original Demo ...

Alain

Darrel Taylor
- 18th March 2010, 09:27
Is that the only error you get?
I suspect there may be another error before that one?

Acetronics2
- 18th March 2010, 09:43
Halas no ...

it is the only error reported ...

Alain

Darrel Taylor
- 18th March 2010, 10:12
I don't know Ace.

But since I've already duplicated it for others, I know it works.

Your actual code might reveal something one of us missed.
Just zip the whole folder.
<br>

Darrel Taylor
- 18th March 2010, 18:00
Ummm, Do you still have the 18F4550.bas or .bal file from the old program leftover in your project folder.

You should not. It will override the files in the PBP folder.
<br>

trout59
- 24th March 2010, 05:09
Thanks DT that cleared my errors and I can compile under 2.60 !!
Is there anything else I have to do to optimize for 4550?
Under 2.50a code was 28,785bytes but under 2.60 it has increased to 29,309.

B-O Eliasson
- 11th April 2010, 09:12
I have another problem with ver 2.60. It compiles correctly, but when programmed into my device it won't do as it did when compiled with ver 2.50.
My program checks if the USB-plugg is connected and if it is'nt the program will sleep. If plugged, the program will wait for a character on the USB-bus. But now it jumps to a location in the code where it should not be. I'm also using Darrel Taylors USB_ASM_service.
Can someone help me, please.