It is not a task, just a simple function call. I passed this call to the first thing in the void POSIX_Init() and the same happens. No matter what i pass to printf or puts it allways writes the same if this function is implemented on the autocode *.c files..<br>
<br><br>Best,<br>JM<br><br><div class="gmail_quote">On Wed, Jun 16, 2010 at 6:31 PM, Jiri Gaisler <span dir="ltr"><<a href="mailto:jiri@gaisler.com">jiri@gaisler.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Each task is allocated a certain amount of stack space - how much<br>
have you allocated to your auto-code one? You might try the RTEMS<br>
stack checker to detect a stack overflow ...<br>
<br>
Jiri.<br>
<div class="im"><br>
Joćo Rasta wrote:<br>
> How can i be sure?<br>
><br>
> The fact is that if i read the contents of all the memory space with<br>
> grmon, they are not zero.. And i have "washed" prior to load the<br>
> application.<br>
><br>
><br>
> Best,<br>
> JM<br>
><br>
> On Wed, Jun 16, 2010 at 6:11 PM, Jiri Gaisler <<a href="mailto:jiri@gaisler.com">jiri@gaisler.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:jiri@gaisler.com">jiri@gaisler.com</a>>> wrote:<br>
><br>
><br>
><br>
> Joćo Rasta wrote:<br>
> > Just an update:<br>
> ><br>
> > If i do fflush(stdout) inside the test function, the application<br>
> > crashes. Also, no matter what i put in printf, it allways prints the<br>
> > same characters, but it detects the \n correctly.. I don't see if this<br>
> > can be related to the compiler..<br>
><br>
> Sounds to me like you have blown the stack or run out of memory ...<br>
><br>
> Jiri.<br>
><br>
> ><br>
> ><br>
> > Best,<br>
> > JM<br>
> ><br>
> > On Wed, Jun 16, 2010 at 4:56 PM, Joel Sherrill<br>
> > <<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a><br>
> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>>>> wrote:<br>
> ><br>
> > On 06/16/2010 10:52 AM, Joćo Rasta wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > No, autocode requires the real-time workbench only, it is<br>
> quite<br>
> > straightforward to generate the code.<br>
> ><br>
> > I didn't fully understood your question. Anyway, i have<br>
> tried to<br>
> > compile the application with gcc and runs fine on linux so it<br>
> > should run on rtems with the apropriate modifications.<br>
> However,<br>
> > when i printf("test\n") within the library finction, it<br>
> returns<br>
> > strange characters, which doesn't happen in the function that<br>
> > calls the library function..<br>
> ><br>
> > Is it including stdio.h? I have seen some targets where if you<br>
> > don't the variable<br>
> > arguments stuff gets confused.<br>
> ><br>
> > Is the generated code warning free?<br>
> ><br>
> ><br>
> > I suspect of a compilation flag/option i may be missing on the<br>
> > library. Do you have any idea?<br>
> ><br>
> > As long as it is compiled the same as the rest of the app, it<br>
> should<br>
> > be ok.<br>
> ><br>
> > Also, i don't need any rtems primitives/configurations on the<br>
> > library functions right? I'm assuimng It is enough to have the<br>
> > rtems configuration on the "main" file.<br>
> ><br>
> > Right.<br>
> ><br>
> > Can you print from other tasks?<br>
> ><br>
> > --joel<br>
> ><br>
> ><br>
> > Best,<br>
> > JM<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On Wed, Jun 16, 2010 at 4:42 PM, Joel Sherrill<br>
> > <<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a><br>
> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a><br>
> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>>><br>
> > <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a><br>
> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>><br>
> > <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a><br>
> <mailto:<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>>>>> wrote:<br>
> ><br>
> > On 06/16/2010 10:38 AM, Joćo Rasta wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > I'm having trouble running an rtems application<br>
> that uses<br>
> > code<br>
> > generated from matlab using autocode. It all goes well<br>
> > until a<br>
> > function of this library is called: printfs return<br>
> awkward<br>
> > characters and then the application crashes.<br>
> ><br>
> > I have seen references to this before. Is this hard to<br>
> do? Are<br>
> > there instructions?<br>
> > Standard glue code, etc.<br>
> ><br>
> > 1) Is there any obvious reason to why printfs of<br>
> the autocode<br>
> > generated functions are not working properly? They are<br>
> > compiled with sparc-rtems-gcc, as the main code.<br>
> ><br>
> > 2) Are there any special flags needed to be passed<br>
> to the<br>
> > compiler in order to link other libraries? Or some<br>
> rtems<br>
> > configuration..<br>
> ><br>
> > Is there any chance it is printing floating point<br>
> numbers from a<br>
> > non-FP task?<br>
> ><br>
> ><br>
> > Best,<br>
> > JM<br>
> ><br>
> ><br>
> ><br>
> > -- Joel Sherrill, Ph.D. Director of<br>
> Research&<br>
> > Development<br>
> > joel.sherrill@OARcorp.com On-Line Applications<br>
> Research<br>
> > Ask me about RTEMS: a free RTOS Huntsville AL 35805<br>
> > Support Available (256) 722-9985<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Joel Sherrill, Ph.D. Director of Research&<br>
> Development<br>
> > joel.sherrill@OARcorp.com On-Line Applications Research<br>
> > Ask me about RTEMS: a free RTOS Huntsville AL 35805<br>
> > Support Available (256) 722-9985<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > rtems-users mailing list<br>
</div></div>> > <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a> <mailto:<a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>><br>
<div><div></div><div class="h5">> > <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
><br>
><br>
_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
</div></div></blockquote></div><br>