<div dir="ltr"><div>Yes it is on real hardware, it is a real ERC32 chipset. The board was developed by Tharsys, but the</div><div>company does not exist anymore. I'm not sure but in some way the hardware does not <br></div><div>like the
<span class="gmail-im">CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER</span> macro. <br></div><div><br></div><div>I've been using GDB like this:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>sparc-rtems5-gdb /home/inpe/rtems_exemplos/compile_test/hello_test/hello_exp.exe<br>set serial baud 19200<br>target extended-remote /dev/ttyS0<br>load<br></div><div>continue</div></blockquote><div> </div><div>When I use the
CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER macro, the board returns all<br></div><div>prints properly at the serial port.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex, 26 de jul de 2019 às 17:47, Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 26, 2019 at 3:13 PM Michel Macena <<a href="mailto:mmacena.eng@gmail.com" target="_blank">mmacena.eng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I tried the break at _Terminate, for a working program (with the #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER macro) it worked and returned <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Breakpoint 1, _Terminate (the_source=the_source@entry=INTERNAL_ERROR_CORE, </div> the_error=the_error@entry=5)<br> at /home/inpe/masters_project/src/rtems/c/src/../../cpukit/score/src/interr.c:34</blockquote><div><br></div><div>but for a program with the #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER macro it didn't work, just</div><div>returned the same message as before<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div> [Inferior 1 (Remote target) exited with code 020]<br></div></blockquote><div><br></div><div>I don't know exactly what may be causing this and don't know how can I track the issue ? any ideas ? <br></div></div></blockquote><div><br></div><div>Is this on real hardware? I re-read the first message and wondered about that. </div><div><br></div><div>But looking at the code again, it is a Classic API Init task and falling off the bottom. This should be a fatal error.</div><div><br></div><div>I suppose it is possible that the program has exited and the tick ISR is occurring after RTEMS has terminated. But it still should be hitting the _Terminate symbol.</div><div><br></div><div>--joel</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 24 de jul de 2019 às 16:33, Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019, 1:58 PM Michel Macena <<a href="mailto:mmacena.eng@gmail.com" target="_blank">mmacena.eng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks for the answer.</div><div>Sorry for my ignorance but I can't see how is this related with my problem. I didn't get the "Create bad task" problem. Also there is no fatal error with code 20.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">No RTEMS bsp makes any effort to return an exit status to the invoking environment. What you are seeing gdb print is most likely random garbage.</div><div dir="auto"><br></div><div dir="auto">If you break at _Terminate, you will see why the program exited.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 24 de jul de 2019 às 02:46, Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" rel="noreferrer" target="_blank">sebastian.huber@embedded-brains.de</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 23/07/2019 21:30, Michel Macena wrote:<br>
> Hi, I have compiled a test code for an ERC32 target board and loaded it <br>
> using gdb,<br>
> the code:<br>
> <br>
> #include <bsp.h><br>
> <br>
> #include <stdlib.h><br>
> #include <stdio.h><br>
> <br>
> rtems_task Init(<br>
> rtems_task_argument ignored<br>
> )<br>
> {<br>
> <br>
> uint16_t a=6;<br>
> printf( "Hello World Michel\n" );<br>
> printf( "numero: %d\n",a );<br>
> <br>
> <br>
> }<br>
<br>
Please have a look at the INTERNAL_ERROR_THREAD_EXITTED fatal error <br>
description:<br>
<br>
<a href="https://docs.rtems.org/branches/master/c-user/fatal_error.html#internal-error-codes" rel="noreferrer noreferrer" target="_blank">https://docs.rtems.org/branches/master/c-user/fatal_error.html#internal-error-codes</a><br>
<br>
If you use GDB, then always set a break point to _Terminate. It will hit <br>
if the application terminated.<br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" rel="noreferrer" target="_blank">sebastian.huber@embedded-brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</blockquote></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" rel="noreferrer" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></blockquote></div></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>