program gets stuck when .bin > 28KB

OP (Company: NA) #1627753
Rate this post
• ▲ useful
▼ not useful
hi,
Iam using gcc 4.1.0 to compile code for a ARM922T.
my code runs from the internal 64KB SRAM.
when i run some functions it gets stuck or behaves unexpectedly when the 
.bin file gets larger than ~28KB.
curiously, its the functions in the .o files that i added last that gets 
stuck. The functions in the .o which were added first, work without 
getting stuck.

what are the possible causes?

thanks.
OP (Company: NA)
Rate this post
• ▲ useful
▼ not useful
Yes! there are quite a bit of variables.

but i dont think that it is a stack overflow because,
i dont have to call several nested functions to make the code get stuck.
a particular function will get stuck if the .bin >~28KB and if the .o 
file it contains in is added at the end.

e.g.
......
OBJECTS+= Test1.o
OBJECTS+= Test2.o
OBJECTS+= Test3.o
OBJECTS+= Test4.o
.......

if I run a function "func4()" from Test4.o, it gets stuck.
but if I add that file sooner,
i.e.
......
OBJECTS+= Test1.o
OBJECTS+= Test4.o
OBJECTS+= Test2.o
OBJECTS+= Test3.o
.......
now "func4()" will run, but "func3()" from Test3.o will get stuck.

hope this will make my problem clear.

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.