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

[bouffalo lab] Add pbuf_ram support for lwip application and add bouffalo sdk submodule #3

Merged
merged 8 commits into from
Feb 16, 2025
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,8 @@
path = third_party/re2/src
url = https://github.com/google/re2.git
platforms = linux,darwin
[submodule "third_party/bouffalolab/bouffalo_sdk"]
path = third_party/bouffalolab/bouffalo_sdk
url = git@github.com:bouffalolab/bouffalo_sdk_private.git
branch = master
platforms = bouffalo_sdk
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ def BuildBouffalolabTarget():
target.AppendModifier('mot', use_matter_openthread=True).OnlyIfRe('-(thread)')
target.AppendModifier('memmonitor', enable_heap_monitoring=True)
target.AppendModifier('coredump', enable_debug_coredump=True)
target.AppendModifier('pbuf-pool', enable_lwip_pbuf_ram=False).OnlyIfRe('-(bl602dk)')

return target

Expand Down
4 changes: 4 additions & 0 deletions scripts/build/builders/bouffalolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def __init__(self,
enable_littlefs: bool = False,
enable_pds: bool = False,
enable_debug_coredump: bool = False,
enable_lwip_pbuf_ram: bool = True
):

if 'BL602' == module_type:
Expand Down Expand Up @@ -250,6 +251,9 @@ def __init__(self,

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

if enable_lwip_pbuf_ram:
self.argsOpt.append(f"enable_lwip_pbuf_ram=true")

try:
self.argsOpt.append('bouffalolab_sdk_root="%s"' % os.environ['BOUFFALOLAB_SDK_ROOT'])
except KeyError as err:
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed}
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]
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]
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]
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]
cc32xx-{lock,air-purifier}
ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd]
cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat}
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkout_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
'ameba',
'android',
'asr',
'bl602',
'bouffalolab',
'cc13xx_26xx',
'cc32xx',
Expand All @@ -51,6 +50,7 @@
'genio',
'openiotsdk',
'silabs_docker',
'bouffalo_sdk'
])

Module = namedtuple('Module', 'name path platforms recursive')
Expand Down
2 changes: 2 additions & 0 deletions src/system/SystemPacketBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class DLL_EXPORT PacketBuffer : private pbuf
return kMaxSizeWithoutReserve;
#elif CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP
return this->alloc_size;
#elif CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM
return LWIP_MEM_ALIGN_SIZE(memp_sizes[this->pool]) - kStructureSize;
#elif CHIP_SYSTEM_PACKETBUFFER_FROM_LWIP_CUSTOM_POOL
// Temporary workaround for custom pbufs by assuming size to be PBUF_POOL_BUFSIZE
if (this->flags & PBUF_FLAG_IS_CUSTOM)
Expand Down
1 change: 1 addition & 0 deletions third_party/bouffalolab/bouffalo_sdk
Submodule bouffalo_sdk added at 42f58b
Empty file.
Loading
Loading