From 329ce2292e6f336d7bbd844019674281ec6c4280 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Fri, 27 Mar 2020 14:13:10 -0700 Subject: [PATCH 1/2] Bump openocdcfg generator for multicore Signed-off-by: Nathaniel Graff --- scripts/openocdcfg-generator | 2 +- wit-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/openocdcfg-generator b/scripts/openocdcfg-generator index f418e6c39..e91034b8b 160000 --- a/scripts/openocdcfg-generator +++ b/scripts/openocdcfg-generator @@ -1 +1 @@ -Subproject commit f418e6c39416a8003bf9388d718fea5498e77773 +Subproject commit e91034b8b8e7994b2c23f9e7e7cfff36bf031a91 diff --git a/wit-manifest.json b/wit-manifest.json index 2900f3b0d..54bb32ef2 100644 --- a/wit-manifest.json +++ b/wit-manifest.json @@ -30,7 +30,7 @@ "source": "git@github.com:sifive/cmsis-svd-generator.git" }, { - "commit": "f418e6c39416a8003bf9388d718fea5498e77773", + "commit": "e91034b8b8e7994b2c23f9e7e7cfff36bf031a91", "name": "openocdcfg-generator", "source": "git@github.com:sifive/openocdcfg-generator.git" }, From c07ac84cbdd678963c4dc3ea34a68c47a8b53651 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Fri, 27 Mar 2020 14:17:44 -0700 Subject: [PATCH 2/2] Regen BSPs Signed-off-by: Nathaniel Graff --- bsp/freedom-e310-arty/openocd.cfg | 13 +++++-------- bsp/freedom-e310-arty/openocd.cjtag.cfg | 13 +++++-------- bsp/sifive-hifive-unleashed/openocd.cfg | 22 ++++++++++++++-------- bsp/sifive-hifive1/openocd.cfg | 13 +++++-------- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/bsp/freedom-e310-arty/openocd.cfg b/bsp/freedom-e310-arty/openocd.cfg index ac83ae638..8ab6ff683 100644 --- a/bsp/freedom-e310-arty/openocd.cfg +++ b/bsp/freedom-e310-arty/openocd.cfg @@ -43,22 +43,19 @@ switch ${debug_config} { set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen $chain_length -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME +set _TARGETNAME_0 $_CHIPNAME.cpu + +target create $_TARGETNAME_0 riscv -chain-position $_TARGETNAME_0 -$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 +$_TARGETNAME_0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 if { $chain_length == 6 } { riscv use_bscan_tunnel 5 } -flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10014000 +flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME_0 0x10014000 init -# If required, the authdata_write command must be added immediately after the 'init' command -# Use: -# riscv authdata_write ???????? - if { [info exists authkey] } { riscv authdata_write $authkey } diff --git a/bsp/freedom-e310-arty/openocd.cjtag.cfg b/bsp/freedom-e310-arty/openocd.cjtag.cfg index a526f42c0..5a619a4b7 100644 --- a/bsp/freedom-e310-arty/openocd.cjtag.cfg +++ b/bsp/freedom-e310-arty/openocd.cjtag.cfg @@ -43,22 +43,19 @@ switch ${debug_config} { set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen $chain_length -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME +set _TARGETNAME_0 $_CHIPNAME.cpu + +target create $_TARGETNAME_0 riscv -chain-position $_TARGETNAME_0 -$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 +$_TARGETNAME_0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 if { $chain_length == 6 } { riscv use_bscan_tunnel 5 } -flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10014000 +flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME_0 0x10014000 init -# If required, the authdata_write command must be added immediately after the 'init' command -# Use: -# riscv authdata_write ???????? - if { [info exists authkey] } { riscv authdata_write $authkey } diff --git a/bsp/sifive-hifive-unleashed/openocd.cfg b/bsp/sifive-hifive-unleashed/openocd.cfg index 3ee9149a6..f3dd8d548 100644 --- a/bsp/sifive-hifive-unleashed/openocd.cfg +++ b/bsp/sifive-hifive-unleashed/openocd.cfg @@ -14,22 +14,28 @@ ftdi_layout_signal LED -data 0x0020 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen $chain_length -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME +set _TARGETNAME_0 $_CHIPNAME.cpu0 +set _TARGETNAME_1 $_CHIPNAME.cpu1 +set _TARGETNAME_2 $_CHIPNAME.cpu2 +set _TARGETNAME_3 $_CHIPNAME.cpu3 +set _TARGETNAME_4 $_CHIPNAME.cpu4 + +target create $_TARGETNAME_0 riscv -chain-position $_CHIPNAME.cpu -rtos hwthread +target create $_TARGETNAME_1 riscv -chain-position $_CHIPNAME.cpu -coreid 1 +target create $_TARGETNAME_2 riscv -chain-position $_CHIPNAME.cpu -coreid 2 +target create $_TARGETNAME_3 riscv -chain-position $_CHIPNAME.cpu -coreid 3 +target create $_TARGETNAME_4 riscv -chain-position $_CHIPNAME.cpu -coreid 4 +target smp $_TARGETNAME_0 $_TARGETNAME_1 $_TARGETNAME_2 $_TARGETNAME_3 $_TARGETNAME_4 -$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 +$_TARGETNAME_0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 if { $chain_length == 6 } { riscv use_bscan_tunnel 5 } -flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10040000 +flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME_0 0x10040000 init -# If required, the authdata_write command must be added immediately after the 'init' command -# Use: -# riscv authdata_write ???????? - if { [info exists authkey] } { riscv authdata_write $authkey } diff --git a/bsp/sifive-hifive1/openocd.cfg b/bsp/sifive-hifive1/openocd.cfg index 23e593b6b..3c7980f6a 100644 --- a/bsp/sifive-hifive1/openocd.cfg +++ b/bsp/sifive-hifive1/openocd.cfg @@ -14,22 +14,19 @@ ftdi_layout_signal LED -data 0x0020 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen $chain_length -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME +set _TARGETNAME_0 $_CHIPNAME.cpu + +target create $_TARGETNAME_0 riscv -chain-position $_TARGETNAME_0 -$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 +$_TARGETNAME_0 configure -work-area-phys 0x80000000 -work-area-size 0x2710 -work-area-backup 1 if { $chain_length == 6 } { riscv use_bscan_tunnel 5 } -flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10014000 +flash bank spi0 fespi 0x20000000 0 0 0 $_TARGETNAME_0 0x10014000 init -# If required, the authdata_write command must be added immediately after the 'init' command -# Use: -# riscv authdata_write ???????? - if { [info exists authkey] } { riscv authdata_write $authkey }