[Gc] Advise for port to uClinux
bruce at hoult.org
Thu Nov 4 03:39:36 PST 2010
I don't quite understand why you have an #ifdef LINUX inside the
#ifdef BLACKFIN, which is only defined if LINUX is defined. Still, it
STACK_GRAN 0x10000000 (256 MB) seems absurdly big if this is an
embedded system. It also is I think only used if HEURISTIC1 is
defined, which you're not doing there.
Does this system have a fixed address for the bottom of the stack? If
so then just define STACKBOTTOM directly.
Read the comments relating to these definitions at the start of gcconfig.h
You may want to write a little C program that prints out the address
(in HEX) of a local variable in main(). That may well be enough to
figure out that the bottom of the stack can be found by rounding that
address up to the next 1k or 4k or 16k or something like that.
Alternatively, use a dummy and real main program as in the example
code just below there in gcconfig.h.
Getting this right -- or at least plausible -- is one of *the* main
things in porting to a new OS. (finding, starting and stopping
threads, if any and finding their stacks is the other one)
More information about the Gc