Storing to flash storage

Hi, 

We're working on the nrf52833 chipset and were wondering how to add more data to the flash storage. I've traced the calls of load_settings() in the main and where fcb_init() is called in bt_enable() but it seems to just know where flash data is. There's no struct or file that actually has data that I can manipulate / add to. Ideally, we would like to be able to see where the bluetooth configuration data is in the flash. Any pointers to the right direction or advice would be appreciated.

Thanks,

Spencer

  • Hi,

    I'm using Segger Embedded Studio. Sure, here is the error log. It's quite long so if you want anything more specific let me know! Thanks.



    app/libapp.a(NVSAbstraction.o): in function `NVSAbstraction::testing()':
    undefined reference to `nvs_init'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:92: undefined reference to `nvs_read'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:100: undefined reference to `nvs_write'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:104: undefined reference to `nvs_read'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:106: undefined reference to `nvs_write'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:116: undefined reference to `nvs_read_hist'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:126: undefined reference to `nvs_write'
    c:/users/e0645950/documents/otherbranches/champ2_central_uc_fw/nordicsdk/nrf_connect_sdk/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\E0645950\Documents\OtherBranches\champ2_central_uc_fw\NordicSDK\NRF_Connect_SDK\nrfConnectprj\champ_light_build_nrf52833/../../../../CHAMPSourceCode/PIC_SDK_AbstractionLayer/HardwareAbstraction/NVSAbstraction.cpp:135: undefined reference to `nvs_write'
    ld returned 1 exit status
    Build failed

    *edited to make shorter

  • Hi Spencer

    How does your prj.conf look?

    Regards,
    Sigurd Hellesvik

  • Which one? My system finds a bunch when I type it in. Anything in particular I should be looking for inside of it?

  • Hi Spencer,

    nRF Connect SDK projects are set up in a specific way. See the Zephyr Hello World sample for how it looks:

    Your main file will be located in a "src/" folder. The prj.conf I refer to is the file located in the same folder as "src".

    To learn more about the basics of nRF Connect SDK, see the nRF Connect SDK Tutorial series.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Yes I did find it. I'll post the general configuration settings inside. 

    CONFIG_NCS_SAMPLES_DEFAULTS=y

    # General configuration
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_FCB=y
    CONFIG_SETTINGS=y
    CONFIG_HWINFO=y
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y

    CONFIG_DK_LIBRARY=y
    CONFIG_BT_MESH_DK_PROV=y

    CONFIG_PWM=y

    Thanks,

    Spencer

Related