Topics

Error in NRF SoC flash memory compilation #nrf52840


giriprasad@...
 

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;