<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="DE">Hello, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal">To explain my problem, here are my system details:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">RTEMS Version: 5.0.0<o:p></o:p></p>
<p class="MsoNormal">RTEMS tools: 7.4.1<o:p></o:p></p>
<p class="MsoNormal">BSP: Custom BSP adopted from Xilinx_zynq<o:p></o:p></p>
<p class="MsoNormal">Build tool: scons<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">While compiling I get the following error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In file included from /tools/modulesystem/tools/rtems/rtems/bsps/5/arm/arm-rtems5/xilinx_zynq_scosa/lib/include/rtems/confdefs.h:320:0,<br>
from *<b>/examples/rtems_hello/init.c:70:<br>
</b>*<b>/lib/include/rtems/imfs.h: In function '_IMFS_get_time':<br>
</b>*/lib/include/rtems/imfs.h:344:18: error: storage size of 'now' isn't known<br>
struct bintime now;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The sample application has been taken from rtems website and looks like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#include <rtems.h><br>
#include <stdio.h><br>
#include <stdlib.h><br>
#include <sys/unistd.h><br>
<br>
rtems_task user_application(rtems_task_argument argument);<br>
rtems_task Init(rtems_task_argument ignored);<br>
<br>
rtems_task Init(<br>
rtems_task_argument ignored<br>
)<br>
{<br>
rtems_id tid;<br>
rtems_status_code status;<br>
rtems_name name;<br>
<br>
name = rtems_build_name( 'A', 'P', 'P', '1' );<br>
<br>
status = rtems_task_create(<br>
name, 1, RTEMS_MINIMUM_STACK_SIZE,<br>
RTEMS_NO_PREEMPT, RTEMS_FLOATING_POINT, &tid<br>
);<br>
if ( status != RTEMS_SUCCESSFUL ) {<br>
printf( "rtems_task_create failed with status of %d.\n", status );<br>
exit( 1 );<br>
}<br>
<br>
status = rtems_task_start( tid, user_application, 0 );<br>
if ( status != RTEMS_SUCCESSFUL ) {<br>
printf( "rtems_task_start failed with status of %d.\n", status );<br>
exit( 1 );<br>
}<br>
<br>
status = rtems_task_delete( tid ); /* should not return */<br>
<br>
printf( "rtems_task_delete returned with status of %d.\n", status );<br>
exit( 1 );<br>
}<br>
<br>
rtems_task user_application(rtems_task_argument argument)<br>
{<br>
/* application specific initialization goes here */<br>
while ( 1 ) { /* infinite loop */<br>
/* APPLICATION CODE GOES HERE<br>
*<br>
* This code will typically include at least one<br>
* directive which causes the calling task to<br>
* give up the processor.<br>
*/<br>
printf("Hello\n");<br>
sleep(1);<br>
}<br>
}<br>
<br>
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER<br>
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER<br>
/* The Clock Driver supplies the clock tick. */<br>
//#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br>
#define CONFIGURE_MAXIMUM_TASKS 1<br>
#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'E', 'X', 'A', 'M' )<br>
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
#define CONFIGURE_INIT<o:p></o:p></p>
<p class="MsoNormal">#include <rtems/confdefs.h><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have been successful in building the RTEMS sample applications (ticker, hello-world). I am using scons to build the application. I am not using any CFLAGS for –std. I tried with –std=c99 and –std=c11 but I get the same error. However,
if I use –std=pedantic, then compilation succeeds but fails while running with the error: rtems_task_create failed with status of 5.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Similar issue I have found at the following link: <a href="https://lists.rtems.org/pipermail/devel/2018-November/023693.html">https://lists.rtems.org/pipermail/devel/2018-November/023693.html</a> but doesn’t help unfortunately.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Vishav<o:p></o:p></p>
</div>
</body>
</html>