diff --git a/CMakeLists.txt b/CMakeLists.txt index d7ca86c..ff51142 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ if (BUILD_FOR_JLV135) # Настройки компиляции set(CMAKE_C_FLAGS "-Os -fdata-sections -ffunction-sections -mno-unaligned-access") set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections") +else() + # Для разработки/тестирования на обычной системе используем файловую систему + add_compile_definitions(JL_CONFIG_USE_FILE) endif() # Создание исполняемого файла diff --git a/src/jl_modbus/jl_config.c b/src/jl_modbus/jl_config.c index f4b8a8c..53269d8 100644 --- a/src/jl_modbus/jl_config.c +++ b/src/jl_modbus/jl_config.c @@ -3,7 +3,7 @@ #include #include -#ifndef JL_CONFIG_USE_FILE +#ifdef JL_CONFIG_USE_FILE static const char* jl_config_path = "./"; void jl_config_load(const char *name, void *def, size_t size)