<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: cannot print hex values LIBDEF_PRINTF_ALLOW_HEXINT in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/cannot-print-hex-values-LIBDEF-PRINTF-ALLOW-HEXINT/m-p/152893#M4128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I did to get %x to work in printf - although I don't think this is the way it was intended to be done:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added printf_tiny_IO.c to my project&lt;/P&gt;&lt;P&gt;In my project I hit alt-f7 and added the following:&lt;/P&gt;&lt;P&gt;#define LIBDEF_PRINTF_ALLOW_HEXINT 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then %x worked in printf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Renee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2009 01:22:06 GMT</pubDate>
    <dc:creator>rlstraney</dc:creator>
    <dc:date>2009-11-10T01:22:06Z</dc:date>
    <item>
      <title>cannot print hex values LIBDEF_PRINTF_ALLOW_HEXINT</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/cannot-print-hex-values-LIBDEF-PRINTF-ALLOW-HEXINT/m-p/152892#M4127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I cannot print hex values using %x.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Codewarrior 7.1 build 14&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a thread about this posted by CrasyCat.&amp;nbsp; Where CrasyCat says "Open the project" and "Activate target"&amp;nbsp; can someone please explain how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I close my project and open the mcp that is being referenced? &amp;nbsp; I tried opening a few of the mcps in that directory and hitting alt-F7 but none of them give me the&amp;nbsp; "C/C++ Preprocessor" panel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am assuming the mcp file is a new name now. &amp;nbsp; But I have no idea what &lt;SPAN style="color: #ff0000;"&gt;Activate target "2i ColdFire RegABI"&lt;/SPAN&gt; means to do. &amp;nbsp; The rest of the instructions I understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Here are the instructions that were posted by CrasyCat:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;You can activate support for display of Hexadecimal number in the following way:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Start the IDE&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Open the project {Install}\ColdFire_Support\msl\MSL_C\MSL_ColdFire\Project\MSL_C.CF.v1.word.mcp (where {Install} refers to your CodeWarrior installation directory)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Activate target "2i ColdFire RegABI"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Open the target settings dialog (press ALT+F7)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Switch to the "C/C++ Preprocessor" panel&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Add following line in there:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;#define LIBDEF_PRINTF_ALLOW_HEXINT 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Close the Target Settings dialog pressing OK&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - Press the Make button to rebuild the library&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; - rebuild your project.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;printf should support %X from now on.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;P&gt;I was hoping that I just needed to open my project and go to the"C/C++ Preprocessor" panel and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;add following line in there:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;#define LIBDEF_PRINTF_ALLOW_HEXINT 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;But that didn't work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;Renee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2009 04:56:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/cannot-print-hex-values-LIBDEF-PRINTF-ALLOW-HEXINT/m-p/152892#M4127</guid>
      <dc:creator>rlstraney</dc:creator>
      <dc:date>2009-11-09T04:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: cannot print hex values LIBDEF_PRINTF_ALLOW_HEXINT</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/cannot-print-hex-values-LIBDEF-PRINTF-ALLOW-HEXINT/m-p/152893#M4128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I did to get %x to work in printf - although I don't think this is the way it was intended to be done:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added printf_tiny_IO.c to my project&lt;/P&gt;&lt;P&gt;In my project I hit alt-f7 and added the following:&lt;/P&gt;&lt;P&gt;#define LIBDEF_PRINTF_ALLOW_HEXINT 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then %x worked in printf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Renee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 01:22:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/cannot-print-hex-values-LIBDEF-PRINTF-ALLOW-HEXINT/m-p/152893#M4128</guid>
      <dc:creator>rlstraney</dc:creator>
      <dc:date>2009-11-10T01:22:06Z</dc:date>
    </item>
  </channel>
</rss>

