Re: [Fx2lib-devel] bulkloop example crashing FX2?
Status: Beta
Brought to you by:
mulicheng
From: Dennis M. <de...@ub...> - 2009-03-03 19:15:37
|
Aric Marheine wrote: > The problem comes down to the fact that the FX2 only has 8KByte RAM, and > the FX2LP(which you have) has 16KByte RAM. So I've got it working as > long as I tweek the settings in the Makefile and keep things small. > > A bit of a noob question: How can I make use of the external RAM to > overcome this shortage? I'm kind of at a loss as to the command line > options to use with SDCC in order to describe my hardware. My board > currently has 0x0000-0x1FFF mapped to internal RAM and 0x2000-0xFFFF > mapped to external RAM. > If I have: > CC = sdcc -mmcs51 --code-size 0x1800 --xram-loc 0x2000 \ > -Wl"-b DSCR_AREA = 0x1800" \ > -Wl"-b INT2JT = 0x1A00" > > Then everything works fine, but that gives me little space for code. > How do I change this to put my code/data into the external RAM and > execute it from there? > I try to create a firmware small enough to fit in the ram on the chip. The development board has the nice 0x2000-0xffff area memory that you can stick a lot of stuff in, but you can then never run your firmware on the same chip on a real PCB. (Because it likely won't have the same external memory.) Your approach so far is exactly the way I do it: --xram-loc --xram-size, --code-size etc. Back to your question though, you might try the --codeseg option or the codeseg #pragma and then use the linker to place that segment at a certain memory location (same as you do with INT2JT). Glad you found the issue. -Dennis |