Hello Olin, Tamas, & picers, ----- Original Message ----- From: "Olin Lathrop" To: "Microcontroller discussion list - Public." Sent: Wednesday, July 22, 2009 5:44 PM Subject: Re: [PIC] IDE Watch window > JohnSanderson wrote: >> Hello Tamas, Olin, >> >> ... >> >> Here is the content of my linker script: > > That's not what I asked for, but since it's here I'll comment on it. > .. That's true, you didn't. It was Tamas who thought it might be helpful. .. >> CODEPAGE NAME=vectors START=0x0 END=0x29 PROTECTED >> CODEPAGE NAME=page START=0x2A END=0x7DBF > > This is silly. There is no reason to split up program memory this way and > good reasons not to. Make it all one memory region. Better yet, use my > linker script. It doesn't do this Microchip stupidity and has the various > BANKn sections defined so that you can know the bank of variables at > assembly time. > .. Fair enough. Microchip make these processors so I tend to let them lead by example. .. >> SECTION NAME=TABLE_01 ROM=page >> SECTION NAME=TABLE_02 ROM=page >> SECTION NAME=TABLE_03 ROM=page >> SECTION NAME=TABLE_04 ROM=page >> >> The only mods. I have made to it concern the Table_01...04 pages. These >> were forced on me by table read requirements. > > Huh? That makes no sense. How does the table read mechanism force these? > I have used table reads many times and never defined named sections in the > linker file for that purpose. > .. It didn't make a lot of sense to me either to begin with. It was done because I couldn't find another easy way to make table reads cross page boundaries. It _doesn't_ mean there is no better way. It just means this was the first means I found to do it reliably. So I left it at that. .. >> The unassigned GPRs are loaded from 0x000500+. >> These addresses are confirmed within the watch window but never show any >> value other than 0x00. > .. Semantics. Yes, the addresses are confirmed within the watch window. The data shown for each address above 0x000200 only shows 0x00. Never anything else. .. > So you *can* see the contents of RAM locations past bank 1. > >> But, still, why the heck can't I see the values no matter where the >> regs. are assigned? > > This contradicts your statement above, so which is it? Above you said it > was showing you 0, which is certainly a value, and now you say you can't > see > any value. This makes no sense. > > Reading between the lines, I think I see what's going on. You are not > thinking this thru very well and are too quick to blame the tools. I > suspect the tools are working just fine and telling you correct and > important information, but you're not listening. My guess is that the > watch > window is working and showing you zeros because you forget to set the bank > in the code and are never writing to those locations. > .. To me, a great benefit of using relocatable code is that one does not have to worry much about banking of program or data. The linker sorts that out at compile/link time, provided the programmer sets up things correctly. To re-iterate, I have run older `Tried-and-Tested' code thru this process and had the same results. That's to say code that has been working in the field, in commercial products for +/- 7 years. Built up by myself too, so I know what went into it. Had it been the case that these locations were not being written to... then my prior built products would never have worked. But they do, & well. Mayyyy beee the tools are at fault. Just maybe. I don't assume it, the chances are rather that I have done something in my coding that leads to this unexplained situation. There's just something bizarre going on and I won't be happy till I get to the bottom of it. .. Anyway, thanks for all the help and suggestions. best regards, John eMail from the desk of John Sanderson. JS Controls cc. Manufacturer and purveyor of Force testing apparatus. john@jscontrols.co.za www.jscontrols.co.za Tel: +27 (0) 11 975 1730 Fax: +27 (0) 86 516 9725 Cell: +27 (0) 82 741 6275 PO Box 1887, Boksburg 1460, Rep. of South Africa VAT 4280246036 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist