Skip to content

Commit

Permalink
EFR32 fix lock app build (project-chip#1628)
Browse files Browse the repository at this point in the history
* EFR32 fix lock app build

* Revert changes to BUILD.gn

- Since the EFR32 platform doesn't support GN build as for now, revert
  those changes
  • Loading branch information
jepenven-silabs authored and kedars committed Jul 21, 2020
1 parent b5725f3 commit bf11b41
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
9 changes: 6 additions & 3 deletions config/efr32/efr32-app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ EXTRA_SRCS += \
$(EFR32_SDK_ROOT)/util/third_party/segger/systemview/SEGGER/SEGGER_RTT.c

STD_INC_DIRS += \
$(CHIP_ROOT)/src/include/platform/EFR32 \
$(CHIP_ROOT)/src/include/platform \
$(CHIP_ROOT)/src/platform/EFR32 \
$(FREERTOS_ROOT)/Source/include \
$(FREERTOS_ROOT)/Source/portable/GCC/ARM_CM3 \
$(EFR32_SDK_ROOT) \
Expand Down Expand Up @@ -252,13 +253,15 @@ ifeq ($(EFR32FAMILY), efr32mg12)
STD_LIBS += \
$(EFR32_SDK_ROOT)/protocol/bluetooth/lib/EFR32MG12P/GCC/libbluetooth.a \
$(EFR32_SDK_ROOT)/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg12_gcc_release.a \
$(EFR32_SDK_ROOT)/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a
$(EFR32_SDK_ROOT)/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a \
$(EFR32_SDK_ROOT)/protocol/bluetooth/lib/EFR32MG12P/GCC/libmbedtls.a
else
ifeq ($(EFR32FAMILY), efr32mg21)
STD_LIBS += \
$(EFR32_SDK_ROOT)/protocol/bluetooth/lib/EFR32MG21/GCC/libbluetooth.a \
$(EFR32_SDK_ROOT)/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg21_gcc_release.a \
$(EFR32_SDK_ROOT)/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a
$(EFR32_SDK_ROOT)/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a \
$(EFR32_SDK_ROOT)/protocol/bluetooth/lib/EFR32MG21/GCC/libmbedtls.a
endif
endif

Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/efr32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ SRCS = \

INC_DIRS = \
$(PROJECT_ROOT) \
$(PROJECT_ROOT)/src/platform/EFR32/ \
$(PROJECT_ROOT)/include \
$(PROJECT_ROOT)/traits/include \
$(PROJECT_ROOT)/schema/include \
Expand Down
1 change: 1 addition & 0 deletions src/platform/EFR32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,6 @@
#ifndef CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME
#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME "Bluetooth App Task"
#endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME
#define CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 0

#endif // CHIP_DEVICE_PLATFORM_CONFIG_H
20 changes: 1 addition & 19 deletions src/platform/EFR32/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,12 @@

#include <platform/ConfigurationManager.h>
#include <platform/EFR32/EFR32Config.h>
#include <platform/EFR32/GroupKeyStoreImpl.h>
#include <platform/Profiles/security/CHIPApplicationKeys.h>

namespace chip {
namespace DeviceLayer {

using namespace ::chip::Profiles::Security::AppKeys;
using namespace ::chip::Profiles::DeviceDescription;
using namespace ::chip::DeviceLayer::Internal;

namespace {

// Singleton instance of CHIP Group Key Store.
GroupKeyStoreImpl gGroupKeyStore;

} // unnamed namespace

/** Singleton instance of the ConfigurationManager implementation object.
*/
ConfigurationManagerImpl ConfigurationManagerImpl::sInstance;
Expand All @@ -58,9 +47,7 @@ CHIP_ERROR ConfigurationManagerImpl::_Init()
err = Internal::GenericConfigurationManagerImpl<ConfigurationManagerImpl>::_Init();
SuccessOrExit(err);

// Initialize the global GroupKeyStore object.
err = gGroupKeyStore.Init();
SuccessOrExit(err);
// TODO: Initialize the global GroupKeyStore object here (#1626)

// If the fail-safe was armed when the device last shutdown, initiate a factory reset.
if (_GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed)
Expand All @@ -74,11 +61,6 @@ CHIP_ERROR ConfigurationManagerImpl::_Init()
return err;
}

::chip::Profiles::Security::AppKeys::GroupKeyStoreBase * ConfigurationManagerImpl::_GetGroupKeyStore()
{
return &gGroupKeyStore;
}

bool ConfigurationManagerImpl::_CanFactoryReset()
{
// TODO: query the application to determine if factory reset is allowed.
Expand Down
7 changes: 7 additions & 0 deletions src/platform/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,19 @@ libDeviceLayer_a_SOURCES += \
EFR32/freertos_bluetooth.c \
EFR32/gatt_db.c \
EFR32/PlatformManagerImpl.cpp \
EFR32/ConfigurationManagerImpl.cpp \
EFR32/ConnectivityManagerImpl.cpp \
EFR32/EFR32Config.cpp \
EFR32/Logging.cpp \
FreeRTOS/SystemTimeSupport.cpp \
$(NULL)

if CHIP_ENABLE_OPENTHREAD
libDeviceLayer_a_SOURCES += \
EFR32/ThreadStackManagerImpl.cpp \
$(NULL)
endif

endif # CHIP_DEVICE_LAYER_TARGET_EFR32

if CHIP_DEVICE_LAYER_TARGET_ESP32
Expand Down

0 comments on commit bf11b41

Please sign in to comment.