<?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>Kinetis Software Development Kit中的主题 Re: KSDK MMCAU cau_api.h</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404541#M1630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your feedback.&lt;/P&gt;&lt;P&gt;I reproduced to SW Development Team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Iva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2015 12:02:07 GMT</pubDate>
    <dc:creator>ivadorazinova</dc:creator>
    <dc:date>2015-09-24T12:02:07Z</dc:date>
    <item>
      <title>KSDK MMCAU cau_api.h</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404540#M1629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found cau_api.h in my KSDK 1.2.0 directory.&amp;nbsp; Here's the comments at the top of the file.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt; *&amp;nbsp; CAU Header File&lt;/P&gt;&lt;P&gt; *&amp;nbsp; Works with library cau_lib.a and lib_mmcau*.a&lt;/P&gt;&lt;P&gt; *&amp;nbsp; Define FREESCALE_CAU if CAU coprocessor is used --Register parameter passing is assumed&lt;/P&gt;&lt;P&gt; *&amp;nbsp; Define FREESCALE_MMCAU if mmCAU coprocessor is used --EABI for Kinetis ARM Cortex-Mx&lt;/P&gt;&lt;P&gt; *&amp;nbsp; 12/19/2013&lt;/P&gt;&lt;P&gt; */&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I #define FREESCALE_MMCAU (as specified in section 3.2, page 6 of "ColdFire/ColdFire+ CAU and Kinetis mmCAU Software Libary User Guide" Rev 2.3) and #include "cau_api.h" in a K64F test project (I also added the path to my compiler includes and the library to my linker).&amp;nbsp; I created an unsigned char md5_state[15] variable in main(), and called cau_md5_initialize_output(md5_state).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, using KDS 3.0.0, I hit Build Project.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I sat here dumbfounded, staring at an error message telling me that I have an "#if with no expression."&amp;nbsp; Of course it's the very first non-comment line in cau_api.h, which reads. . .&lt;/P&gt;&lt;P&gt;#if FREESCALE_MMCAU&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to change this to #ifdef FREESCALE_MMCAU for the project to compile.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By itself, it wasn't enough to compel me to write this rant, I mean post.&amp;nbsp; I was irritated that I found yet another library/example/tutorial that doesn't work.&amp;nbsp; But, I understand that KDS/KSDK isn't a trivial suite of tools.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was when I looked at the description of the next function I was interested in, cau_md5_hash(), and noticed a discrepancy in the size of the required md_state variable.&amp;nbsp; cau_md5_initialize_output() calls for 120 bits (notice I used a 15 byte array earlier).&amp;nbsp; cau_md5_hash() calls for 128 bits.&amp;nbsp; The other two md5 functions, and Google, confirms that I should have declared a 16 byte array of storage.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THAT's when I had enough to post this message.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To whomever maintains this library, please address these issues before the next release.&amp;nbsp; Hopefully it will save someone else some grief.&lt;/P&gt;&lt;P&gt;- Audi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 16:37:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404540#M1629</guid>
      <dc:creator>audi_mcavoy</dc:creator>
      <dc:date>2015-09-23T16:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK MMCAU cau_api.h</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404541#M1630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Audi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your feedback.&lt;/P&gt;&lt;P&gt;I reproduced to SW Development Team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Iva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 12:02:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404541#M1630</guid>
      <dc:creator>ivadorazinova</dc:creator>
      <dc:date>2015-09-24T12:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK MMCAU cau_api.h</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404542#M1631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Audi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: #303030;"&gt;The comment in cau_api.h is wrong, cau_md5_initialize_output() needs 16 bytes. It will be fixed for SDK 2.0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: #303030;"&gt;The same bug is in &lt;SPAN style="color: #2873ee;"&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf"&gt;&lt;SPAN style="color: #2873ee;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf" target="test_blank"&gt;http://cache.freescale.com/files/32bit/doc/user_guide/CAUAPIUG.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;The documentation is wrong, but the AN4307SW example is correctly using 16 bytes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Iva &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 08:22:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-MMCAU-cau-api-h/m-p/404542#M1631</guid>
      <dc:creator>ivadorazinova</dc:creator>
      <dc:date>2015-09-25T08:22:51Z</dc:date>
    </item>
  </channel>
</rss>

