PBP v2.50a Vs 2.60 and USB compile errors


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Default PBP v2.50a Vs 2.60 and USB compile errors

    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........

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    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/show...7423#post77423
    --- and this one ---
    http://www.picbasic.co.uk/forum/show...0434#post80434


    For CDC, check this one ...
    http://www.picbasic.co.uk/forum/show...0301#post80301

    DT

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611

    Wink

    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 :
    Code:
    USBReservedMemory Var Byte[USBMEMORYSIZE] USBMEMORYADDRESS	' Reserve memory used by USB assembler code
    that sends us to

    Code:
    USBMEMORYSIZE	Con	256	' USB RAM size in bytes
    and
    Code:
    .
    .
    
            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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    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?

    DT

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611

    Default

    I use a 4550, the one I used for the original Demo ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Is that the only error you get?
    I suspect there may be another error before that one?
    DT

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611

    Default

    Halas no ...

    it is the only error reported ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    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.

    DT

  9. #9
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    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.

    Last edited by Darrel Taylor; - 18th March 2010 at 19:17.
    DT

  10. #10
    Join Date
    Mar 2010
    Posts
    2

    Default Success - thanks

    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.

  11. #11
    Join Date
    Apr 2010
    Location
    Gavle, Sweden
    Posts
    3

    Default

    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.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts