Skip to content

Commit

Permalink
fix lintcode and python3 module required
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Aug 7, 2024
1 parent 8ebcbe8 commit b66d63a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
3 changes: 2 additions & 1 deletion examples/lighting-app/bouffalolab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ and Thread Border Router.
Router application and Matter ZigBee bridge
- Openthread Border Router application, please refer to Openthread
Border Router application
- Matter ZigBee application, please contact `Bouffalo Lab` for support.
- Matter ZigBee application, please contact `Bouffalo Lab` for
support.

## Initial setup

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-{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]
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]
cc32xx-{lock,air-purifier}
ti-cc13x4_26x4-{all-clusters,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
16 changes: 3 additions & 13 deletions scripts/flashing/bouffalolab_firmware_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# limitations under the License.

import binascii
import configparser
import importlib.metadata
import logging
import os
import pathlib
Expand All @@ -24,7 +22,6 @@
import shutil
import subprocess
import sys
import time

import coloredlogs
import firmware_utils
Expand Down Expand Up @@ -259,7 +256,7 @@ def decrypt_data(data_bytearray, key_bytearray, iv_bytearray):
if self.args['mfd_str']:
try:
iv = self.args['mfd_str'].split(":")[1].split(',')[0]
except Exception as e:
except Exception:
raise Exception("Invalid mfd-str format.")

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

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

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

return flashtool_path, flashtool_exe

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

is_for_ota_image_building = None
is_for_programming = False
has_private_key = False
has_public_key = False
ota_output_folder = None
options_keys = BOUFFALO_OPTIONS["configuration"].keys()

if platform.machine() not in ["x86_64"]:
raise Exception("Only support x86_64 CPU machine to program firmware.")

Expand Down
1 change: 1 addition & 0 deletions scripts/setup/requirements.bouffalolab.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ecdsa>=0.18.0
qrcode==7.4.2
bitarray==2.6.0
python_stdnum==1.18
pycryptodome>=3.20.0

0 comments on commit b66d63a

Please sign in to comment.