<?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 _io_dev_install compile errors in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201010#M4507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use an external SPI flash to store my web page data on a TWRMCF52259.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the SPI FLASH working using the BSP's spi0&amp;nbsp; and MQX fopen ("spi0:", NULL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can read, write, and erase the flash using this method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying now to install an io driver so I can layer on part manager and MFS and I am getting an error when I build with the _io_dev_install&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code that gets the error:&lt;/P&gt;&lt;P&gt;_mqx_uint _io_webflash_install(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;char_ptr identifier)&lt;BR /&gt;{&lt;BR /&gt;_mqx_uint&amp;nbsp;&amp;nbsp; &amp;nbsp;result;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;result = _io_dev_install(identifier,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_open,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_close,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_read,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_write,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_ioctl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return result;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is the Error I am getting, and have not been able to solve it with anything I have tried.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;illegal implicit conversion from '__regabi long (struct mqx_file *, unsigned&lt;BR /&gt;&amp;gt;char *, long)' to&lt;BR /&gt;&amp;gt;'__regabi long (*)(struct mqx_file *, char *, long)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyony have any ideas?&lt;/P&gt;&lt;P&gt;Thanks for reading&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2011 22:09:06 GMT</pubDate>
    <dc:creator>JKadin</dc:creator>
    <dc:date>2011-04-26T22:09:06Z</dc:date>
    <item>
      <title>_io_dev_install compile errors</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201010#M4507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use an external SPI flash to store my web page data on a TWRMCF52259.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the SPI FLASH working using the BSP's spi0&amp;nbsp; and MQX fopen ("spi0:", NULL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can read, write, and erase the flash using this method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying now to install an io driver so I can layer on part manager and MFS and I am getting an error when I build with the _io_dev_install&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code that gets the error:&lt;/P&gt;&lt;P&gt;_mqx_uint _io_webflash_install(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;char_ptr identifier)&lt;BR /&gt;{&lt;BR /&gt;_mqx_uint&amp;nbsp;&amp;nbsp; &amp;nbsp;result;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;result = _io_dev_install(identifier,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_open,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_close,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_read,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_write,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_io_webflash_ioctl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return result;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is the Error I am getting, and have not been able to solve it with anything I have tried.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;illegal implicit conversion from '__regabi long (struct mqx_file *, unsigned&lt;BR /&gt;&amp;gt;char *, long)' to&lt;BR /&gt;&amp;gt;'__regabi long (*)(struct mqx_file *, char *, long)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyony have any ideas?&lt;/P&gt;&lt;P&gt;Thanks for reading&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 22:09:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201010#M4507</guid>
      <dc:creator>JKadin</dc:creator>
      <dc:date>2011-04-26T22:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: _io_dev_install compile errors</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201011#M4508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo JKadin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check function prototypes of your&amp;nbsp;&amp;nbsp;&amp;nbsp;_io_webflash_read and &amp;nbsp;&amp;nbsp;_io_webflash_write functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _mqx_int &amp;nbsp;_io_webflash_read(MQX_FILE_PTR, &amp;nbsp;char_ptr, &amp;nbsp;_mqx_int)&lt;/P&gt;&lt;DIV&gt;Second parameter is char_ptr (char *) and you probably have&amp;nbsp;uchar_ptr (unsigned char *)&lt;/DIV&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>Wed, 27 Apr 2011 18:39:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201011#M4508</guid>
      <dc:creator>petr_uhlir</dc:creator>
      <dc:date>2011-04-27T18:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: _io_dev_install compile errors</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201012#M4509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;You were exactly right.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;For anyone else looking at this and if I need it again.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;memory_write_data was defined as:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;uint_32 memory_write_data (MQX_FILE_PTR spifd, uint_32 addr, uint_32 size, uchar_ptr data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;so&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;__io_webflash_write was declared as:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_mqx_int __io_webflash_write&lt;BR /&gt;(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;FILE_PTR&amp;nbsp;&amp;nbsp; &amp;nbsp;fd_ptr,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uchar_ptr&amp;nbsp;&amp;nbsp; &amp;nbsp;data_ptr,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_mqx_int&amp;nbsp;&amp;nbsp; &amp;nbsp;num&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;)&lt;BR /&gt;{&lt;BR /&gt;IO_DEVICE_STRUCT_PTR&amp;nbsp; io_dev_ptr = fd_ptr-&amp;gt;DEV_PTR;&lt;BR /&gt;WEB_FLASH_STRUCT_PTR&amp;nbsp; handle_ptr = (WEB_FLASH_STRUCT_PTR)io_dev_ptr-&amp;gt;DRIVER_INIT_PTR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;_mqx_uint&amp;nbsp;&amp;nbsp; &amp;nbsp;result;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint_32&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;w_addr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;w_addr = handle_ptr-&amp;gt;addr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;result = memory_write_data (fd_ptr, w_addr, (uint_32)num, data_ptr);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(result == num)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return(MQX_OK);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return(IO_ERROR);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;to be clear data_ptr was declared as uchar_ptr because declaring it as a&amp;nbsp; char_ptr caused an error in the call to memory_write_data().&amp;nbsp; When data_ptr was declared as uchar_ptr the error at memory_write_data went away, and since _io_dev_install was not written yet, that error did not appear ... yet&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;The way to fix this is to declare data_ptr as a char_ptr to satisfy _io_dev_install() and cast data_ptr to a uchar_ptr in the call to memory_write_data() like so:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;memory_write_data (fd_ptr, w_addr, (uint_32)num, (uchar_ptr)data_ptr)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:17:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-dev-install-compile-errors/m-p/201012#M4509</guid>
      <dc:creator>JKadin</dc:creator>
      <dc:date>2011-04-27T19:17:40Z</dc:date>
    </item>
  </channel>
</rss>

