Problem with printf - rowkajjh - Nov 1 9:32:38 2007
Hello,
I'm using CCSTudio 3.3 and have a problem with printf. After several
printf's in my code the memory gets corrupt. This means some static
variables have random contents or mathematical functions like sin or
atan2 are giving wrong results.
After changing the printf's to puts everything is fine. But I would
like to know whats the cause.
Thanks and bye!
______________________________
Start your
Android Ice Cream Sandwich development on TI's
AM35x Sitara ARM Cortex-A8 processor today.
(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )
Re:Problem with printf - ".dorian" - Nov 2 8:07:49 2007
Heya,
I just encountered the same problem with the printf function.
I figured out that a too small heap allocation caused overflows
in the memory. So I suggest you to increase the heap size for
your application.You can change the heap size in the Build options
and then the Linker tab. Or if you are using a DSP/Bios project,
by right clicking on one of your memory definitions > properties >
create heap in this memory.
My stack size was also too small so that the program
reported an "PC: wrong instruction 0xbla" error message after
running for some time.
Viel Erfolg
dorian
______________________________
New Code Sharing Section now Live on DSPRelated.com.
Learn about the Reward
Program for Contributors here. 
(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )
RE: Re:Problem with printf - Alex John - Nov 5 7:53:32 2007
I don't think it is a heap memory problem.
Most likely it is a small vs. large memory model.
The printf provided by TI and their BIOS is compiled using the small memory
model.
Therefore, if the input string to your printf falls outside the small memory
range (eg, in a far away heap) then the printf will print some string from a
totally wrong place.This is an issue that TI should address.
To: c...@yahoogroups.comCC: r...@yahoo.deFrom: d...@redcodes.netDate: Thu, 1 Nov
2007 23:23:39 +0800Subject: [code-comp] Re:Problem with printf
Heya,I just encountered the same problem with the printf function.I figured out
that a too small heap allocation caused overflowsin the memory. So I suggest you
to increase the heap size foryour application.You can change the heap size in
the Build options and then the Linker tab. Or if you are using a DSP/Bios
project, by right clicking on one of your memory definitions > properties
>create heap in this memory.My stack size was also too small so that the
program reported an "PC: wrong instruction 0xbla" error message after
running for some time. Viel Erfolgdorian
______________________________
New Code Sharing Section now Live on DSPRelated.com.
Learn about the Reward
Program for Contributors here. 
(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )