Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lock app example for infineon P6 board #8268

Merged
merged 11 commits into from
Aug 12, 2021
Prev Previous commit
Next Next commit
Remove warnings false check for compile
  • Loading branch information
praveenCY committed Aug 11, 2021
commit 3cbedf4dab8e9f9c809cf23ca54f8c49ecfe4905
1 change: 0 additions & 1 deletion config/p6/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ arm_toolchain("p6_lock_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lock-app/p6/args.gni")
treat_warnings_as_errors = false
}
}
12 changes: 4 additions & 8 deletions examples/lock-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ examples_plat_dir = "${chip_root}/examples/platform/p6"
declare_args() {
# Dump memory usage at link time.
chip_print_memory_usage = false
setupPinCode = 73141520

# PIN code for PASE session establishment.
setup_pin_code = 12345678
}

p6_sdk_sources("lock_app_sdk_sources") {
Expand All @@ -41,7 +43,7 @@ p6_sdk_sources("lock_app_sdk_sources") {
defines = [
"BOARD_ID=${p6_board}",
"P6_LOG_ENABLED=1",
"CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}",
]

sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ]
Expand All @@ -60,16 +62,10 @@ p6_executable("lock_app") {
"${chip_root}/examples/lock-app/lock-common",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
"${chip_root}/third_party/openthread/platforms:libopenthread-platform",
"${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils",
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
]

include_dirs += [
"include",
"${chip_root}/src/app/util",
"${chip_root}/src/app/server",
"${examples_plat_dir}",
"${p6_project_dir}/include",
]
Expand Down
3 changes: 0 additions & 3 deletions examples/lock-app/p6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
#include "AppConfig.h"
#include "AppEvent.h"
#include "ButtonHandler.h"
#include "DataModelHandler.h"
#include "LEDWidget.h"
#include "OnboardingCodesUtil.h"
#include "Server.h"
#include "qrcodegen.h"
#include <app/common/gen/attribute-id.h>
#include <app/common/gen/attribute-type.h>
Expand Down
3 changes: 1 addition & 2 deletions examples/lock-app/p6/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
#include <AppTask.h>

#include "AppConfig.h"
#include "DataModelHandler.h"
#include "Server.h"
#include "init_p6Platform.h"
#include <app/server/Server.h>

using namespace ::chip;
using namespace ::chip::Inet;
Expand Down
2 changes: 1 addition & 1 deletion src/lwip/p6/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#define LWIP_TCPIP_CORE_LOCKING 1
#define TCP_QUEUE_OOSEQ 0
#define ARP_QUEUEING (0)
#define LWIP_TCP_KEEPALIVE (1)
#define LWIP_TCP_KEEPALIVE (0)

#define LWIP_SOCKET 1
#define LWIP_NETCONN (1)
Expand Down
1 change: 0 additions & 1 deletion src/platform/P6/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ arm_platform_config = "${p6_sdk_build_root}/p6_arm.gni"
mbedtls_target = "${p6_sdk_build_root}:p6_build"

chip_device_platform = "p6"
treat_warnings_as_errors = false

lwip_platform = "p6"

Expand Down
15 changes: 14 additions & 1 deletion third_party/p6/p6_sdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,24 @@ endif
# Select softfp or hardfp floating point. Default is softfp.
VFP_SELECT=

COMMON_WARNING_FLAGS = -Wall -Werror=all \
-Wno-error=unused-function \
-Wno-error=unused-but-set-variable \
-Wno-error=unused-variable \
-Wno-error=deprecated-declarations \
-Wextra \
-Wno-unused-parameter -Wno-sign-compare \
-Wno-shadow \
-Wno-maybe-uninitialized \
-Wno-incompatible-pointer-types \
-Wno-type-limits \
-Wno-conversion

# Additional / custom C compiler flags.
#
# NOTE: Includes and defines should use the INCLUDES and DEFINES variable
# above.
CFLAGS=
CFLAGS=$(COMMON_WARNING_FLAGS)

# Additional / custom C++ compiler flags.
#
Expand Down