Open brainstorm opened 1 year ago
Agree !
The development echo-system of BL chips is messed up.
There are:
Expected:
We do not want to depend on python environment so provide bin.
Flash tool does not release with open, thanks.
BLFlashCommand is also GUI?
BLFlashCommand is also GUI?
Will push gui.
make with CMAKE= will use user cmake.
Flash tool does not release with open, thanks.
Is BL lab sure about that?
And did BL Lab checked and verified the LICENSEs of all relates opensource project used and packaged in BLFlashCommand and Cube?
I want to make sure that BL lab already decided to close BLFlashCommand/Cube sources? or it will be released some day in future?
And could you help me how to write a config file to program bl808_linux by BLFlashCommand or BLFlashCube I mentioned in this issue : https://github.com/bouffalolab/bl808_linux/issues/22#issue-1606995638
I have said, if you use mcu sdk, you can use our new flash tool.
Do not support multi groups, thanks. It is history.
@sakumisu
OK, I understand, BLFlashCommand / Cube specially designed for bl_mcu_sdk build system and it's more convenient to work with current bl_mcu_sdk.
Would you mind help me to commit this patch to bflb-mcu-tool
and release a new version to pypi? I did not find the upstream repo of bflb-mcu-tool
. this patch didn't alter original args and functions of bflb-mcu-tool, but export --group1-firmware
and --group1-addr
args as BLDevCube did and can be used to program low_load firmwares of classic bl808_linux
.
--- bflb_mcu_tool.py.orig 2023-03-07 01:00:54.175808455 +0800
+++ bflb_mcu_tool.py 2023-03-07 00:56:35.977075903 +0800
@@ -2349,6 +2349,13 @@
bflb_utils.printf("firmware is not existed")
sys.exit(1)
+ if args.group1_firmware:
+ group1_firmware = args.group1_firmware.replace('~', expanduser("~"))
+ else:
+ group1_firmware = None
+ if not group1_firmware or not os.path.exists(group1_firmware):
+ bflb_utils.printf("group1 firmware is not existed")
+
if args.dts:
dts = args.dts.replace('~', expanduser("~"))
if not os.path.exists(dts):
@@ -2524,10 +2531,13 @@
config["public_key_cfg-group1"] = ''
config["private_key_cfg-group1"] = ''
config["img1_group"] = "group0"
- config["img2_group"] = "unused"
+ if not args.group1_firmware:
+ config["img2_group"] = "unused"
+ else:
+ config["img2_group"] = "group1"
config["img3_group"] = "unused"
- config["img2_file"] = ""
- config["img2_addr"] = ""
+ config["img2_file"] = group1_firmware
+ config["img2_addr"] = args.group1_addr
config["img3_file"] = ""
config["img3_addr"] = ""
config["img1_file"] = firmware
@@ -2538,6 +2548,14 @@
config["img1_addr"] = "0x" + args.addr.replace("0x", "")
else:
config["img1_addr"] = "0x58000000"
+
+ if args.group1_addr:
+ if args.group1_addr == "0x2000" or args.group1_addr == "2000":
+ config["img2_addr"] = "0x58000000"
+ else:
+ config["img2_addr"] = "0x" + args.group1_addr.replace("0x", "")
+ else:
+ config["img2_addr"] = "0x58000000"
else:
bflb_utils.printf("Chip type is not correct")
sys.exit(1)
@@ -2581,6 +2599,11 @@
default=firmware_default,
help="image to write")
parser.add_argument("--addr", dest="addr", default="0x2000", help="address to write")
+ parser.add_argument("--group1-firmware",
+ dest="group1_firmware",
+ default=None,
+ help="group1 image to write")
+ parser.add_argument("--group1-addr", dest="group1_addr", default="0x2000", help="address to write")
parser.add_argument("--dts", dest="dts", help="device tree")
parser.add_argument("--build", dest="build", action="store_true", help="build image")
parser.add_argument("--erase", dest="erase", action="store_true", help="chip erase")
@@ -2604,6 +2627,9 @@
bflb_utils.printf("Serial port is not found")
bflb_utils.printf("Baudrate is " + str(args.baudrate))
bflb_utils.printf("Firmware is " + str(args.firmware))
+ if args.group1_firmware:
+ bflb_utils.printf("Group1 Firmware is " + str(args.group1_firmware))
+ bflb_utils.printf("Group1 Addr is " + str(args.group1_addr))
bflb_utils.printf("Device Tree is " + str(args.dts))
bflb_utils.printf("==================================================")
config = get_value(args)
After compiling an example successfully I now see the following errors (were not there a couple of weeks ago):
Then I realised that you ship binaries for 2 platforms instead of just having the source code for those tools compiled alongside?:
Could you please delete the binaries and add source code that produces those binaries instead?
Similar story goes to the CMake shipped as a binary:
My symlink in :point_up: is not the best solution, just a lazy workaround. Your whole build system should assume that the user's system
CMake
should be used instead.