<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 7, 2017 at 5:37 PM, Cillian O'Donnell <span dir="ltr"><<a href="mailto:cpodonnell8@gmail.com" target="_blank">cpodonnell8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When I got rid of the casts I was left with char * and couldn't find an<br>
inttype to fit it so I left the casts in.<br></blockquote><div><br></div><div>char * can be printed with %p. printk() should support that but check. </div><div>Do a simple test on Linux to see but I don't think you have to put 0x%p,</div><div>it just prints an address correctly.</div><div><br></div><div>Another approach would be to cast it to a uintptr_t and (hopefully), there</div><div>is a PRI constant for that. but %p is preferable.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 .../lib/libbsp/powerpc/<wbr>virtex5/startup/bspstart.c  | 25 +++++++++++-----------<br>
 1 file changed, 13 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/c/src/lib/libbsp/powerpc/<wbr>virtex5/startup/bspstart.c b/c/src/lib/libbsp/powerpc/<wbr>virtex5/startup/bspstart.c<br>
index 9d610e4..fef18d3 100644<br>
--- a/c/src/lib/libbsp/powerpc/<wbr>virtex5/startup/bspstart.c<br>
+++ b/c/src/lib/libbsp/powerpc/<wbr>virtex5/startup/bspstart.c<br>
@@ -69,6 +69,7 @@<br>
<br>
 #include <string.h><br>
 #include <fcntl.h><br>
+#include <inttypes.h><br>
<br>
 #define DO_DOWN_ALIGN(x,a) ((x) & ~((a)-1))<br>
<br>
@@ -227,20 +228,20 @@ void bsp_start(void)<br>
<br>
   /* Let the user know what parameters we were compiled with */<br>
   printk("                  Base/Start     End         Size\n"<br>
-         "RAM:              0x%08x              0x%x\n"<br>
-         "RTEMS:                        0x%08x\n"<br>
+         "RAM:              0x%08" PRIx32 " 0x%" PRIx32 "\n"<br>
+         "RTEMS:                        0x%08" PRIx32 "\n"<br>
          "Interrupt Stack:  0x%08x              0x%x\n"<br>
-         "Stack:            0x%08x  0x%08x  0x%x\n"<br>
-         "Workspace:        0x%08x  0x%08x\n"<br>
-         "MsgArea:          0x%08x              0x%x\n"<br>
-         "Physical RAM                  0x%08x\n",<br>
-         (uint32_t)RamBase,                               (uint32_t)RamSize,<br>
-         (uint32_t)__rtems_end,<br>
+         "Stack:            0x%08" PRIx32 "0x%08" PRIx32 "0x%" PRIx32 "\n"<br>
+         "Workspace:        0x%08" PRIx32 "0x%08" PRIx32 "\n"<br>
+         "MsgArea:          0x%08" PRIx32 "0x%" PRIx32 "\n"<br>
+         "Physical RAM                  0x%08" PRIx32 "\n",<br>
+         (uint32_t) RamBase,  (uint32_t) RamSize,<br>
+         (uint32_t) __rtems_end,<br>
          intrStackStart,                                  intrStackSize,<br>
-         (uint32_t)__stack_base, (uint32_t)_stack,        (uint32_t)StackSize,<br>
-         (uint32_t)WorkAreaBase, (uint32_t)__bsp_ram_end,<br>
-         (uint32_t)MsgAreaBase,                           (uint32_t)MsgAreaSize,<br>
-         (uint32_t)__phy_ram_end);<br>
+         (uint32_t) __stack_base, (uint32_t) _stack, (uint32_t) StackSize,<br>
+         (uint32_t) WorkAreaBase, (uint32_t) __bsp_ram_end,<br>
+         (uint32_t) MsgAreaBase, (uint32_t) MsgAreaSize,<br>
+         (uint32_t) __phy_ram_end);<br>
<br>
   /*<br>
    * Initialize RTEMS IRQ system<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div></div>