Skip to content

Commit

Permalink
scripts: runner: Drop blflash in favor of bflb_mcu_tool
Browse files Browse the repository at this point in the history
Use official flash tool by default.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
  • Loading branch information
nandojve committed Oct 27, 2024
1 parent dccb5ba commit fd6f1b4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 119 deletions.
6 changes: 4 additions & 2 deletions boards/bouffalolab/bl60x/bl604e_iot_dvk/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ board_runner_args(openocd --gdb-init "mem 0x42020000 0x4203C000 rw")
board_runner_args(openocd --gdb-init "mem 0x23000000 0x23400000 ro")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

board_runner_args(blflash --port /dev/ttyACM0)
include(${ZEPHYR_BASE}/boards/common/blflash.board.cmake)
board_runner_args(bflb_mcu_tool --chipname bl602)
include(${ZEPHYR_BASE}/boards/common/bflb_mcu_tool.board.cmake)

board_set_flasher(bflb_mcu_tool)
57 changes: 5 additions & 52 deletions boards/bouffalolab/bl60x/bl604e_iot_dvk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,53 +74,6 @@ USB Serial converter and port is used for both program and console.
Programming and Debugging
*************************

BL Flash tool
=============

The BL-60x have a ROM bootloader that allows user flash device by serial port.
There are some tools available at internet and this will describe one of them.
The below guide was created based on RISC-V BL602 Book, chapter 3
`Flashing Firmware to BL602`_.

#. `Install Rustup`_

#. Install cargo

.. code-block:: console
$ sudo apt-get install cargo
#. Clone blflash rust version

.. code-block:: console
$ git clone --recursive https://github.com/spacemeowx2/blflash
#. Build blflash

.. code-block:: console
$ cd blflash
$ cargo build --release
#. Install blflash. The recommended use is copy to home folder

.. code-block:: console
$ cp target/release/blflash ~/bin/
#. Test

.. code-block:: console
$ blflash -V
It will print blflash version

.. code-block:: console
$ blflash 0.3.5
Samples
=======

Expand All @@ -133,7 +86,7 @@ application:
:goals: build
:compact:

#. To flash an image using blflash runner:
#. To flash an image using bflb_mcu_tool runner:

#. Press BOOT button

Expand All @@ -143,7 +96,7 @@ application:

.. code-block:: console
west flash -r blflash
west flash
#. Run your favorite terminal program to listen for output. Under Linux the
terminal should be :code:`/dev/ttyACM0`. For example:
Expand All @@ -167,6 +120,9 @@ application:
*** Booting Zephyr OS build v3.7.0-3255-g6e0fa5c1c77a ***
Hello World! bl604e_iot_dvk/bl604e20q2i
To debug the board you can use ``west debug`` command with OpenOCD.

Congratulations, you have `bl604e_iot_dvk`_ configured and running Zephyr.


Expand All @@ -179,9 +135,6 @@ Congratulations, you have `bl604e_iot_dvk`_ configured and running Zephyr.
.. _Bouffalo Lab Development Zone:
https://dev.bouffalolab.com/home?id=guest

.. _Install Rustup:
https://rustup.rs/

.. _The RISC-V BL602 Book:
https://lupyuen.github.io/articles/book

Expand Down
4 changes: 0 additions & 4 deletions boards/common/blflash.board.cmake

This file was deleted.

1 change: 0 additions & 1 deletion scripts/west_commands/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _import_runner_module(runner_name):
# zephyr-keep-sorted-start
'bflb_mcu_tool',
'blackmagicprobe',
'blflash',
'bossac',
'canopen_program',
'dediprog',
Expand Down
59 changes: 0 additions & 59 deletions scripts/west_commands/runners/blflash.py

This file was deleted.

1 change: 0 additions & 1 deletion scripts/west_commands/tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def test_runner_imports():
'arc-nsim',
'bflb_mcu_tool',
'blackmagicprobe',
'blflash',
'bossac',
'canopen',
'dediprog',
Expand Down

0 comments on commit fd6f1b4

Please sign in to comment.