#334 PIC bug: _STATUS_180

closed
nobody
None
5
2002-05-10
2002-05-07
No

C code:

data at 0x3 unsigned char STATUS;
main()
{
STATUS |= 0x20;
}

generates two symbols called '_STATUS_180' which have different values:

cblock 0X0003 ; Bank 0
_STATUS
endc
cblock 0X0020 ; Bank 0
s0x38
s0x39
s0x3A
s0x3B
s0x3C
s0x3D
s0x3E
s0x3F
endc
cblock 0X0103 ; Bank 0
_STATUS_180
endc
cblock 0X0183 ; Bank 0
_STATUS_180
endc
_STATUS EQU 0x003
s0x38 EQU 0x020
s0x39 EQU 0x021
s0x3A EQU 0x022
s0x3B EQU 0x023
s0x3C EQU 0x024
s0x3D EQU 0x025
s0x3E EQU 0x026
s0x3F EQU 0x027

This makes the assembler puke:
gpasm status180.asm -I..
status180.asm:38:Error [116] Value of symbol "_STATUS_180" differs on
second pass
pass 1=259, pass 2=387

Discussion

  • Scott Dattalo

    Scott Dattalo - 2002-05-10
    • status: open --> closed
     
  • Scott Dattalo

    Scott Dattalo - 2002-05-10

    Logged In: YES
    user_id=11911

    Fixed in device.c

    Now the multi-banked register is name mangled with the bank
    base address

     

Log in to post a comment.