Skip to content

Commit 0e86f3f

Browse files
wy-hhrestyled-commitsandy31415
authored
[bouffalo lab] Add pbuf_ram support for lwip application and add bouffalo sdk submodule (#3)
* [Bouffalo Lab] Add a script to demonstrate mfd partition generation (project-chip#35192) * [Bouffalo Lab] Add a script to demonstrate mfd partition generation * fix restyle * fix restyle * fix lint code and spell * fix lint code and spell * revert changes on Makefile of doc * [bouffalo lab] fix crash issues in route hook and rpc uart driver mod… (project-chip#36944) * [bouffalo lab] fix crash issues in route hook and rpc uart driver modules * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io> * [bouffalo lab] add bl616 lighting example with Wi-Fi and Thread suppo… (project-chip#36954) * [bouffalo lab] add bl616 lighting example with Wi-Fi and Thread supported * Restyled by gn --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Andrei Litvin <andy314@gmail.com> * [bouffalo lab] add bl704l thread sed, low power, support on contact s… (project-chip#36953) * [bouffalo lab] add bl704l thread sed, low power, support on contact sensor example * update zap file * [bouffalo lab] Update Bouffalo Lab platform documents (project-chip#37067) * [bouffalo lab] Update bouffalo lab documents for contact sensor and new platform bl616 * Restyled by prettier-markdown * fix document references * Restyled by prettier-markdown --------- Co-authored-by: Restyled.io <commits@restyled.io> * change contact sensor zap to version 103 * add pbuf ram support on matter --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent f114123 commit 0e86f3f

File tree

9 files changed

+1056
-2
lines changed

9 files changed

+1056
-2
lines changed

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,8 @@
345345
path = third_party/re2/src
346346
url = https://github.com/google/re2.git
347347
platforms = linux,darwin
348+
[submodule "third_party/bouffalolab/bouffalo_sdk"]
349+
path = third_party/bouffalolab/bouffalo_sdk
350+
url = git@github.com:bouffalolab/bouffalo_sdk_private.git
351+
branch = master
352+
platforms = bouffalo_sdk

scripts/build/build/targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ def BuildBouffalolabTarget():
731731
target.AppendModifier('mot', use_matter_openthread=True).OnlyIfRe('-(thread)')
732732
target.AppendModifier('memmonitor', enable_heap_monitoring=True)
733733
target.AppendModifier('coredump', enable_debug_coredump=True)
734+
target.AppendModifier('pbuf-pool', enable_lwip_pbuf_ram=False).OnlyIfRe('-(bl602dk)')
734735

735736
return target
736737

scripts/build/builders/bouffalolab.py

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def __init__(self,
104104
enable_littlefs: bool = False,
105105
enable_pds: bool = False,
106106
enable_debug_coredump: bool = False,
107+
enable_lwip_pbuf_ram: bool = True
107108
):
108109

109110
if 'BL602' == module_type:
@@ -250,6 +251,9 @@ def __init__(self,
250251

251252
self.argsOpt.append(f"chip_generate_link_map_file=true")
252253

254+
if enable_lwip_pbuf_ram:
255+
self.argsOpt.append(f"enable_lwip_pbuf_ram=true")
256+
253257
try:
254258
self.argsOpt.append('bouffalolab_sdk_root="%s"' % os.environ['BOUFFALOLAB_SDK_ROOT'])
255259
except KeyError as err:

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed}
22
asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher,refrigerator}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio]
33
android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller,kotlin-matter-controller,virtual-device-app}[-no-debug]
4-
bouffalolab-{bl602dk,bl616dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602-iot-matter-v1,xt-zb6-devkit}-{light,contact-sensor}-{ethernet,wifi,thread,thread-ftd,thread-mtd}-{easyflash,littlefs}[-shell][-mfd][-rotating_device_id][-rpc][-cdc][-mot][-memmonitor][-coredump]
4+
bouffalolab-{bl602dk,bl616dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602-iot-matter-v1,xt-zb6-devkit}-{light,contact-sensor}-{ethernet,wifi,thread,thread-ftd,thread-mtd}-{easyflash,littlefs}[-shell][-mfd][-rotating_device_id][-rpc][-cdc][-mot][-memmonitor][-coredump][-pbuf-pool]
55
cc32xx-{lock,air-purifier}
66
ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd]
77
cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat}

scripts/checkout_submodules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
'ameba',
2929
'android',
3030
'asr',
31-
'bl602',
3231
'bouffalolab',
3332
'cc13xx_26xx',
3433
'cc32xx',
@@ -51,6 +50,7 @@
5150
'genio',
5251
'openiotsdk',
5352
'silabs_docker',
53+
'bouffalo_sdk'
5454
])
5555

5656
Module = namedtuple('Module', 'name path platforms recursive')

src/system/SystemPacketBuffer.h

+2
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ class DLL_EXPORT PacketBuffer : private pbuf
172172
return kMaxSizeWithoutReserve;
173173
#elif CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP
174174
return this->alloc_size;
175+
#elif CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM
176+
return LWIP_MEM_ALIGN_SIZE(memp_sizes[this->pool]) - kStructureSize;
175177
#elif CHIP_SYSTEM_PACKETBUFFER_FROM_LWIP_CUSTOM_POOL
176178
// Temporary workaround for custom pbufs by assuming size to be PBUF_POOL_BUFSIZE
177179
if (this->flags & PBUF_FLAG_IS_CUSTOM)

third_party/bouffalolab/bouffalo_sdk

Submodule bouffalo_sdk added at 42f58bf

third_party/bouffalolab/patches/lwip/lwippools.h

Whitespace-only changes.

0 commit comments

Comments
 (0)