#5 Developer documentation about gputils internals

open
nobody
None
5
2012-08-12
2011-10-21
Anonymous
No

I got some problems with PIC14E devices. As I see the banksel does not work with 14 bit enhanced sore mcus.

Next, I tried to look into gputils and figure out how it works, hopefully could locate the problem or make a simple fix.
Unfortunatelly I feel the program is too big and complicated to understand without previous experience from the project.

Is there any documentation about internal design of the gputils?
This kind of doc can help locate bugs and give more precise help for bugfixing.

By the way, handling of banksel is a task of the assembler or the linker?

Thanks in advance,
Best regards,
Tamas

Discussion

  • Borut Ražem
    Borut Ražem
    2011-10-22

    AFAIK there is no other internal design documentation except the prefect one: the code itself ;-) The digging start point is do_banksel function in file directive.c.

    Banksel is defined in assembler and not in the linker. IMHO this is wrong since banksels could & should be automatically generated and optimized by the linker where needed, but this is an other story...

    Borut

     
  • Borut Ražem
    Borut Ražem
    2011-10-22

    Hi Tamas,

    in the mean time I took a look to the implementation of banksel and it seems OK to me, at least competing with the "PIC12F/LF1822/PIC16F/LF1823 Data Sheet" 41413B.pdf documentation:

    BANKSEL ADDRESS

    generates

    0x0020 | ((ADDRESS >> 7) & 0x1f)

    (see funtions gp_processor_set_bank_pic14e() and gp_processor_check_bank_pic14e() in gpprocessor.c).

    Can you please be more specific in which cases it doesn't work: pic device, absolute or relative mode, ... Can you please provide a short example (asm source code and generated listing) showing the defect?

    Borut

     


Anonymous


Cancel   Add attachments