armink / EasyFlash

Lightweight IoT device information storage solution: KV/IAP/LOG. | 轻量级物联网设备信息存储方案:参数存储、在线升级及日志存储 ,全新一代版本请移步至 https://github.com/armink/FlashDB
MIT License
2.03k stars 766 forks source link

另外请问有 关于 plugins/types/ 的范例吗。 #11

Closed qinhao4832 closed 7 years ago

qinhao4832 commented 7 years ago

另外请问有 关于 plugins/types/ 的范例吗。 我使用起来,提示

0> [Flash]Memory full! 0> [Flash]Memory full!

代码: static void test_env(void) { uint32_t i_boot_times = NULL; char *c_old_boot_times, c_new_boot_times[11] = {0}; char test_flash[20] = {"1234asdasdasd"} ; char test_flash1[20] = {"1234asdasdasd"} ;

    ef_get_char_array("test_flash",test_flash1);
    SEGGER_RTT_printf(0,"test_flash = %d \n\r", test_flash1[0]);

    for(u16 i = 0;i<20;i++)
    {
           test_flash[i] = i;
    }
    EfErrCode ERR = ef_set_char_array("test_flash", test_flash, 20);
    ef_save_env();
    SEGGER_RTT_printf(0,"ERR = %d \n\r", ERR);

    ef_print_env();

}

log显示: 0> SFUD Flash device supports 64KB block erase. Command is 0xD8. 0> [SFUD]Find a GigaDevice flash chip. Size is 2097152 bytes. 0> SFUD Flash device reset success. 0> [SFUD]SST25VF016B flash device is initialize success. 0> Flash ENV start address is 0x00000000, size is 4096 bytes. 0> Flash Calculate ENV CRC32 number is 0xFCEEFD14. 0> Flash Verify ENV CRC32 result is OK. 0> Flash EasyFlash V3.0.0 is initialize success. 0> Flash You can get the latest version on https://github.com/armink/EasyFlash . 0> [Flash]Couldn't find this ENV(test_flash)! 0> test_flash = 49 0> [Flash]Memory full! 0> [Flash]Memory full! 0> ERR = 5 0> iap_need_copy_app=0 0> iap_copy_app_size=0 0> stop_in_bootloader=0 0> device_id=1 0> boot_times=24 0> 0> ENV size: 100/2048 bytes.

armink commented 7 years ago