18f + Debug


Closed Thread
Results 1 to 7 of 7

Thread: 18f + Debug

  1. #1
    Beavis's Avatar
    Beavis Guest

    Default 18f + Debug

    GETTING DEBUG CANNOT BE REDEFINED DURING COMPILE, ANY IDEAS?

    PicBasic Pro Compiler 2.45, (c) 1998, 2004 microEngineering Labs, Inc.
    All Rights Reserved.
    Error[115] C:\PBP\PBPPIC18.LIB 1524 : Duplicate label ("DEBUG" or redefining symbol that cannot be redefined)


    ITS A BARE MINIMUM PROGRAM TO JUST CHECK IF DEBUG WORKS.........WICH IT DOES NOT.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    can you just post the header of your program (fuses,define, declare) Sure it's not a big problem...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Beavis's Avatar
    Beavis Guest


    Did you find this post helpful? Yes | No

    Default

    ASM
    __CONFIG 0X300001, 0X38
    __CONFIG 0X300002, 0XFF
    __CONFIG 0X300003, 0X00
    __CONFIG 0X300005, 0X01
    __CONFIG 0X300006, 0X00
    __CONFIG 0X300008, 0X0F
    __CONFIG 0X300009, 0XC0
    __CONFIG 0X30000A, 0X0F
    __CONFIG 0X30000B, 0XE0
    __CONFIG 0X30000C, 0X0F
    __CONFIG 0X30000D, 0X40
    ENDASM

    DEFINE OSC 4

    TRISA=%00000000
    TRISB=%00000000
    TRISC=%11111111
    TRISD=%00000000
    TRISE=%11111111

    DEFINE DEBUG_REG PORTB
    DEFINE DEBUG_BIT 6
    DEFINE DEBUG_BAUD 2400
    DEFINE DEBUG_MODE 1
    DEFINE DEBUG_PACING 10

    LOOP:

    PORTA.1=1
    PAUSE 50
    PORTA.1=0
    PAUSE 50

    DEBUG "WORKS?"

    GOTO LOOP


    END


    the entire program, oh btw it works with "listed" supported 18f processors, and im using a 18f4620, not in the list, so i guess thats limited support for that processor. So I take it the the statement of "all microchip processors supported" is a bit of a mis-statement....

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    This error appears to be Microchips fault. Not MeLabs. DEBUG is a library command in the PBP 18F library, BUT, it's also defined as a register in the P18F4620.INC file Microchip provides with MPLAB.

    The error is because you can't *re-define* DEBUG.

    Open your P18F4620.INC file in your MPLAB directory.

    Comment this line out --> DEBUG EQU H'0FD4'. Save, exit, you should be in business.

    For some odd reason Microchip thinks this 18F series has a DEBUG register at location 0FD4h tucked away between OSCCON & T0CON.

    Unless I'm missing something, my 4620 datasheet shows this particular register address as "unused".

    I found the same deal in the 2525/2620/4525/4620 .INC files shipped with MPLAB. Go figure..!
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Beavis's Avatar
    Beavis Guest


    Did you find this post helpful? Yes | No

    Default

    hot damn!, if i was gay id kiss you! lol. Ive got alot to learn. BTW, why isnt microchip working a little closer with melabs, seems you guys know thier product better than they do

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    hehe, those compiler error are mostely due to the default settings in the .inc files. Try define all config fuses in a 18F452 or elses... you'll get ERROR 118...overwriting previous address bla bla bla.

    Once you visit melabs website, on all folder, you'll find a link like this

    http://microengineeringlabs.com/supp...g_defaults.htm

    again refering to the .inc file. So for my purpose/use i decide to comment all default setting in the .inc files i currently use. So now i have the full control of the PIC and. of course, avoid compilation errors.

    why isnt microchip working a little closer with melabs, seems you guys know thier product better than they do
    They assume that everybody read/understand the default setting in .inc files. They also assume that everything is clear with those ERRORs message... not my point of view but once you know to what it refer, it's easy to debug/understand.

    IMO they never working closer with Melabs... with the new MPLAB (6.62 or 7(not sure for this one..still not install on my machine)) the PicBasic Pro toolsuite language is not include as in the past. You must go to the Melabs website to get the patch. Why??? i don't know.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Beavis's Avatar
    Beavis Guest


    Did you find this post helpful? Yes | No

    Default

    hmmmz, debug still wont work, although no compile errors

Similar Threads

  1. N-Bit_MATH
    By Darrel Taylor in forum Code Examples
    Replies: 38
    Last Post: - 16th December 2010, 14:48
  2. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  3. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 07:51
  4. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  5. Debug and some 18F pics
    By sinoteq in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st June 2007, 15:10

Members who have read this thread : 0

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

Posting Permissions

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