<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial>Hi</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial>Are you sure you are using the correct baud rate to comunicate
with the board (using GRMON)?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial>Did you try different baud rates?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=676125511-17062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial><SPAN
class=676125511-17062010>Regards</SPAN></FONT></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>Manuel Coutinho<BR>Software Engineer - Space<BR><BR>EDISOFT,
S.A.<BR>Rua Quinta dos Medronheiros - Lazarim<BR>Apartado 382 Monte de
Caparica<BR>2826-801 Caparica
Portugal<BR>Tel: (+351) 212 945
900<BR>Fax: (+351) 212 945
999<BR><BR></FONT></P>
<DIV> </DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> rtems-users-bounces@rtems.org
[mailto:rtems-users-bounces@rtems.org] <B>On Behalf Of </B>João
Rasta<BR><B>Sent:</B> Thursday, June 17, 2010 10:33 AM<BR><B>To:</B> Ralf
Corsepius<BR><B>Cc:</B> rtems-users@rtems.com<BR><B>Subject:</B> Re: rtems
with matlab autocode problems<BR></FONT><BR></DIV>
<DIV></DIV>Well, i'm using regular printf. I would not point to the encoding
since it allways prints the same thing no matter what i pass to
printf().<BR><BR>I removed the 3 optimization in the gcc flags and removed the
other ones and the same problem occurs. If i remove the printf the application
exits on the following instruction<BR><BR>IU in error mode (tt =
0x2b)<BR> 4000ca8c d127bfec st %f8, [%fp -
0x14]<BR><BR>. I'm initializing rtems with:<BR><BR>#define
CONFIGURE_INIT<BR>#define
CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<BR>#define
CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<BR><BR>#define
CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10<BR>#define
CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (300*1024)<BR><BR>#define
CONFIGURE_MAXIMUM_POSIX_THREADS
10<BR>#define CONFIGURE_MAXIMUM_POSIX_MUTEXES
10<BR>#define
CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
5<BR><BR>#define CONFIGURE_POSIX_INIT_THREAD_TABLE<BR><BR>I
think i have enough stack space. <BR>Also, if i point
CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT to a function declared on the
autocode the printfs do not work well, which does not happen if i point it to
a function declared on the main code. <BR><BR>The autocode is compiled with
sparc-rtems-gcc and a library libgnc.a is created which is then passed to the
compiler at link time with -lgnc. The library is created with<BR><BR>ar ruvs
libgnc.a *.o<BR><BR>Does it make sense that there may be a problem with the
compiled .o's of the library? If so, how can its declared functions be messing
up with memory operations and not on the main code? They use the same
compiler..<BR><BR><BR>Best,<BR>JM<BR><BR>
<DIV class=gmail_quote>On Thu, Jun 17, 2010 at 4:18 AM, Ralf Corsepius <SPAN
dir=ltr><<A
href="mailto:ralf.corsepius@rtems.org">ralf.corsepius@rtems.org</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>
<DIV></DIV>
<DIV class=h5>On 06/16/2010 07:48 PM, João Rasta wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Yes, here goes<BR><BR>// dummy printf test code<BR>int
upa(void)<BR>{<BR> int i = 0;<BR><BR> for (i=0;
i< 20; i++)<BR>
printf("B\n");<BR><BR> exit(0);<BR><BR>}<BR><BR>And the
result is:<BR><BR><BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR>
¬ÖUf<BR> ¬ÖUf<BR> ¬ÖUf<BR><BR>Program exited
normally.<BR></BLOCKQUOTE></DIV></DIV>Hmm, I am seeing "4 characters per
line" instead of "1 or 2 characters per line" as one would
expect.<BR><BR>Are you sure your code uses the right printf? 4 chars instead
of 1 could indicate using UTF8 or UTF16 encoding instead of ACSII.
<DIV class=im><BR><BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>sparc-rtems-gcc -c -O3 -g3 -ffloat-store -fPIC
-DUSE_RTMODEL -DMODEL=gnc<BR>-DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0
-DUNIX -DMT=0 -DHAVESTDI<BR>O -I.
-I../../rtwlt/matlab/simulink/include<BR>-I../../rtwlt/matlab/extern/include
-I../../rtwlt/matlab/rtw/c/src<BR>-I../../rtwlt/matlab/rtw/c/<BR>src/ext_mode/common
-I. -I..
-I../../rtwlt/matlab/rtw/c/libsrc<BR>../../rtwlt/matlab/rtw/c/src/rt_sim.c<BR></BLOCKQUOTE><BR></DIV>...
-O3 -g3 -ffloat-store -fPIC<BR>certainly leave room for speculation on
incompatibility.<BR><BR>-03 ... switches on dangerous
optimizations<BR>-ffloat-store ... could be incompatible to
rtems-gcc/newlib<BR>-fPIC ... unneeded, unused by the rtems-toolchains,
unknown<BR> side effects on rtems-gcc/newlib<BR><FONT
color=#888888><BR>Ralf<BR></FONT></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>