nvs_flash: make nvs_flash_init usable for Linux target

Since the partition API is now supported for Linux target builds,
this function can now be used.
This commit is contained in:
Ivan Grokhotkov 2022-08-15 23:27:26 +02:00
parent bfb6f31872
commit 02661081be
No known key found for this signature in database
GPG Key ID: 1E050E141B280628
2 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ extern "C" esp_err_t nvs_flash_init_partition_ptr(const esp_partition_t *partiti
return init_res;
}
#ifndef LINUX_TARGET
#ifndef LINUX_HOST_LEGACY_TEST
extern "C" esp_err_t nvs_flash_init_partition(const char *part_name)
{
esp_err_t lock_result = Lock::init();
@ -239,7 +239,7 @@ extern "C" esp_err_t nvs_flash_erase(void)
{
return nvs_flash_erase_partition(NVS_DEFAULT_PART_NAME);
}
#endif // ! LINUX_TARGET
#endif // LINUX_HOST_LEGACY_TEST
extern "C" esp_err_t nvs_flash_deinit_partition(const char* partition_name)
{

View File

@ -39,8 +39,8 @@ COMPILER := gcc
endif
CPPFLAGS += -I../private_include -I../include -I../src -I../../esp_rom/include -I../../esp_rom/include/linux -I../../log/include -I./ -I../../esp_common/include -I../../esp32/include -I ../../mbedtls/mbedtls/include -I ../../spi_flash/include -I ../../hal/include -I ../../xtensa/include -I ../../../tools/catch -fprofile-arcs -ftest-coverage -g2 -ggdb
CFLAGS += -fprofile-arcs -ftest-coverage -DLINUX_TARGET
CXXFLAGS += -std=c++11 -Wall -Werror -DLINUX_TARGET
CFLAGS += -fprofile-arcs -ftest-coverage -DLINUX_TARGET -DLINUX_HOST_LEGACY_TEST
CXXFLAGS += -std=c++11 -Wall -Werror -DLINUX_TARGET -DLINUX_HOST_LEGACY_TEST
LDFLAGS += -lstdc++ -Wall -fprofile-arcs -ftest-coverage
ifeq ($(COMPILER),clang)