src/flash: add gd32vw55x flash driver (#12)
Change-Id: Id179ee96303e5b7caf5f920843968e8564983752 Signed-off-by: JackChenHR <chran12345@163.com>
This commit is contained in:
parent
2fbb887163
commit
61759141a6
|
@ -36,6 +36,7 @@ NOR_DRIVERS = \
|
|||
%D%/fespi.c \
|
||||
%D%/fm3.c \
|
||||
%D%/fm4.c \
|
||||
%D%/gd32vw55x.c \
|
||||
%D%/jtagspi.c \
|
||||
%D%/kinetis.c \
|
||||
%D%/kinetis_ke.c \
|
||||
|
|
|
@ -264,6 +264,7 @@ extern const struct flash_driver faux_flash;
|
|||
extern const struct flash_driver fespi_flash;
|
||||
extern const struct flash_driver fm3_flash;
|
||||
extern const struct flash_driver fm4_flash;
|
||||
extern const struct flash_driver gd32vw55x_flash;
|
||||
extern const struct flash_driver jtagspi_flash;
|
||||
extern const struct flash_driver kinetis_flash;
|
||||
extern const struct flash_driver kinetis_ke_flash;
|
||||
|
|
|
@ -42,6 +42,7 @@ static const struct flash_driver * const flash_drivers[] = {
|
|||
&fm3_flash,
|
||||
&fm4_flash,
|
||||
&fespi_flash,
|
||||
&gd32vw55x_flash,
|
||||
&jtagspi_flash,
|
||||
&kinetis_flash,
|
||||
&kinetis_ke_flash,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
|||
#
|
||||
# GigaDevice GD32VW55x target
|
||||
#
|
||||
#
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10307a6d
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 20480 -work-area-backup 0
|
||||
|
||||
|
||||
# Work-area is a space in RAM used for flash programming
|
||||
if { [info exists WORKAREASIZE] } {
|
||||
set _WORKAREASIZE $WORKAREASIZE
|
||||
} else {
|
||||
set _WORKAREASIZE 0x5000
|
||||
}
|
||||
|
||||
# Allow overriding the Flash bank size
|
||||
if { [info exists FLASH_SIZE] } {
|
||||
set _FLASH_SIZE $FLASH_SIZE
|
||||
} else {
|
||||
# autodetect size
|
||||
set _FLASH_SIZE 0
|
||||
}
|
||||
|
||||
# flash size will be probed
|
||||
set _FLASHNAME $_CHIPNAME.flash
|
||||
|
||||
flash bank $_FLASHNAME gd32vw55x 0x08000000 $_FLASH_SIZE 0 0 $_TARGETNAME
|
||||
riscv set_reset_timeout_sec 1
|
||||
init
|
||||
|
||||
halt
|
Loading…
Reference in New Issue