Skip to content

Commit b66d63a

Browse files
committedAug 7, 2024
fix lintcode and python3 module required
1 parent 8ebcbe8 commit b66d63a

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed
 

‎examples/lighting-app/bouffalolab/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ and Thread Border Router.
5959
Router application and Matter ZigBee bridge
6060
- Openthread Border Router application, please refer to Openthread
6161
Border Router application
62-
- Matter ZigBee application, please contact `Bouffalo Lab` for support.
62+
- Matter ZigBee application, please contact `Bouffalo Lab` for
63+
support.
6364

6465
## Initial setup
6566

‎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-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706dk,bl704ldk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id][-mfd][-mfdtest][-ethernet][-wifi][-thread][-fp][-memmonitor][-mot]
4+
bouffalolab-{bl602dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602-iot-matter-v1,xt-zb6-devkit}-light[-ethernet][-wifi][-thread][-easyflash][-shell][-mfd][-rotating_device_id][-rpc][-cdc][-mot][-resetcnt][-memmonitor][-115200][-fp]
55
cc32xx-{lock,air-purifier}
66
ti-cc13x4_26x4-{all-clusters,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/flashing/bouffalolab_firmware_utils.py

+3-13
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# limitations under the License.
1515

1616
import binascii
17-
import configparser
18-
import importlib.metadata
1917
import logging
2018
import os
2119
import pathlib
@@ -24,7 +22,6 @@
2422
import shutil
2523
import subprocess
2624
import sys
27-
import time
2825

2926
import coloredlogs
3027
import firmware_utils
@@ -259,7 +256,7 @@ def decrypt_data(data_bytearray, key_bytearray, iv_bytearray):
259256
if self.args['mfd_str']:
260257
try:
261258
iv = self.args['mfd_str'].split(":")[1].split(',')[0]
262-
except Exception as e:
259+
except Exception:
263260
raise Exception("Invalid mfd-str format.")
264261

265262
self.args["iv"] = iv
@@ -356,7 +353,7 @@ def get_tools():
356353

357354
try:
358355
flashtool_exe = flashtool_path + "/" + bflb_tools_dict[sys.platform]["flash_tool"]
359-
except Exception as e:
356+
except Exception:
360357
raise Exception("Do NOT support {} operating system to program firmware.".format(sys.platform))
361358

362359
if not os.path.exists(flashtool_exe):
@@ -368,7 +365,7 @@ def get_tools():
368365
logging.fatal('\tPlease make sure BOUFFALOLAB_SDK_ROOT exports before building as below:')
369366
logging.fatal('\t\texport BOUFFALOLAB_SDK_ROOT="your install path"')
370367
logging.fatal('*' * 80)
371-
raise Exception(e)
368+
raise Exception("Flash tool is not installed.")
372369

373370
return flashtool_path, flashtool_exe
374371

@@ -550,13 +547,6 @@ def actions(self):
550547
"""Perform actions on the device according to self.option."""
551548
self.log(3, 'Options:', self.option)
552549

553-
is_for_ota_image_building = None
554-
is_for_programming = False
555-
has_private_key = False
556-
has_public_key = False
557-
ota_output_folder = None
558-
options_keys = BOUFFALO_OPTIONS["configuration"].keys()
559-
560550
if platform.machine() not in ["x86_64"]:
561551
raise Exception("Only support x86_64 CPU machine to program firmware.")
562552

‎scripts/setup/requirements.bouffalolab.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ ecdsa>=0.18.0
44
qrcode==7.4.2
55
bitarray==2.6.0
66
python_stdnum==1.18
7+
pycryptodome>=3.20.0

0 commit comments

Comments
 (0)