Skip to content

Commit 68ffca2

Browse files
committed
[ESP32]: Fixed the lighting-app external platform build
1 parent 79da246 commit 68ffca2

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

examples/platform/esp32/external_platform/ESP32_custom/BUILD.gn

+12
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import("//build_overrides/chip.gni")
1616

1717
import("${chip_root}/build/chip/buildconfig_header.gni")
18+
import("${chip_root}/src/lib/core/core.gni")
1819
import("${chip_root}/src/platform/device.gni")
1920

2021
declare_args() {
@@ -29,6 +30,7 @@ declare_args() {
2930
chip_bt_bluedroid_enabled = true
3031
chip_max_discovered_ip_addresses = 5
3132
chip_enable_route_hook = false
33+
chip_memory_alloc_mode = "default"
3234
}
3335

3436
buildconfig_header("custom_buildconfig") {
@@ -110,6 +112,16 @@ static_library("ESP32_custom") {
110112
"${chip_root}/src/platform:platform_base",
111113
]
112114

115+
if (chip_config_memory_management == "platform") {
116+
if (chip_memory_alloc_mode == "internal") {
117+
sources += [ "CHIPMem-PlatformInternal.cpp" ]
118+
} else if (chip_memory_alloc_mode == "external") {
119+
sources += [ "CHIPMem-PlatformExternal.cpp" ]
120+
} else {
121+
sources += [ "CHIPMem-PlatformDefault.cpp" ]
122+
}
123+
}
124+
113125
if (chip_enable_ota_requestor) {
114126
sources += [
115127
"OTAImageProcessorImpl.cpp",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../src/platform/ESP32/CHIPMem-PlatformDefault.cpp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../src/platform/ESP32/CHIPMem-PlatformExternal.cpp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../src/platform/ESP32/CHIPMem-PlatformInternal.cpp

0 commit comments

Comments
 (0)