Skip to content

Commit 4c00f0f

Browse files
authored
Update Zigbee mode handling in pioarduino_start.txt (#337)
1 parent 3a40c78 commit 4c00f0f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

configs/pioarduino_start.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ FRAMEWORK_SDK_DIR = env.PioPlatform().get_package_dir(
3636
)
3737

3838
board_config = env.BoardConfig()
39+
build_mcu = board_config.get("build.mcu", "").lower()
3940

4041
flatten_cppdefines = env.Flatten(env['CPPDEFINES'])
4142

@@ -46,17 +47,28 @@ if "ZIGBEE_MODE_ZCZR" in flatten_cppdefines:
4647
env.Append(
4748
LIBS=[
4849
"-lesp_zb_api.zczr",
49-
"-lzboss_stack.zczr",
50+
"-lzboss_stack.zczr"
51+
]
52+
)
53+
if "ZIGBEE_MODE_ZCZR" in flatten_cppdefines and build_mcu in ["esp32c5", "esp32c6", "esp32h2"]:
54+
env.Append(
55+
LIBS=[
5056
"-lzboss_port.native"
5157
]
5258
)
53-
if "ZIGBEE_MODE_ED" in flatten_cppdefines:
59+
if "ZIGBEE_MODE_ED" in flatten_cppdefines and build_mcu in ["esp32c5", "esp32c6", "esp32h2"]:
5460
env.Append(
5561
LIBS=[
5662
"-lesp_zb_api.ed",
5763
"-lzboss_stack.ed",
5864
"-lzboss_port.native"
5965
]
6066
)
67+
if ("ZIGBEE_MODE_ZCZR" in flatten_cppdefines or "ZIGBEE_MODE_ED" in flatten_cppdefines) and build_mcu in ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c5", "esp32c6"]:
68+
env.Append(
69+
LIBS=[
70+
"-libzboss_port.remote"
71+
]
72+
)
6173

6274
env.Append(

0 commit comments

Comments
 (0)