@@ -20,6 +20,7 @@ import("${chip_root}/src/lib/lib.gni")
20
20
declare_args () {
21
21
bl_iot_sdk_root = " ${ chip_root } /third_party/bouffalolab/repo"
22
22
23
+ enable_lwip_pbuf_ram = false
23
24
enable_debug_coredump = false
24
25
coredump_binary_id = 0
25
26
}
@@ -63,6 +64,11 @@ template("bl_iot_sdk") {
63
64
" -include" ,
64
65
rebase_path (" ${ invoker.freertos_config } " , root_build_dir ),
65
66
]
67
+
68
+ if (defined (invoker .enable_lwip_pbuf_ram ) &&
69
+ invoker .enable_lwip_pbuf_ram ) {
70
+ defines += [ " CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
71
+ }
66
72
}
67
73
68
74
source_set (" ${ sdk_target_name } _soc" ) {
@@ -906,6 +912,11 @@ template("bl_iot_sdk") {
906
912
" ${ bl_iot_sdk_root } /components/network/lwip_dhcpd" ,
907
913
]
908
914
915
+ if (defined (invoker .enable_lwip_pbuf_ram ) &&
916
+ invoker .enable_lwip_pbuf_ram ) {
917
+ include_dirs += [ " ${ bouffalolab_iot_sdk_build_root } /patches/lwip" ]
918
+ }
919
+
909
920
defines = [ " LWIP_IPV6=1" ]
910
921
}
911
922
@@ -927,7 +938,6 @@ template("bl_iot_sdk") {
927
938
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/inet_chksum.c" ,
928
939
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/init.c" ,
929
940
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/ip.c" ,
930
- " ${ bl_iot_sdk_root } /components/network/lwip/src/core/mem.c" ,
931
941
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/memp.c" ,
932
942
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/netif.c" ,
933
943
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/pbuf.c" ,
@@ -941,6 +951,14 @@ template("bl_iot_sdk") {
941
951
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/udp.c" ,
942
952
]
943
953
954
+ if (defined (invoker .enable_lwip_pbuf_ram ) &&
955
+ invoker .enable_lwip_pbuf_ram ) {
956
+ sources += [ " ${ bouffalolab_iot_sdk_build_root } /patches/lwip/mem.c" ]
957
+ }
958
+ else {
959
+ sources += [ " ${ bl_iot_sdk_root } /components/network/lwip/src/core/mem.c" ]
960
+ }
961
+
944
962
sources += [
945
963
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/ipv4/autoip.c" ,
946
964
" ${ bl_iot_sdk_root } /components/network/lwip/src/core/ipv4/dhcp.c" ,
0 commit comments