Files
openocd/tcl/target/bl602.cfg
Marek Kraus df2eb07086 flash/nor/bl602: add bl602 flash driver
Initial release of Flash bank driver for Bouffalo chips.
The driver currently supports BL602, BL702, BL702L series of chips.
Similar SFlash core is inside of BL808, BL606P and BL616 series,
so those might be supported in future as well.

With adapter speed set to 8000, it can reach speed 140 KiB/s.

Since chips have eXecute In Place support, and they also require
boot config in Flash at offset 0x0, it's required to have properly
crafted linker script, so OpenOCD knows where to write firmware
through gdb.

There is required flash bank parameter, which specifies the chip type.
This is required because BL702 and BL702L have same TAP ID CODE, and
there are no usable indicators to use for automatic chip type
recognition in the chip.

Change-Id: Id57336d447be3c608b39ba3ed143527bfdc0af98
Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8527
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-29 11:55:01 +00:00

37 lines
779 B
INI

# SPDX-License-Identifier: GPL-2.0-or-later
#
# Bouffalo Labs BL602 and BL604 target
#
# https://en.bouffalolab.com/product/?type=detail&id=1
#
# Default JTAG pins: (if not changed by eFuse configuration)
# TDO - GPIO11
# TMS - GPIO12
# TCK - GPIO14
# TDI - GPIO17
#
if { [info exists CHIPNAME] } {
set BL602_CHIPNAME $CHIPNAME
} else {
set BL602_CHIPNAME bl602
}
set CPUTAPID 0x20000c05
# For work-area we use DTCM instead of ITCM, due ITCM is used as buffer for L1 cache and XIP
set WORKAREAADDR 0x42014000
set WORKAREASIZE 0xC000
set FLASH_CHIP_TYPE bl602
source [find target/bl602_common.cfg]
# JTAG reset is broken. Read comment of bl602_sw_reset_hbn_wait function for more information
$_TARGETNAME configure -event reset-assert {
halt
bl602_sw_reset_hbn_wait
}