EmbeddedRelated.com
Forums
Memfault Beyond the Launch

IAR v4.11 msp430

Started by franciscocantero1 July 20, 2009
franciscocantero1 wrote:
> > What compiler settings do you use? (If possible, please send me the
> > entire command line.)
>
> I just set up the compiler from the project options.
> Language C
> Allow IAR extensions
> char is unsigned
> R4 normal use
> R5 normal use
> reduce stack usage
> No optimizations
>
> > Just one final thing, what HEAP size do you use? (The default is 50
> > bytes, if I recall correctly, so malloc(70) might return 0).
>
> My stack was 350 and heap 1200. When I reduced the them both to 100,
> then i got this print
> hello hello , times 1
> insted of "francisco" i got "hello".
> And if i modify:
> uprintf(PrintTo_Buf,"how u doing %s, times %d\r\n","francisco",i);
> i get:
> how u doing how u doing , times 1
>
> but at least the integer is printing properly

Strange, it seems to be working here...

If you like you can send me the list file, so that I can compare
instruction for instruction what happened.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

Beginning Microcontrollers with the MSP430

Hello
I was on holidays,
Thank you very much for your help.
I discovered that the code works.

> > I just set up the compiler from the project options.
> > Language C
> > Allow IAR extensions
> > char is unsigned
> > R4 normal use
> > R5 normal use
> > reduce stack usage
> > No optimizations
There were optimizations at the project options, it was set for speed, once i removed the optimizations the code start working.
Thanks Anders.

Francisco

Hello,

I forgot to add something.
The uprintf function wont work when it is on its own (in uprintf.c file) I had to move the function inside the code (where i have the specific function to write the characters to port o to buffer) and then is when it works.
If the uprintf is on its own is when it doesnt allocate the va_list.

Thanks

--- In m..., "franciscocantero1" wrote:
>
> Hello
> I was on holidays,
> Thank you very much for your help.
> I discovered that the code works.
>
> > > I just set up the compiler from the project options.
> > > Language C
> > > Allow IAR extensions
> > > char is unsigned
> > > R4 normal use
> > > R5 normal use
> > > reduce stack usage
> > > No optimizations
> There were optimizations at the project options, it was set for speed, once i removed the optimizations the code start working.
> Thanks Anders.
>
> Francisco
>

Memfault Beyond the Launch