Skip to content

Commit 5613e36

Browse files
committed
scripts: runner: Drop blflash in favor of bflb_mcu_tool
Use official flash tool by default. Signed-off-by: Gerson Fernando Budke <[email protected]>
1 parent a699d4f commit 5613e36

File tree

6 files changed

+10
-120
lines changed

6 files changed

+10
-120
lines changed

boards/bouffalolab/bl60x/bl604e_iot_dvk/board.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ board_runner_args(openocd --gdb-init "mem 0x42020000 0x4203C000 rw")
1919
board_runner_args(openocd --gdb-init "mem 0x23000000 0x23400000 ro")
2020
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
2121

22-
board_runner_args(blflash --port /dev/ttyACM0)
23-
include(${ZEPHYR_BASE}/boards/common/blflash.board.cmake)
22+
board_runner_args(bflb_mcu_tool --chipname bl602)
23+
include(${ZEPHYR_BASE}/boards/common/bflb_mcu_tool.board.cmake)
24+
25+
board_set_flasher(bflb_mcu_tool)

boards/bouffalolab/bl60x/bl604e_iot_dvk/doc/index.rst

Lines changed: 6 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The board configuration supports the following hardware features:
4949

5050

5151
The default configurations can be found in the Kconfig
52-
:zephyr_file:`boards/bouffalolab/bl6/bl604e_iot_dvk/bl604e_iot_dvk_defconfig`.
52+
:zephyr_file:`boards/bouffalolab/bl60x/bl604e_iot_dvk/bl604e_iot_dvk_defconfig`.
5353

5454
System Clock
5555
============
@@ -66,53 +66,6 @@ USB Serial converter and port is used for both program and console.
6666
Programming and Debugging
6767
*************************
6868

69-
BL Flash tool
70-
=============
71-
72-
The BL-60x have a ROM bootloader that allows user flash device by serial port.
73-
There are some tools available at internet and this will describe one of them.
74-
The below guide was created based on RISC-V BL602 Book, chapter 3
75-
`Flashing Firmware to BL602`_.
76-
77-
#. `Install Rustup`_
78-
79-
#. Install cargo
80-
81-
.. code-block:: console
82-
83-
$ sudo apt-get install cargo
84-
85-
#. Clone blflash rust version
86-
87-
.. code-block:: console
88-
89-
$ git clone --recursive https://github.com/spacemeowx2/blflash
90-
91-
#. Build blflash
92-
93-
.. code-block:: console
94-
95-
$ cd blflash
96-
$ cargo build --release
97-
98-
#. Install blflash. The recommended use is copy to home folder
99-
100-
.. code-block:: console
101-
102-
$ cp target/release/blflash ~/bin/
103-
104-
#. Test
105-
106-
.. code-block:: console
107-
108-
$ blflash -V
109-
110-
It will print blflash version
111-
112-
.. code-block:: console
113-
114-
$ blflash 0.3.5
115-
11669
Samples
11770
=======
11871

@@ -125,7 +78,7 @@ application:
12578
:goals: build
12679
:compact:
12780

128-
#. To flash an image using blflash runner:
81+
#. To flash an image using bflb_mcu_tool runner:
12982

13083
#. Press BOOT button
13184

@@ -135,7 +88,7 @@ application:
13588

13689
.. code-block:: console
13790
138-
west flash -r blflash
91+
west flash
13992
14093
#. Run your favorite terminal program to listen for output. Under Linux the
14194
terminal should be :code:`/dev/ttyACM0`. For example:
@@ -159,6 +112,9 @@ application:
159112
*** Booting Zephyr OS build v3.7.0-3255-g6e0fa5c1c77a ***
160113
Hello World! bl604e_iot_dvk/bl604e20q2i
161114
115+
116+
To debug the board you can use ``west debug`` command with OpenOCD.
117+
162118
Congratulations, you have ``bl604e_iot_dvk`` configured and running Zephyr.
163119

164120

@@ -171,9 +127,6 @@ Congratulations, you have ``bl604e_iot_dvk`` configured and running Zephyr.
171127
.. _Bouffalo Lab Development Zone:
172128
https://dev.bouffalolab.com/home?id=guest
173129

174-
.. _Install Rustup:
175-
https://rustup.rs/
176-
177130
.. _The RISC-V BL602 Book:
178131
https://lupyuen.github.io/articles/book
179132

boards/common/blflash.board.cmake

Lines changed: 0 additions & 4 deletions
This file was deleted.

scripts/west_commands/runners/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def _import_runner_module(runner_name):
2828
# zephyr-keep-sorted-start
2929
'bflb_mcu_tool',
3030
'blackmagicprobe',
31-
'blflash',
3231
'bossac',
3332
'canopen_program',
3433
'dediprog',

scripts/west_commands/runners/blflash.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

scripts/west_commands/tests/test_imports.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def test_runner_imports():
1919
'arc-nsim',
2020
'bflb_mcu_tool',
2121
'blackmagicprobe',
22-
'blflash',
2322
'bossac',
2423
'canopen',
2524
'dediprog',

0 commit comments

Comments
 (0)