<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=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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";
        color:black;
        mso-fareast-language:EN-US;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;
        mso-fareast-language:FR;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1943149573;
        mso-list-type:hybrid;
        mso-list-template-ids:-524094910 1968485862 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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 bgcolor=white lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi Jiri,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for your quick reply. Indeed, I did not know that patches had to be applied to qemu, I thought it was only to the toolset.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I have downloaded the three patches and tried to directly apply them to qemu-2.9.0 without success. The patches are intended for which version of qemu?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In the end, I managed to apply them by modifying them a bit (only very minor modifications), but it does not compile. Note that qemu-2.9.0 compiles without any problem without the patches. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I will not include the whole compilation output because it is huge and it would not be useful. I will include only the first few lines of the compilation errors:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>  CC      sparc-softmmu/hw/sparc/grlib_ambapnp.o<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In file included from /usr/local/tools/qemu-2.9.0/include/exec/cpu-common.h:7:0,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/hw.h:9,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/qdev.h:4,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/sysbus.h:6,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/hw/sparc/grlib_ambapnp.c:23:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/exec/hwaddr.h:11:1: error: unknown type name ‘uint64_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> typedef uint64_t hwaddr;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In file included from /usr/local/tools/qemu-2.9.0/include/qemu/bswap.h:4:0,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/exec/cpu-common.h:10,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/hw.h:9,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/qdev.h:4,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/include/hw/sysbus.h:6,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>                 from /usr/local/tools/qemu-2.9.0/hw/sparc/grlib_ambapnp.c:23:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:94:1: error: unknown type name ‘uint8_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> typedef uint8_t flag;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:137:1: error: unknown type name ‘uint16_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> typedef uint16_t float16;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:138:1: error: unknown type name ‘uint32_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> typedef uint32_t float32;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:139:1: error: unknown type name ‘uint64_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> typedef uint64_t float64;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:151:5: error: unknown type name ‘uint64_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>     uint64_t low;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>     ^<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>/usr/local/tools/qemu-2.9.0/include/fpu/softfloat.h:152:5: error: unknown type name ‘uint16_t’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>     uint16_t high;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>     ^ <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Currently I am trying to understand the reason for this behavior. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span lang=EN-US style='color:#1F497D;mso-fareast-language:FR'>Patricia López Cueva<o:p></o:p></span></b></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D;mso-fareast-language:FR'>R&D On-Board Software Engineer<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:FR'>TAS-F Cannes<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'> Jiri Gaisler [mailto:jiri@gaisler.se] <br><b>Envoyé :</b> jeudi 24 août 2017 10:29<br><b>À :</b> LOPEZ CUEVA Patricia; users@rtems.org<br><b>Objet :</b> Re: Infinite loop on _Heap_Allocate<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Have you applied leon3 patches for qemu from <a href="https://gaisler.org/qemu">https://gaisler.org/qemu</a> ?<o:p></o:p></p><p>These are needed to boot RTEMS binaries properly.<o:p></o:p></p><p>Jiri.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 08/24/2017 10:22 AM, LOPEZ CUEVA Patricia wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello all !<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span lang=EN-US>I’ve just installed rtems-4.8 on a Redhat 7 64 bits machine. I’ve installed the release version of rtems 4.8 and the following versions of the toolset:</span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span><![endif]><span lang=EN-US>gcc 4.2.1 with newlib 1.15.0</span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span><![endif]><span lang=EN-US>binutils 2.18</span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span><![endif]><span lang=EN-US>gdb 6.8</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>The compilation and installation of the toolset and rtems run without problem except for the documentation part which I disabled.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Then I installed the rtems-4.8 examples and tried to run hello_world_c on qemu leon3 with the command “qemu-system-sparc -nographic -M leon3_generic -cpu LEON3 -kernel hello.exe -s –S”. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Neither error nor warning was present in the compilation or the execution process (nor the hello world message) and when I stop the execution it is always on the _Heap_Allocate function of cpukit/score/src/heapallocate.c file. Here is the backtrace:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>(gdb) c</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Continuing.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Program received signal SIGINT, Interrupt.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>_Heap_Allocate (the_heap=0x40013e6c, size=<value optimized out>) at ../../../../../../rtems-4.8.0/c/src/../../cpukit/score/src/heapallocate.c:57</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>57            the_block = the_block->next, ++search_count)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>(gdb) bt</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#0  _Heap_Allocate (the_heap=0x40013e6c, size=<value optimized out>) at ../../../../../../rtems-4.8.0/c/src/../../cpukit/score/src/heapallocate.c:57</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#1  0x4000b8c8 in _Workspace_Allocate_or_fatal_error (size=52) at ../../cpukit/../../../leon3/lib/include/rtems/score/wkspace.inl:37</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#2  0x4000b2e4 in _User_extensions_Handler_initialization (number_of_extensions=1, initial_extensions=0x40012cc0) at ../../../../../../rtems-4.8.0/c/src/../../cpukit/score/src/userext.c:37</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#3  0x40007860 in rtems_initialize_executive_early (configuration_table=0x40013930, cpu_table=0x40013908) at ../../../../../../rtems-4.8.0/c/src/../../cpukit/sapi/src/exinit.c:152</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#4  0x40001924 in boot_card (argc=0, argv=0x0, envp=0x0) at ../../../../../../../../rtems-4.8.0/c/src/lib/libbsp/sparc/leon3/../../shared/bootcard.c:117</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#5  0x400010dc in zerobss () at ../../../../../../../../rtems-4.8.0/c/src/lib/libbsp/sparc/leon3/../../sparc/shared/start.S:339</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#6  0x400010dc in zerobss () at ../../../../../../../../rtems-4.8.0/c/src/lib/libbsp/sparc/leon3/../../sparc/shared/start.S:339</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Backtrace stopped: previous frame identical to this frame (corrupt stack?)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>(gdb) p *the_heap</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>$17 = {free_list = {prev_size = 0, size = 0, next = 0xfffc8040, prev = 0xfffc8040}, page_size = 8, min_block_size = 16, begin = 0xfffc8040, end = 0xfffd5e50, start = 0xfffc8040, final = 0xfffd5e48, stats = {instance = 0,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>    size = 56848, free_size = 56840, min_free_size = 56840, free_blocks = 1, max_free_blocks = 1, used_blocks = 0, max_search = 0, allocs = 0, searches = 0, frees = 0, resizes = 0}}</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>It seems to be blocked on an infinite loop. I presume there has been a problem with the installation of rtems that I have not seen since this is a well proven version and it is the most basic example. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Would you have an idea of what the problem might be?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Thanks a lot in advance,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Patricia Lopez Cueva</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>users mailing list<o:p></o:p></pre><pre><a href="mailto:users@rtems.org">users@rtems.org</a><o:p></o:p></pre><pre><a href="http://lists.rtems.org/mailman/listinfo/users">http://lists.rtems.org/mailman/listinfo/users</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'><o:p> </o:p></span></p></div></div></body></html>