Re: [Fx2lib-devel] Setupdata at 0xe000
Status: Beta
Brought to you by:
mulicheng
From: Chris M. <fx...@m3...> - 2011-09-16 13:13:42
|
OK I see now. Sorry, I was unaware of the 512 bytes of RAM at 0xe000. Your patch jumps through hoops to ensure that unless you set DSCR_ADDRSPACE, everything remains exactly as it is today. Is that really necessary? If we just go ahead and change the storage class of the string descriptors from "code" to "xdata" in setupdat.c[1] (i.e no preprocessor guards), will it conceivably break anything? It looks to me like changing it to "xdata" merely gives apps the option of relocating DSCR_AREA to 0xe000 (which may be used for "xdata" only, not "code"), but with NO downside. Or am I missing something? FWIW, I just tried the code->xdata + DSCR_AREA=e000 change on the firmware in FPGALink[2] and it works fine. Also, was your diff from a branch or something? The trunk has string descriptors declared like this[1] in setupdat.c: extern code WORD dev_dscr; extern code WORD dev_qual_dscr; extern code WORD highspd_dscr; extern code WORD fullspd_dscr; extern code WORD dev_strings; i.e, s/__code/code/g Chris [1] https://github.com/mulicheng/fx2lib/blob/master/lib/setupdat.c#L273 [2] http://www.makestuff.eu/wordpress/?page_id=1400 On Fri, 2011-09-16 at 21:30 +0930, Daniel O'Connor wrote: > I think there's a good argument for putting it at 0xe000 because it saves precious code memory :) > > I don't think there is any performance consideration one way or the other. > > The only reason I'd think to leave it would be because of existing code (which isn't necessarily a small thing!) |