Problem with the stack on m68k

Majka, Matthew (NM75)
Wed May 17 11:19:00 GMT 2000

> -----Original Message-----
> From: Noah Aklilu [ ]
> Sent: Wednesday, May 17, 2000 11:47 AM
> To:
> Subject: Problem with the stack on m68k
> Hi
> 	I writing code for a 68306 board using m68k cross compiler, 
> and I was getting bus and address errors from my code, not always 
> in the same location.  It seems to be related to problems with the 
> stack, I have noticed that the compiler allocates portions of the
> stack using "link" (e.g. link a6,#$FFEF) to create space for 
> variables.  How does one control the maximum stack size?
> Some of the errors seem to be related to corrupt files being
> read back from the variable spaced allocated with "link".  I
> have tested my memory to make sure it is fine.
> Having written a few perl programs lately, my main function
> ended up being a little large (about 200 lines).  As a result 
> it seems 
> to allocate a large chunk of (about 0xffff) of the stack as variable 
> space. I have another
> program that I tested and it is much smaller (about 20 lines)
> and it runs to finish without any problems.

The m68k stack grows from high memory to low memory.
You control the size of the stack by allocating as much
space as you want and putting the high address in the

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list