Re: Error in NRF SoC flash memory compilation #nrf52840


Marc Herbert
 

Hi,

 

Are these messages from a C++ compiler? If yes trying casting.

 

Marc

 

From: <users@...> on behalf of "giriprasad@..." <giriprasad@...>
Date: Wednesday, 4 September 2019 at 01:59
To: "users@..." <users@...>
Subject: [Zephyr-users] Error in NRF SoC flash memory compilation #nrf52840

 

When Iam trying to include flash.h file in my application noticed below compilation error.

Can you help me to resolve the issue

 

ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_read(device*, off_t, void*, size_t)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:104:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_write(device*, off_t, const void*, size_t)':
EPHYR/zephyrproject/zephyr/include/drivers/flash.h:128:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_erase(device*, off_t, size_t)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:159:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_write_protection_set(device*, bool)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:185:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'size_t z_impl_flash_get_write_block_size(device*)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:272:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;

Join users@lists.zephyrproject.org to automatically receive all group messages.