Variables are stored in a hash table during compilation
by the function newReg() and subsequently retrieved by
the function dirregWithName() during the stage which
inserts bank select code. However newReg() specifically
looks for multiply named variables, and if it finds a
variable at a fixed address which is already stored
under another name, it ignores the request. When the
variable is requested using dirregWithName() (by the
second name) to get bank information, it is returned
not found and the bank selection is not done.
This patch simply removes the check for duplicate name.
I'm new to this code so it should be checked at the
very least by someone who understands why the duplicate
name was put there in the first place.
duplicate_name_variables_pic14_patch
Logged In: YES
user_id=1115835
Fixed in r4441 by creating aliases for registers with
multiple names.
Accepted the necessity to patch this though ;-)
Regards,
Raphael
PS: Duplicate names arise from aliased register definitions
in libdev/, which overlays some registers with bitfields.
The second name is required unless someone comes up with a
good idea to access both the char and the bits via 'reg' or
'reg.bitid' respectively; currently C forces us to use a
different name for the bitfield. An no, a macro merging
'reg' onto 'bitfield.raw' won't do; you might want to say
® sometime.