This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Warning[Pe223]: function "sd_flash_write" declared implicitly

Hello everyone

The following warnings and errors occurred
Warning[Pe223]: function "sd_flash_write" declared implicitly D:\ZIP\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\components\libraries\fstorage\nrf_fstorage_sd.c 208 
Warning[Pe223]: function "sd_flash_page_erase" declared implicitly D:\ZIP\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\components\libraries\fstorage\nrf_fstorage_sd.c 215
Error[Pe020]: identifier "NRF_EVT_FLASH_OPERATION_SUCCESS" is undefined D:\ZIP\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\components\libraries\fstorage\nrf_fstorage_sd.c 275
Error[Pe020]: identifier "NRF_EVT_FLASH_OPERATION_SUCCESS" is undefined D:\ZIP\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\components\libraries\fstorage\nrf_fstorage_sd.c 523
Error[Pe020]: identifier "NRF_EVT_FLASH_OPERATION_ERROR" is undefined D:\ZIP\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\components\libraries\fstorage\nrf_fstorage_sd.c 527

options -> C/C++ Compiler -> Preprocessor
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\fds
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\fifo
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\fstorage
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\hardfault
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\hardfault\nrf52
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\strerror
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\timer
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\uart
$PROJ_DIR$\..\..\..\..\..\..\..\components\libraries\util
$PROJ_DIR$\..\..\..\..\..\..\..\components\nfc\t4t_lib
$PROJ_DIR$\..\..\..\..\..\..\..\components\nfc\t4t_lib\hal_t4t
$PROJ_DIR$\..\..\..\..\..\..\..\components\softdevice\common
$PROJ_DIR$\..\..\..\..\..\..\..\components\softdevice\s132\headers
$PROJ_DIR$\..\..\..\..\..\..\..\components\softdevice\s132\headers\nrf52

I do not know why these warnings and errors occur.
 


  • Hello,

    There are two options for the file nrf_fstorage.c, that is nrf_fstorage.c and nrf_fstorage_sd.c. You should only use one of them. If you use the softdevice (BLE functionality), you should use nrf_fstorage_sd.c. If you don't use the softdevice, you should use the other one.

     

    That is, you can use both, if you need to be able to write to flash both when the softdevice is enabled and not, but if you want to use the softdevice version, you must also include nrf_soc.h. 

     

    Please look at the projects located in:

    SDK\examples\peripheral\flash_fds\pca10040\s132\...

    SDK\examples\peripheral\flash_fds\pca10040\blank\...

     

    One uses the softdevice, the other does not.

     

    Best regards,

    Edvin

Related