Compare commits
43 Commits
v0.12.0-rc
...
v0.12.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ea7f3d647 | ||
|
|
f71b5f5a37 | ||
|
|
d92ebb5ab4 | ||
|
|
7dd5b6a464 | ||
|
|
dfe57baa16 | ||
|
|
fcb40f49b1 | ||
|
|
77c281d2df | ||
|
|
c913e4d5a6 | ||
|
|
77c7abe4e7 | ||
|
|
0a829efda5 | ||
|
|
2b6fe8f1ab | ||
|
|
a51ac964c6 | ||
|
|
a6b0221952 | ||
|
|
c6fe10de75 | ||
|
|
2278878a05 | ||
|
|
9501b263e0 | ||
|
|
04887d3b68 | ||
|
|
4fe3997294 | ||
|
|
a9d7428535 | ||
|
|
3ea1bfce4f | ||
|
|
0f034868f2 | ||
|
|
6ea1ccf3e6 | ||
|
|
5193f61cf5 | ||
|
|
e345cefabd | ||
|
|
9d925776b4 | ||
|
|
2e9f04c11a | ||
|
|
2bad55bf83 | ||
|
|
1762aa04ce | ||
|
|
0d055602c3 | ||
|
|
6939187853 | ||
|
|
1d04ef3e55 | ||
|
|
4e077fddad | ||
|
|
d3e79c1eaf | ||
|
|
fb23c9c10b | ||
|
|
09731b69a6 | ||
|
|
3da0c2504c | ||
|
|
1dea9ab41f | ||
|
|
5fc4882b80 | ||
|
|
0946e80407 | ||
|
|
7a09635735 | ||
|
|
aca3707bd8 | ||
|
|
3ca7bc7354 | ||
|
|
12ce170945 |
4
NEWS
4
NEWS
@@ -111,7 +111,7 @@ Build and Release:
|
|||||||
* Drop repository repo.or.cz for submodules
|
* Drop repository repo.or.cz for submodules
|
||||||
* Move gerrit to https://review.openocd.org/
|
* Move gerrit to https://review.openocd.org/
|
||||||
* Require autoconf 2.69 or newer
|
* Require autoconf 2.69 or newer
|
||||||
* Update jep106 to revision JEP106BE
|
* Update jep106 to revision JEP106BF.01
|
||||||
* Update jimtcl to version 0.81
|
* Update jimtcl to version 0.81
|
||||||
* Update libjaylink to version 0.3.1
|
* Update libjaylink to version 0.3.1
|
||||||
* New configure flag '--enable-jimtcl-maintainer' for jimtcl build
|
* New configure flag '--enable-jimtcl-maintainer' for jimtcl build
|
||||||
@@ -121,7 +121,7 @@ This release also contains a number of other important functional and
|
|||||||
cosmetic bugfixes. For more details about what has changed since the
|
cosmetic bugfixes. For more details about what has changed since the
|
||||||
last release, see the git repository history:
|
last release, see the git repository history:
|
||||||
|
|
||||||
http://sourceforge.net/p/openocd/code/ci/v0.12.0-rc2/log/?path=
|
http://sourceforge.net/p/openocd/code/ci/v0.12.0/log/?path=
|
||||||
|
|
||||||
|
|
||||||
For older NEWS, see the NEWS files associated with each release
|
For older NEWS, see the NEWS files associated with each release
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
AC_PREREQ([2.69])
|
AC_PREREQ([2.69])
|
||||||
AC_INIT([openocd], [0.12.0-rc2],
|
AC_INIT([openocd], [0.12.0],
|
||||||
[OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
|
[OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
|
||||||
AC_CONFIG_SRCDIR([src/openocd.c])
|
AC_CONFIG_SRCDIR([src/openocd.c])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
@@ -574,7 +574,7 @@ AS_IF([test "x$enable_buspirate" != "xno"], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
|
AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
|
||||||
AS_IF([test -f "$srcdir/jimtcl/configure.ac"], [
|
AS_IF([test -f "$srcdir/jimtcl/configure"], [
|
||||||
AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [
|
AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [
|
||||||
jimtcl_config_options="--disable-install-jim --with-ext=json --maintainer"
|
jimtcl_config_options="--disable-install-jim --with-ext=json --maintainer"
|
||||||
], [
|
], [
|
||||||
|
|||||||
@@ -8478,12 +8478,20 @@ that particular type of PLD.
|
|||||||
|
|
||||||
@deffn {FPGA Driver} {virtex2} [no_jstart]
|
@deffn {FPGA Driver} {virtex2} [no_jstart]
|
||||||
Virtex-II is a family of FPGAs sold by Xilinx.
|
Virtex-II is a family of FPGAs sold by Xilinx.
|
||||||
|
This driver can also be used to load Series3, Series6, Series7 and Zynq 7000 devices.
|
||||||
It supports the IEEE 1532 standard for In-System Configuration (ISC).
|
It supports the IEEE 1532 standard for In-System Configuration (ISC).
|
||||||
|
|
||||||
If @var{no_jstart} is non-zero, the JSTART instruction is not used after
|
If @var{no_jstart} is non-zero, the JSTART instruction is not used after
|
||||||
loading the bitstream. While required for Series2, Series3, and Series6, it
|
loading the bitstream. While required for Series2, Series3, and Series6, it
|
||||||
breaks bitstream loading on Series7.
|
breaks bitstream loading on Series7.
|
||||||
|
|
||||||
|
@example
|
||||||
|
openocd -f board/digilent_zedboard.cfg -c "init" \
|
||||||
|
-c "pld load 0 zedboard_bitstream.bit"
|
||||||
|
@end example
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@deffn {Command} {virtex2 read_stat} num
|
@deffn {Command} {virtex2 read_stat} num
|
||||||
Reads and displays the Virtex-II status register (STAT)
|
Reads and displays the Virtex-II status register (STAT)
|
||||||
for FPGA @var{num}.
|
for FPGA @var{num}.
|
||||||
@@ -8515,7 +8523,7 @@ command. All output is relayed through the GDB session.
|
|||||||
|
|
||||||
@item @b{Machine Interface}
|
@item @b{Machine Interface}
|
||||||
The Tcl interface's intent is to be a machine interface. The default Tcl
|
The Tcl interface's intent is to be a machine interface. The default Tcl
|
||||||
port is 5555.
|
port is 6666.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include "helper/binarybuffer.h"
|
#include "helper/binarybuffer.h"
|
||||||
|
|
||||||
|
#include <helper/time_support.h>
|
||||||
#include <jtag/jtag.h>
|
#include <jtag/jtag.h>
|
||||||
#include <target/cortex_m.h>
|
#include <target/cortex_m.h>
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
#define SAMD_NVMCTRL_CTRLA 0x00 /* NVM control A register */
|
#define SAMD_NVMCTRL_CTRLA 0x00 /* NVM control A register */
|
||||||
#define SAMD_NVMCTRL_CTRLB 0x04 /* NVM control B register */
|
#define SAMD_NVMCTRL_CTRLB 0x04 /* NVM control B register */
|
||||||
#define SAMD_NVMCTRL_PARAM 0x08 /* NVM parameters register */
|
#define SAMD_NVMCTRL_PARAM 0x08 /* NVM parameters register */
|
||||||
#define SAMD_NVMCTRL_INTFLAG 0x18 /* NVM Interrupt Flag Status & Clear */
|
#define SAMD_NVMCTRL_INTFLAG 0x14 /* NVM Interrupt Flag Status & Clear */
|
||||||
#define SAMD_NVMCTRL_STATUS 0x18 /* NVM status register */
|
#define SAMD_NVMCTRL_STATUS 0x18 /* NVM status register */
|
||||||
#define SAMD_NVMCTRL_ADDR 0x1C /* NVM address register */
|
#define SAMD_NVMCTRL_ADDR 0x1C /* NVM address register */
|
||||||
#define SAMD_NVMCTRL_LOCK 0x20 /* NVM Lock section register */
|
#define SAMD_NVMCTRL_LOCK 0x20 /* NVM Lock section register */
|
||||||
@@ -55,6 +56,9 @@
|
|||||||
/* NVMCTRL bits */
|
/* NVMCTRL bits */
|
||||||
#define SAMD_NVM_CTRLB_MANW 0x80
|
#define SAMD_NVM_CTRLB_MANW 0x80
|
||||||
|
|
||||||
|
/* NVMCTRL_INTFLAG bits */
|
||||||
|
#define SAMD_NVM_INTFLAG_READY 0x01
|
||||||
|
|
||||||
/* Known identifiers */
|
/* Known identifiers */
|
||||||
#define SAMD_PROCESSOR_M0 0x01
|
#define SAMD_PROCESSOR_M0 0x01
|
||||||
#define SAMD_FAMILY_D 0x00
|
#define SAMD_FAMILY_D 0x00
|
||||||
@@ -497,7 +501,27 @@ static int samd_probe(struct flash_bank *bank)
|
|||||||
static int samd_check_error(struct target *target)
|
static int samd_check_error(struct target *target)
|
||||||
{
|
{
|
||||||
int ret, ret2;
|
int ret, ret2;
|
||||||
|
uint8_t intflag;
|
||||||
uint16_t status;
|
uint16_t status;
|
||||||
|
int timeout_ms = 1000;
|
||||||
|
int64_t ts_start = timeval_ms();
|
||||||
|
|
||||||
|
do {
|
||||||
|
ret = target_read_u8(target,
|
||||||
|
SAMD_NVMCTRL + SAMD_NVMCTRL_INTFLAG, &intflag);
|
||||||
|
if (ret != ERROR_OK) {
|
||||||
|
LOG_ERROR("Can't read NVM intflag");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
if (intflag & SAMD_NVM_INTFLAG_READY)
|
||||||
|
break;
|
||||||
|
keep_alive();
|
||||||
|
} while (timeval_ms() - ts_start < timeout_ms);
|
||||||
|
|
||||||
|
if (!(intflag & SAMD_NVM_INTFLAG_READY)) {
|
||||||
|
LOG_ERROR("SAMD: NVM programming timed out");
|
||||||
|
return ERROR_FLASH_OPERATION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
ret = target_read_u16(target,
|
ret = target_read_u16(target,
|
||||||
SAMD_NVMCTRL + SAMD_NVMCTRL_STATUS, &status);
|
SAMD_NVMCTRL + SAMD_NVMCTRL_STATUS, &status);
|
||||||
|
|||||||
@@ -1132,9 +1132,9 @@ static int lpc2900_write(struct flash_bank *bank, const uint8_t *buffer,
|
|||||||
* reduced size if that fails. */
|
* reduced size if that fails. */
|
||||||
struct working_area *warea;
|
struct working_area *warea;
|
||||||
uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB;
|
uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB;
|
||||||
while ((retval = target_alloc_working_area_try(target,
|
while (target_alloc_working_area_try(target,
|
||||||
buffer_size + target_code_size,
|
buffer_size + target_code_size,
|
||||||
&warea)) != ERROR_OK) {
|
&warea) != ERROR_OK) {
|
||||||
/* Try a smaller buffer now, and stop if it's too small. */
|
/* Try a smaller buffer now, and stop if it's too small. */
|
||||||
buffer_size -= 1 * KiB;
|
buffer_size -= 1 * KiB;
|
||||||
if (buffer_size < 2 * KiB) {
|
if (buffer_size < 2 * KiB) {
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ static int stm32x_write_block_async(struct flash_bank *bank, const uint8_t *buff
|
|||||||
|
|
||||||
/* memory buffer */
|
/* memory buffer */
|
||||||
buffer_size = target_get_working_area_avail(target);
|
buffer_size = target_get_working_area_avail(target);
|
||||||
buffer_size = MIN(hwords_count * 2, MAX(buffer_size, 256));
|
buffer_size = MIN(hwords_count * 2 + 8, MAX(buffer_size, 256));
|
||||||
/* Normally we allocate all available working area.
|
/* Normally we allocate all available working area.
|
||||||
* MIN shrinks buffer_size if the size of the written block is smaller.
|
* MIN shrinks buffer_size if the size of the written block is smaller.
|
||||||
* MAX prevents using async algo if the available working area is smaller
|
* MAX prevents using async algo if the available working area is smaller
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ static const struct stm32lx_rev stm32_417_revs[] = {
|
|||||||
{ 0x1000, "A" }, { 0x1008, "Z" }, { 0x1018, "Y" }, { 0x1038, "X" }
|
{ 0x1000, "A" }, { 0x1008, "Z" }, { 0x1018, "Y" }, { 0x1038, "X" }
|
||||||
};
|
};
|
||||||
static const struct stm32lx_rev stm32_425_revs[] = {
|
static const struct stm32lx_rev stm32_425_revs[] = {
|
||||||
{ 0x1000, "A" }, { 0x2000, "B" }, { 0x2008, "Y" },
|
{ 0x1000, "A" }, { 0x2000, "B" }, { 0x2008, "Y" }, { 0x2018, "1, X" },
|
||||||
};
|
};
|
||||||
static const struct stm32lx_rev stm32_427_revs[] = {
|
static const struct stm32lx_rev stm32_427_revs[] = {
|
||||||
{ 0x1000, "A" }, { 0x1018, "Y" }, { 0x1038, "X" }, { 0x10f8, "V" },
|
{ 0x1000, "A" }, { 0x1018, "Y" }, { 0x1038, "X" }, { 0x10f8, "V" },
|
||||||
|
|||||||
@@ -616,8 +616,6 @@ COMMAND_HANDLER(stmqspi_handle_set)
|
|||||||
|
|
||||||
LOG_DEBUG("%s", __func__);
|
LOG_DEBUG("%s", __func__);
|
||||||
|
|
||||||
dual = (stmqspi_info->saved_cr & BIT(SPI_DUAL_FLASH)) ? 1 : 0;
|
|
||||||
|
|
||||||
/* chip_erase_cmd, sectorsize and erase_cmd are optional */
|
/* chip_erase_cmd, sectorsize and erase_cmd are optional */
|
||||||
if ((CMD_ARGC < 7) || (CMD_ARGC > 10))
|
if ((CMD_ARGC < 7) || (CMD_ARGC > 10))
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
@@ -628,8 +626,9 @@ COMMAND_HANDLER(stmqspi_handle_set)
|
|||||||
|
|
||||||
target = bank->target;
|
target = bank->target;
|
||||||
stmqspi_info = bank->driver_priv;
|
stmqspi_info = bank->driver_priv;
|
||||||
|
dual = (stmqspi_info->saved_cr & BIT(SPI_DUAL_FLASH)) ? 1 : 0;
|
||||||
|
|
||||||
/* invalidate all old info */
|
/* invalidate all flash device info */
|
||||||
if (stmqspi_info->probed)
|
if (stmqspi_info->probed)
|
||||||
free(bank->sectors);
|
free(bank->sectors);
|
||||||
bank->size = 0;
|
bank->size = 0;
|
||||||
@@ -721,10 +720,8 @@ COMMAND_HANDLER(stmqspi_handle_set)
|
|||||||
|
|
||||||
uint32_t dcr;
|
uint32_t dcr;
|
||||||
retval = target_read_u32(target, io_base + SPI_DCR, &dcr);
|
retval = target_read_u32(target, io_base + SPI_DCR, &dcr);
|
||||||
|
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
fsize = (dcr >> SPI_FSIZE_POS) & (BIT(SPI_FSIZE_LEN) - 1);
|
fsize = (dcr >> SPI_FSIZE_POS) & (BIT(SPI_FSIZE_LEN) - 1);
|
||||||
|
|
||||||
LOG_DEBUG("FSIZE = 0x%04x", fsize);
|
LOG_DEBUG("FSIZE = 0x%04x", fsize);
|
||||||
@@ -1799,7 +1796,6 @@ static int find_sfdp_dummy(struct flash_bank *bank, int len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = ERROR_FAIL;
|
|
||||||
LOG_DEBUG("no start of SFDP header even after %u dummy bytes", count);
|
LOG_DEBUG("no start of SFDP header even after %u dummy bytes", count);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@@ -2081,16 +2077,17 @@ static int stmqspi_probe(struct flash_bank *bank)
|
|||||||
bool octal_dtr;
|
bool octal_dtr;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
if (stmqspi_info->probed) {
|
/* invalidate all flash device info */
|
||||||
|
if (stmqspi_info->probed)
|
||||||
|
free(bank->sectors);
|
||||||
bank->size = 0;
|
bank->size = 0;
|
||||||
bank->num_sectors = 0;
|
bank->num_sectors = 0;
|
||||||
free(bank->sectors);
|
|
||||||
bank->sectors = NULL;
|
bank->sectors = NULL;
|
||||||
memset(&stmqspi_info->dev, 0, sizeof(stmqspi_info->dev));
|
|
||||||
stmqspi_info->sfdp_dummy1 = 0;
|
stmqspi_info->sfdp_dummy1 = 0;
|
||||||
stmqspi_info->sfdp_dummy2 = 0;
|
stmqspi_info->sfdp_dummy2 = 0;
|
||||||
stmqspi_info->probed = false;
|
stmqspi_info->probed = false;
|
||||||
}
|
memset(&stmqspi_info->dev, 0, sizeof(stmqspi_info->dev));
|
||||||
|
stmqspi_info->dev.name = "unknown";
|
||||||
|
|
||||||
/* Abort any previous operation */
|
/* Abort any previous operation */
|
||||||
retval = stmqspi_abort(bank);
|
retval = stmqspi_abort(bank);
|
||||||
@@ -2105,8 +2102,8 @@ static int stmqspi_probe(struct flash_bank *bank)
|
|||||||
/* check whether QSPI_ABR is writeable and readback returns the value written */
|
/* check whether QSPI_ABR is writeable and readback returns the value written */
|
||||||
retval = target_write_u32(target, io_base + QSPI_ABR, magic);
|
retval = target_write_u32(target, io_base + QSPI_ABR, magic);
|
||||||
if (retval == ERROR_OK) {
|
if (retval == ERROR_OK) {
|
||||||
retval = target_read_u32(target, io_base + QSPI_ABR, &data);
|
(void)target_read_u32(target, io_base + QSPI_ABR, &data);
|
||||||
retval = target_write_u32(target, io_base + QSPI_ABR, 0);
|
(void)target_write_u32(target, io_base + QSPI_ABR, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == magic) {
|
if (data == magic) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* identification code list, please visit the JEDEC website at www.jedec.org .
|
* identification code list, please visit the JEDEC website at www.jedec.org .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This file is aligned to revision JEP106BE January 2022. */
|
/* This file is aligned to revision JEP106BF.01 October 2022. */
|
||||||
|
|
||||||
[0][0x01 - 1] = "AMD",
|
[0][0x01 - 1] = "AMD",
|
||||||
[0][0x02 - 1] = "AMI",
|
[0][0x02 - 1] = "AMI",
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
[1][0x0b - 1] = "Bestlink Systems",
|
[1][0x0b - 1] = "Bestlink Systems",
|
||||||
[1][0x0c - 1] = "Graychip",
|
[1][0x0c - 1] = "Graychip",
|
||||||
[1][0x0d - 1] = "GENNUM",
|
[1][0x0d - 1] = "GENNUM",
|
||||||
[1][0x0e - 1] = "VideoLogic",
|
[1][0x0e - 1] = "Imagination Technologies Limited",
|
||||||
[1][0x0f - 1] = "Robert Bosch",
|
[1][0x0f - 1] = "Robert Bosch",
|
||||||
[1][0x10 - 1] = "Chip Express",
|
[1][0x10 - 1] = "Chip Express",
|
||||||
[1][0x11 - 1] = "DATARAM",
|
[1][0x11 - 1] = "DATARAM",
|
||||||
@@ -1501,7 +1501,7 @@
|
|||||||
[11][0x67 - 1] = "Guangzhou Shuvrwine Technology Co",
|
[11][0x67 - 1] = "Guangzhou Shuvrwine Technology Co",
|
||||||
[11][0x68 - 1] = "Shenzhen Hangshun Chip Technology",
|
[11][0x68 - 1] = "Shenzhen Hangshun Chip Technology",
|
||||||
[11][0x69 - 1] = "Chengboliwei Electronic Business",
|
[11][0x69 - 1] = "Chengboliwei Electronic Business",
|
||||||
[11][0x6a - 1] = "Kowin Memory Technology Co Ltd",
|
[11][0x6a - 1] = "Kowin Technology HK Limited",
|
||||||
[11][0x6b - 1] = "Euronet Technology Inc",
|
[11][0x6b - 1] = "Euronet Technology Inc",
|
||||||
[11][0x6c - 1] = "SCY",
|
[11][0x6c - 1] = "SCY",
|
||||||
[11][0x6d - 1] = "Shenzhen Xinhongyusheng Electrical",
|
[11][0x6d - 1] = "Shenzhen Xinhongyusheng Electrical",
|
||||||
@@ -1705,4 +1705,85 @@
|
|||||||
[13][0x37 - 1] = "ORICO Technologies Co. Ltd.",
|
[13][0x37 - 1] = "ORICO Technologies Co. Ltd.",
|
||||||
[13][0x38 - 1] = "Space Exploration Technologies Corp",
|
[13][0x38 - 1] = "Space Exploration Technologies Corp",
|
||||||
[13][0x39 - 1] = "AONDEVICES Inc",
|
[13][0x39 - 1] = "AONDEVICES Inc",
|
||||||
|
[13][0x3a - 1] = "Shenzhen Netforward Micro Electronic",
|
||||||
|
[13][0x3b - 1] = "Syntacore Ltd",
|
||||||
|
[13][0x3c - 1] = "Shenzhen Secmem Microelectronics Co",
|
||||||
|
[13][0x3d - 1] = "ONiO As",
|
||||||
|
[13][0x3e - 1] = "Shenzhen Peladn Technology Co Ltd",
|
||||||
|
[13][0x3f - 1] = "O-Cubes Shanghai Microelectronics",
|
||||||
|
[13][0x40 - 1] = "ASTC",
|
||||||
|
[13][0x41 - 1] = "UMIS",
|
||||||
|
[13][0x42 - 1] = "Paradromics",
|
||||||
|
[13][0x43 - 1] = "Sinh Micro Co Ltd",
|
||||||
|
[13][0x44 - 1] = "Metorage Semiconductor Technology Co",
|
||||||
|
[13][0x45 - 1] = "Aeva Inc",
|
||||||
|
[13][0x46 - 1] = "HongKong Hyunion Electronics Co Ltd",
|
||||||
|
[13][0x47 - 1] = "China Flash Co Ltd",
|
||||||
|
[13][0x48 - 1] = "Sunplus Technology Co Ltd",
|
||||||
|
[13][0x49 - 1] = "Idaho Scientific",
|
||||||
|
[13][0x4a - 1] = "Suzhou SF Micro Electronics Co Ltd",
|
||||||
|
[13][0x4b - 1] = "IMEX Cap AG",
|
||||||
|
[13][0x4c - 1] = "Fitipower Integrated Technology Co Ltd",
|
||||||
|
[13][0x4d - 1] = "ShenzhenWooacme Technology Co Ltd",
|
||||||
|
[13][0x4e - 1] = "KeepData Original Chips",
|
||||||
|
[13][0x4f - 1] = "Rivos Inc",
|
||||||
|
[13][0x50 - 1] = "Big Innovation Company Limited",
|
||||||
|
[13][0x51 - 1] = "Wuhan YuXin Semiconductor Co Ltd",
|
||||||
|
[13][0x52 - 1] = "United Memory Technology (Jiangsu)",
|
||||||
|
[13][0x53 - 1] = "PQShield Ltd",
|
||||||
|
[13][0x54 - 1] = "ArchiTek Corporation",
|
||||||
|
[13][0x55 - 1] = "ShenZhen AZW Technology Co Ltd",
|
||||||
|
[13][0x56 - 1] = "Hengchi Zhixin (Dongguan) Technology",
|
||||||
|
[13][0x57 - 1] = "Eggtronic Engineering Spa",
|
||||||
|
[13][0x58 - 1] = "Fusontai Technology",
|
||||||
|
[13][0x59 - 1] = "PULP Platform",
|
||||||
|
[13][0x5a - 1] = "Koitek Electronic Technology (Shenzhen) Co",
|
||||||
|
[13][0x5b - 1] = "Shenzhen Jiteng Network Technology Co",
|
||||||
|
[13][0x5c - 1] = "Aviva Links Inc",
|
||||||
|
[13][0x5d - 1] = "Trilinear Technologies Inc",
|
||||||
|
[13][0x5e - 1] = "Shenzhen Developer Microelectronics Co",
|
||||||
|
[13][0x5f - 1] = "Guangdong OPPO Mobile Telecommunication",
|
||||||
|
[13][0x60 - 1] = "Akeana",
|
||||||
|
[13][0x61 - 1] = "Lyczar",
|
||||||
|
[13][0x62 - 1] = "Shenzhen Qiji Technology Co Ltd",
|
||||||
|
[13][0x63 - 1] = "Shenzhen Shangzhaoyuan Technology",
|
||||||
|
[13][0x64 - 1] = "Han Stor",
|
||||||
|
[13][0x65 - 1] = "China Micro Semicon Co., Ltd.",
|
||||||
|
[13][0x66 - 1] = "Shenzhen Zhuqin Technology Co Ltd",
|
||||||
|
[13][0x67 - 1] = "Shanghai Ningyuan Electronic Technology",
|
||||||
|
[13][0x68 - 1] = "Auradine",
|
||||||
|
[13][0x69 - 1] = "Suzhou Yishuo Electronics Co Ltd",
|
||||||
|
[13][0x6a - 1] = "Faurecia Clarion Electronics",
|
||||||
|
[13][0x6b - 1] = "SiMa Technologies",
|
||||||
|
[13][0x6c - 1] = "CFD Sales Inc",
|
||||||
|
[13][0x6d - 1] = "Suzhou Comay Information Co Ltd",
|
||||||
|
[13][0x6e - 1] = "Yentek",
|
||||||
|
[13][0x6f - 1] = "Qorvo Inc",
|
||||||
|
[13][0x70 - 1] = "Shenzhen Youzhi Computer Technology",
|
||||||
|
[13][0x71 - 1] = "Sychw Technology (Shenzhen) Co Ltd",
|
||||||
|
[13][0x72 - 1] = "MK Founder Technology Co Ltd",
|
||||||
|
[13][0x73 - 1] = "Siliconwaves Technologies Co Ltd",
|
||||||
|
[13][0x74 - 1] = "Hongkong Hyunion Electronics Co Ltd",
|
||||||
|
[13][0x75 - 1] = "Shenzhen Xinxinzhitao Electronics Business",
|
||||||
|
[13][0x76 - 1] = "Shenzhen HenQi Electronic Commerce Co",
|
||||||
|
[13][0x77 - 1] = "Shenzhen Jingyi Technology Co Ltd",
|
||||||
|
[13][0x78 - 1] = "Xiaohua Semiconductor Co. Ltd.",
|
||||||
|
[13][0x79 - 1] = "Shenzhen Dalu Semiconductor Technology",
|
||||||
|
[13][0x7a - 1] = "Shenzhen Ninespeed Electronics Co Ltd",
|
||||||
|
[13][0x7b - 1] = "ICYC Semiconductor Co Ltd",
|
||||||
|
[13][0x7c - 1] = "Shenzhen Jaguar Microsystems Co Ltd",
|
||||||
|
[13][0x7d - 1] = "Beijing EC-Founder Co Ltd",
|
||||||
|
[13][0x7e - 1] = "Shenzhen Taike Industrial Automation Co",
|
||||||
|
[14][0x01 - 1] = "Kalray SA",
|
||||||
|
[14][0x02 - 1] = "Shanghai Iluvatar CoreX Semiconductor Co",
|
||||||
|
[14][0x03 - 1] = "Fungible Inc",
|
||||||
|
[14][0x04 - 1] = "Song Industria E Comercio de Eletronicos",
|
||||||
|
[14][0x05 - 1] = "DreamBig Semiconductor Inc",
|
||||||
|
[14][0x06 - 1] = "ChampTek Electronics Corp",
|
||||||
|
[14][0x07 - 1] = "Fusontai Technology",
|
||||||
|
[14][0x08 - 1] = "Endress Hauser AG",
|
||||||
|
[14][0x09 - 1] = "altec ComputerSysteme GmbH",
|
||||||
|
[14][0x0a - 1] = "UltraRISC Technology (Shanghai) Co Ltd",
|
||||||
|
[14][0x0b - 1] = "Shenzhen Jing Da Kang Technology Co Ltd",
|
||||||
|
[14][0x0c - 1] = "Hangzhou Hongjun Microelectronics Co Ltd",
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ static inline uint16_t be_to_h_u16(const uint8_t *buf)
|
|||||||
return (uint16_t)((uint16_t)buf[1] | (uint16_t)buf[0] << 8);
|
return (uint16_t)((uint16_t)buf[1] | (uint16_t)buf[0] << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u64_to_le(uint8_t *buf, int64_t val)
|
static inline void h_u64_to_le(uint8_t *buf, uint64_t val)
|
||||||
{
|
{
|
||||||
buf[7] = (uint8_t) (val >> 56);
|
buf[7] = (uint8_t) (val >> 56);
|
||||||
buf[6] = (uint8_t) (val >> 48);
|
buf[6] = (uint8_t) (val >> 48);
|
||||||
@@ -163,7 +163,7 @@ static inline void h_u64_to_le(uint8_t *buf, int64_t val)
|
|||||||
buf[0] = (uint8_t) (val >> 0);
|
buf[0] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u64_to_be(uint8_t *buf, int64_t val)
|
static inline void h_u64_to_be(uint8_t *buf, uint64_t val)
|
||||||
{
|
{
|
||||||
buf[0] = (uint8_t) (val >> 56);
|
buf[0] = (uint8_t) (val >> 56);
|
||||||
buf[1] = (uint8_t) (val >> 48);
|
buf[1] = (uint8_t) (val >> 48);
|
||||||
@@ -175,7 +175,7 @@ static inline void h_u64_to_be(uint8_t *buf, int64_t val)
|
|||||||
buf[7] = (uint8_t) (val >> 0);
|
buf[7] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u32_to_le(uint8_t *buf, int val)
|
static inline void h_u32_to_le(uint8_t *buf, uint32_t val)
|
||||||
{
|
{
|
||||||
buf[3] = (uint8_t) (val >> 24);
|
buf[3] = (uint8_t) (val >> 24);
|
||||||
buf[2] = (uint8_t) (val >> 16);
|
buf[2] = (uint8_t) (val >> 16);
|
||||||
@@ -183,7 +183,7 @@ static inline void h_u32_to_le(uint8_t *buf, int val)
|
|||||||
buf[0] = (uint8_t) (val >> 0);
|
buf[0] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u32_to_be(uint8_t *buf, int val)
|
static inline void h_u32_to_be(uint8_t *buf, uint32_t val)
|
||||||
{
|
{
|
||||||
buf[0] = (uint8_t) (val >> 24);
|
buf[0] = (uint8_t) (val >> 24);
|
||||||
buf[1] = (uint8_t) (val >> 16);
|
buf[1] = (uint8_t) (val >> 16);
|
||||||
@@ -191,27 +191,27 @@ static inline void h_u32_to_be(uint8_t *buf, int val)
|
|||||||
buf[3] = (uint8_t) (val >> 0);
|
buf[3] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u24_to_le(uint8_t *buf, int val)
|
static inline void h_u24_to_le(uint8_t *buf, unsigned int val)
|
||||||
{
|
{
|
||||||
buf[2] = (uint8_t) (val >> 16);
|
buf[2] = (uint8_t) (val >> 16);
|
||||||
buf[1] = (uint8_t) (val >> 8);
|
buf[1] = (uint8_t) (val >> 8);
|
||||||
buf[0] = (uint8_t) (val >> 0);
|
buf[0] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u24_to_be(uint8_t *buf, int val)
|
static inline void h_u24_to_be(uint8_t *buf, unsigned int val)
|
||||||
{
|
{
|
||||||
buf[0] = (uint8_t) (val >> 16);
|
buf[0] = (uint8_t) (val >> 16);
|
||||||
buf[1] = (uint8_t) (val >> 8);
|
buf[1] = (uint8_t) (val >> 8);
|
||||||
buf[2] = (uint8_t) (val >> 0);
|
buf[2] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u16_to_le(uint8_t *buf, int val)
|
static inline void h_u16_to_le(uint8_t *buf, uint16_t val)
|
||||||
{
|
{
|
||||||
buf[1] = (uint8_t) (val >> 8);
|
buf[1] = (uint8_t) (val >> 8);
|
||||||
buf[0] = (uint8_t) (val >> 0);
|
buf[0] = (uint8_t) (val >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void h_u16_to_be(uint8_t *buf, int val)
|
static inline void h_u16_to_be(uint8_t *buf, uint16_t val)
|
||||||
{
|
{
|
||||||
buf[0] = (uint8_t) (val >> 8);
|
buf[0] = (uint8_t) (val >> 8);
|
||||||
buf[1] = (uint8_t) (val >> 0);
|
buf[1] = (uint8_t) (val >> 0);
|
||||||
|
|||||||
@@ -776,17 +776,12 @@ static int armjtagew_usb_read(struct armjtagew *armjtagew, int exp_in_length)
|
|||||||
|
|
||||||
static void armjtagew_debug_buffer(uint8_t *buffer, int length)
|
static void armjtagew_debug_buffer(uint8_t *buffer, int length)
|
||||||
{
|
{
|
||||||
char line[81];
|
char line[8 + 3 * BYTES_PER_LINE + 1];
|
||||||
char s[4];
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
for (i = 0; i < length; i += BYTES_PER_LINE) {
|
for (int i = 0; i < length; i += BYTES_PER_LINE) {
|
||||||
snprintf(line, 5, "%04x", i);
|
int n = snprintf(line, 9, "%04x", i);
|
||||||
for (j = i; j < i + BYTES_PER_LINE && j < length; j++) {
|
for (int j = i; j < i + BYTES_PER_LINE && j < length; j++)
|
||||||
snprintf(s, 4, " %02x", buffer[j]);
|
n += snprintf(line + n, 4, " %02x", buffer[j]);
|
||||||
strcat(line, s);
|
|
||||||
}
|
|
||||||
LOG_DEBUG("%s", line);
|
LOG_DEBUG("%s", line);
|
||||||
|
|
||||||
/* Prevent GDB timeout (writing to log might take some time) */
|
/* Prevent GDB timeout (writing to log might take some time) */
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ static int cmsis_dap_cmd_dap_swo_baudrate(
|
|||||||
command[0] = CMD_DAP_SWO_BAUDRATE;
|
command[0] = CMD_DAP_SWO_BAUDRATE;
|
||||||
h_u32_to_le(&command[1], in_baudrate);
|
h_u32_to_le(&command[1], in_baudrate);
|
||||||
|
|
||||||
int retval = cmsis_dap_xfer(cmsis_dap_handle, 4);
|
int retval = cmsis_dap_xfer(cmsis_dap_handle, 5);
|
||||||
uint32_t rvbr = le_to_h_u32(&cmsis_dap_handle->response[1]);
|
uint32_t rvbr = le_to_h_u32(&cmsis_dap_handle->response[1]);
|
||||||
if (retval != ERROR_OK || rvbr == 0) {
|
if (retval != ERROR_OK || rvbr == 0) {
|
||||||
LOG_ERROR("CMSIS-DAP: command CMD_SWO_Baudrate(%u) -> %u failed.", in_baudrate, rvbr);
|
LOG_ERROR("CMSIS-DAP: command CMD_SWO_Baudrate(%u) -> %u failed.", in_baudrate, rvbr);
|
||||||
|
|||||||
@@ -262,8 +262,10 @@ static int cmsis_dap_usb_open(struct cmsis_dap *dap, uint16_t vids[], uint16_t p
|
|||||||
/* If the interface is reliably identified
|
/* If the interface is reliably identified
|
||||||
* then we need not insist on setting USB class, subclass and protocol
|
* then we need not insist on setting USB class, subclass and protocol
|
||||||
* exactly as the specification requires.
|
* exactly as the specification requires.
|
||||||
|
* Just filter out the well known classes, mainly CDC and MSC.
|
||||||
* At least KitProg3 uses class 0 contrary to the specification */
|
* At least KitProg3 uses class 0 contrary to the specification */
|
||||||
if (intf_identified_reliably) {
|
if (intf_identified_reliably &&
|
||||||
|
(intf_desc->bInterfaceClass == 0 || intf_desc->bInterfaceClass > 0x12)) {
|
||||||
LOG_WARNING("Using CMSIS-DAPv2 interface %d with wrong class %" PRId8
|
LOG_WARNING("Using CMSIS-DAPv2 interface %d with wrong class %" PRId8
|
||||||
" subclass %" PRId8 " or protocol %" PRId8,
|
" subclass %" PRId8 " or protocol %" PRId8,
|
||||||
interface_num,
|
interface_num,
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
#include "bitq.h"
|
#include "bitq.h"
|
||||||
#include "libusb_helper.h"
|
#include "libusb_helper.h"
|
||||||
|
|
||||||
#define __packed __attribute__((packed))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Holy Crap, it's protocol documentation, and it's even vendor-provided!
|
Holy Crap, it's protocol documentation, and it's even vendor-provided!
|
||||||
|
|
||||||
@@ -110,7 +108,7 @@ descriptor.
|
|||||||
struct jtag_proto_caps_hdr {
|
struct jtag_proto_caps_hdr {
|
||||||
uint8_t proto_ver; /* Protocol version. Expects JTAG_PROTO_CAPS_VER for now. */
|
uint8_t proto_ver; /* Protocol version. Expects JTAG_PROTO_CAPS_VER for now. */
|
||||||
uint8_t length; /* of this plus any following descriptors */
|
uint8_t length; /* of this plus any following descriptors */
|
||||||
} __packed;
|
} __attribute__((packed));
|
||||||
|
|
||||||
/* start of the descriptor headers */
|
/* start of the descriptor headers */
|
||||||
#define JTAG_BUILTIN_DESCR_START_OFF 0 /* Devices with builtin usb jtag */
|
#define JTAG_BUILTIN_DESCR_START_OFF 0 /* Devices with builtin usb jtag */
|
||||||
@@ -133,7 +131,7 @@ of caps header to assume this. If no such caps exist, assume a minimum (in) buff
|
|||||||
struct jtag_gen_hdr {
|
struct jtag_gen_hdr {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
} __packed;
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct jtag_proto_caps_speed_apb {
|
struct jtag_proto_caps_speed_apb {
|
||||||
uint8_t type; /* Type, always JTAG_PROTO_CAPS_SPEED_APB_TYPE */
|
uint8_t type; /* Type, always JTAG_PROTO_CAPS_SPEED_APB_TYPE */
|
||||||
@@ -141,7 +139,7 @@ struct jtag_proto_caps_speed_apb {
|
|||||||
uint8_t apb_speed_10khz[2]; /* ABP bus speed, in 10KHz increments. Base speed is half this. */
|
uint8_t apb_speed_10khz[2]; /* ABP bus speed, in 10KHz increments. Base speed is half this. */
|
||||||
uint8_t div_min[2]; /* minimum divisor (to base speed), inclusive */
|
uint8_t div_min[2]; /* minimum divisor (to base speed), inclusive */
|
||||||
uint8_t div_max[2]; /* maximum divisor (to base speed), inclusive */
|
uint8_t div_max[2]; /* maximum divisor (to base speed), inclusive */
|
||||||
} __packed;
|
} __attribute__((packed));
|
||||||
|
|
||||||
#define JTAG_PROTO_CAPS_DATA_LEN 255
|
#define JTAG_PROTO_CAPS_DATA_LEN 255
|
||||||
#define JTAG_PROTO_CAPS_SPEED_APB_TYPE 1
|
#define JTAG_PROTO_CAPS_SPEED_APB_TYPE 1
|
||||||
|
|||||||
@@ -796,17 +796,12 @@ int opendous_usb_read(struct opendous_jtag *opendous_jtag)
|
|||||||
|
|
||||||
void opendous_debug_buffer(uint8_t *buffer, int length)
|
void opendous_debug_buffer(uint8_t *buffer, int length)
|
||||||
{
|
{
|
||||||
char line[81];
|
char line[8 + 3 * BYTES_PER_LINE + 1];
|
||||||
char s[4];
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
for (i = 0; i < length; i += BYTES_PER_LINE) {
|
for (int i = 0; i < length; i += BYTES_PER_LINE) {
|
||||||
snprintf(line, 5, "%04x", i);
|
int n = snprintf(line, 9, "%04x", i);
|
||||||
for (j = i; j < i + BYTES_PER_LINE && j < length; j++) {
|
for (int j = i; j < i + BYTES_PER_LINE && j < length; j++)
|
||||||
snprintf(s, 4, " %02x", buffer[j]);
|
n += snprintf(line + n, 4, " %02x", buffer[j]);
|
||||||
strcat(line, s);
|
|
||||||
}
|
|
||||||
LOG_DEBUG("%s", line);
|
LOG_DEBUG("%s", line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1246,7 +1246,7 @@ static const struct command_registration vdebug_command_handlers[] = {
|
|||||||
{
|
{
|
||||||
.name = "mem_path",
|
.name = "mem_path",
|
||||||
.handler = &vdebug_set_mem,
|
.handler = &vdebug_set_mem,
|
||||||
.mode = COMMAND_ANY,
|
.mode = COMMAND_CONFIG,
|
||||||
.help = "set the design memory for the code load",
|
.help = "set the design memory for the code load",
|
||||||
.usage = "<path> <base_address> <size>",
|
.usage = "<path> <base_address> <size>",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1354,11 +1354,13 @@ static void xds110_swd_queue_cmd(uint8_t cmd, uint32_t *value)
|
|||||||
static void xds110_swd_read_reg(uint8_t cmd, uint32_t *value,
|
static void xds110_swd_read_reg(uint8_t cmd, uint32_t *value,
|
||||||
uint32_t ap_delay_clk)
|
uint32_t ap_delay_clk)
|
||||||
{
|
{
|
||||||
|
assert(cmd & SWD_CMD_RNW);
|
||||||
xds110_swd_queue_cmd(cmd, value);
|
xds110_swd_queue_cmd(cmd, value);
|
||||||
}
|
}
|
||||||
static void xds110_swd_write_reg(uint8_t cmd, uint32_t value,
|
static void xds110_swd_write_reg(uint8_t cmd, uint32_t value,
|
||||||
uint32_t ap_delay_clk)
|
uint32_t ap_delay_clk)
|
||||||
{
|
{
|
||||||
|
assert(!(cmd & SWD_CMD_RNW));
|
||||||
xds110_swd_queue_cmd(cmd, &value);
|
xds110_swd_queue_cmd(cmd, &value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -320,6 +320,12 @@ static int threadx_update_threads(struct rtos *rtos)
|
|||||||
rtos->thread_details->thread_name_str = malloc(sizeof(tmp_str));
|
rtos->thread_details->thread_name_str = malloc(sizeof(tmp_str));
|
||||||
strcpy(rtos->thread_details->thread_name_str, tmp_str);
|
strcpy(rtos->thread_details->thread_name_str, tmp_str);
|
||||||
|
|
||||||
|
/* If we just invented thread 1 to represent the current execution, we
|
||||||
|
* need to make sure the RTOS object also claims it's the current thread
|
||||||
|
* so that threadx_get_thread_reg_list() doesn't attempt to read a
|
||||||
|
* thread control block at 0x00000001. */
|
||||||
|
rtos->current_thread = 1;
|
||||||
|
|
||||||
if (thread_list_size == 0) {
|
if (thread_list_size == 0) {
|
||||||
rtos->thread_count = 1;
|
rtos->thread_count = 1;
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
@@ -364,6 +370,10 @@ static int threadx_update_threads(struct rtos *rtos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read the thread name */
|
/* Read the thread name */
|
||||||
|
tmp_str[0] = '\x00';
|
||||||
|
|
||||||
|
/* Check if thread has a valid name */
|
||||||
|
if (name_ptr != 0) {
|
||||||
retval =
|
retval =
|
||||||
target_read_buffer(rtos->target,
|
target_read_buffer(rtos->target,
|
||||||
name_ptr,
|
name_ptr,
|
||||||
@@ -374,6 +384,7 @@ static int threadx_update_threads(struct rtos *rtos)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
tmp_str[THREADX_THREAD_NAME_STR_SIZE - 1] = '\x00';
|
tmp_str[THREADX_THREAD_NAME_STR_SIZE - 1] = '\x00';
|
||||||
|
}
|
||||||
|
|
||||||
if (tmp_str[0] == '\x00')
|
if (tmp_str[0] == '\x00')
|
||||||
strcpy(tmp_str, "No Name");
|
strcpy(tmp_str, "No Name");
|
||||||
|
|||||||
@@ -78,9 +78,11 @@ static int hwthread_fill_thread(struct rtos *rtos, struct target *curr, int thre
|
|||||||
static int hwthread_update_threads(struct rtos *rtos)
|
static int hwthread_update_threads(struct rtos *rtos)
|
||||||
{
|
{
|
||||||
int threads_found = 0;
|
int threads_found = 0;
|
||||||
|
int thread_list_size = 0;
|
||||||
struct target_list *head;
|
struct target_list *head;
|
||||||
struct target *target;
|
struct target *target;
|
||||||
int64_t current_thread = 0;
|
int64_t current_thread = 0;
|
||||||
|
int64_t current_threadid = rtos->current_threadid; /* thread selected by GDB */
|
||||||
enum target_debug_reason current_reason = DBG_REASON_UNDEFINED;
|
enum target_debug_reason current_reason = DBG_REASON_UNDEFINED;
|
||||||
|
|
||||||
if (!rtos)
|
if (!rtos)
|
||||||
@@ -99,13 +101,22 @@ static int hwthread_update_threads(struct rtos *rtos)
|
|||||||
if (!target_was_examined(curr))
|
if (!target_was_examined(curr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
++threads_found;
|
++thread_list_size;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
threads_found = 1;
|
thread_list_size = 1;
|
||||||
|
|
||||||
|
/* restore the threadid which is currently selected by GDB
|
||||||
|
* because rtos_free_threadlist() wipes out it
|
||||||
|
* (GDB thread id is 1-based indexing) */
|
||||||
|
if (current_threadid <= thread_list_size)
|
||||||
|
rtos->current_threadid = current_threadid;
|
||||||
|
else
|
||||||
|
LOG_WARNING("SMP node change, disconnect GDB from core/thread %" PRId64,
|
||||||
|
current_threadid);
|
||||||
|
|
||||||
/* create space for new thread details */
|
/* create space for new thread details */
|
||||||
rtos->thread_details = malloc(sizeof(struct thread_detail) * threads_found);
|
rtos->thread_details = malloc(sizeof(struct thread_detail) * thread_list_size);
|
||||||
|
|
||||||
if (target->smp) {
|
if (target->smp) {
|
||||||
/* loop over all threads */
|
/* loop over all threads */
|
||||||
@@ -170,10 +181,13 @@ static int hwthread_update_threads(struct rtos *rtos)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
threads_found++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hwthread_fill_thread(rtos, target, threads_found);
|
hwthread_fill_thread(rtos, target, threads_found);
|
||||||
current_thread = threadid_from_target(target);
|
current_thread = threadid_from_target(target);
|
||||||
|
threads_found++;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtos->thread_count = threads_found;
|
rtos->thread_count = threads_found;
|
||||||
@@ -251,10 +265,19 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
|
|||||||
for (int i = 0; i < reg_list_size; i++) {
|
for (int i = 0; i < reg_list_size; i++) {
|
||||||
if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden)
|
if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden)
|
||||||
continue;
|
continue;
|
||||||
(*rtos_reg_list)[j].number = (*reg_list)[i].number;
|
if (!reg_list[i]->valid) {
|
||||||
(*rtos_reg_list)[j].size = (*reg_list)[i].size;
|
retval = reg_list[i]->type->get(reg_list[i]);
|
||||||
memcpy((*rtos_reg_list)[j].value, (*reg_list)[i].value,
|
if (retval != ERROR_OK) {
|
||||||
((*reg_list)[i].size + 7) / 8);
|
LOG_ERROR("Couldn't get register %s.", reg_list[i]->name);
|
||||||
|
free(reg_list);
|
||||||
|
free(*rtos_reg_list);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(*rtos_reg_list)[j].number = reg_list[i]->number;
|
||||||
|
(*rtos_reg_list)[j].size = reg_list[i]->size;
|
||||||
|
memcpy((*rtos_reg_list)[j].value, reg_list[i]->value,
|
||||||
|
DIV_ROUND_UP(reg_list[i]->size, 8));
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
free(reg_list);
|
free(reg_list);
|
||||||
|
|||||||
@@ -2546,11 +2546,7 @@ static int aarch64_examine_first(struct target *target)
|
|||||||
if (!pc)
|
if (!pc)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
|
||||||
if (armv8->debug_ap) {
|
if (!armv8->debug_ap) {
|
||||||
dap_put_ap(armv8->debug_ap);
|
|
||||||
armv8->debug_ap = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pc->adiv5_config.ap_num == DP_APSEL_INVALID) {
|
if (pc->adiv5_config.ap_num == DP_APSEL_INVALID) {
|
||||||
/* Search for the APB-AB */
|
/* Search for the APB-AB */
|
||||||
retval = dap_find_get_ap(swjdp, AP_TYPE_APB_AP, &armv8->debug_ap);
|
retval = dap_find_get_ap(swjdp, AP_TYPE_APB_AP, &armv8->debug_ap);
|
||||||
@@ -2565,6 +2561,7 @@ static int aarch64_examine_first(struct target *target)
|
|||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
retval = mem_ap_init(armv8->debug_ap);
|
retval = mem_ap_init(armv8->debug_ap);
|
||||||
if (retval != ERROR_OK) {
|
if (retval != ERROR_OK) {
|
||||||
|
|||||||
@@ -116,27 +116,27 @@ static const struct {
|
|||||||
{ ARMV7M_FAULTMASK, "faultmask", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV7M_FAULTMASK, "faultmask", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
||||||
{ ARMV7M_CONTROL, "control", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV7M_CONTROL, "control", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
||||||
|
|
||||||
/* ARMv8-M specific registers */
|
/* ARMv8-M security extension (TrustZone) specific registers */
|
||||||
{ ARMV8M_MSP_NS, "msp_ns", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_MSP_NS, "msp_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_PSP_NS, "psp_ns", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_PSP_NS, "psp_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_MSP_S, "msp_s", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_MSP_S, "msp_s", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_PSP_S, "psp_s", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_PSP_S, "psp_s", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_MSPLIM_S, "msplim_s", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_MSPLIM_S, "msplim_s", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_PSPLIM_S, "psplim_s", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_PSPLIM_S, "psplim_s", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_MSPLIM_NS, "msplim_ns", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_MSPLIM_NS, "msplim_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_PSPLIM_NS, "psplim_ns", 32, REG_TYPE_DATA_PTR, "stack", "v8-m.sp" },
|
{ ARMV8M_PSPLIM_NS, "psplim_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext" },
|
||||||
|
|
||||||
{ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_S, "pmsk_bpri_fltmsk_ctrl_s", 32, REG_TYPE_INT, NULL, NULL },
|
{ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_S, "pmsk_bpri_fltmsk_ctrl_s", 32, REG_TYPE_INT, NULL, NULL },
|
||||||
{ ARMV8M_PRIMASK_S, "primask_s", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_PRIMASK_S, "primask_s", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_BASEPRI_S, "basepri_s", 8, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_BASEPRI_S, "basepri_s", 8, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_FAULTMASK_S, "faultmask_s", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_FAULTMASK_S, "faultmask_s", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_CONTROL_S, "control_s", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_CONTROL_S, "control_s", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
|
|
||||||
{ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_NS, "pmsk_bpri_fltmsk_ctrl_ns", 32, REG_TYPE_INT, NULL, NULL },
|
{ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_NS, "pmsk_bpri_fltmsk_ctrl_ns", 32, REG_TYPE_INT, NULL, NULL },
|
||||||
{ ARMV8M_PRIMASK_NS, "primask_ns", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_PRIMASK_NS, "primask_ns", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_BASEPRI_NS, "basepri_ns", 8, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_BASEPRI_NS, "basepri_ns", 8, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_FAULTMASK_NS, "faultmask_ns", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_FAULTMASK_NS, "faultmask_ns", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
{ ARMV8M_CONTROL_NS, "control_ns", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system" },
|
{ ARMV8M_CONTROL_NS, "control_ns", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.secext" },
|
||||||
|
|
||||||
/* FPU registers */
|
/* FPU registers */
|
||||||
{ ARMV7M_D0, "d0", 64, REG_TYPE_IEEE_DOUBLE, "float", "org.gnu.gdb.arm.vfp" },
|
{ ARMV7M_D0, "d0", 64, REG_TYPE_IEEE_DOUBLE, "float", "org.gnu.gdb.arm.vfp" },
|
||||||
@@ -529,6 +529,9 @@ int armv7m_start_algorithm(struct target *target,
|
|||||||
/* Store all non-debug execution registers to armv7m_algorithm_info context */
|
/* Store all non-debug execution registers to armv7m_algorithm_info context */
|
||||||
for (unsigned i = 0; i < armv7m->arm.core_cache->num_regs; i++) {
|
for (unsigned i = 0; i < armv7m->arm.core_cache->num_regs; i++) {
|
||||||
struct reg *reg = &armv7m->arm.core_cache->reg_list[i];
|
struct reg *reg = &armv7m->arm.core_cache->reg_list[i];
|
||||||
|
if (!reg->exist)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!reg->valid)
|
if (!reg->valid)
|
||||||
armv7m_get_core_reg(reg);
|
armv7m_get_core_reg(reg);
|
||||||
|
|
||||||
@@ -688,16 +691,19 @@ int armv7m_wait_algorithm(struct target *target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = armv7m->arm.core_cache->num_regs - 1; i >= 0; i--) {
|
for (int i = armv7m->arm.core_cache->num_regs - 1; i >= 0; i--) {
|
||||||
|
struct reg *reg = &armv7m->arm.core_cache->reg_list[i];
|
||||||
|
if (!reg->exist)
|
||||||
|
continue;
|
||||||
|
|
||||||
uint32_t regvalue;
|
uint32_t regvalue;
|
||||||
regvalue = buf_get_u32(armv7m->arm.core_cache->reg_list[i].value, 0, 32);
|
regvalue = buf_get_u32(reg->value, 0, 32);
|
||||||
if (regvalue != armv7m_algorithm_info->context[i]) {
|
if (regvalue != armv7m_algorithm_info->context[i]) {
|
||||||
LOG_DEBUG("restoring register %s with value 0x%8.8" PRIx32,
|
LOG_DEBUG("restoring register %s with value 0x%8.8" PRIx32,
|
||||||
armv7m->arm.core_cache->reg_list[i].name,
|
reg->name, armv7m_algorithm_info->context[i]);
|
||||||
armv7m_algorithm_info->context[i]);
|
buf_set_u32(reg->value,
|
||||||
buf_set_u32(armv7m->arm.core_cache->reg_list[i].value,
|
|
||||||
0, 32, armv7m_algorithm_info->context[i]);
|
0, 32, armv7m_algorithm_info->context[i]);
|
||||||
armv7m->arm.core_cache->reg_list[i].valid = true;
|
reg->valid = true;
|
||||||
armv7m->arm.core_cache->reg_list[i].dirty = true;
|
reg->dirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2246,7 +2246,7 @@ static int cortex_a_write_cpu_memory(struct target *target,
|
|||||||
/* Switch to non-blocking mode if not already in that mode. */
|
/* Switch to non-blocking mode if not already in that mode. */
|
||||||
retval = cortex_a_set_dcc_mode(target, DSCR_EXT_DCC_NON_BLOCKING, &dscr);
|
retval = cortex_a_set_dcc_mode(target, DSCR_EXT_DCC_NON_BLOCKING, &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
/* Mark R0 as dirty. */
|
/* Mark R0 as dirty. */
|
||||||
arm_reg_current(arm, 0)->dirty = true;
|
arm_reg_current(arm, 0)->dirty = true;
|
||||||
@@ -2254,16 +2254,16 @@ static int cortex_a_write_cpu_memory(struct target *target,
|
|||||||
/* Read DFAR and DFSR, as they will be modified in the event of a fault. */
|
/* Read DFAR and DFSR, as they will be modified in the event of a fault. */
|
||||||
retval = cortex_a_read_dfar_dfsr(target, &orig_dfar, &orig_dfsr, &dscr);
|
retval = cortex_a_read_dfar_dfsr(target, &orig_dfar, &orig_dfsr, &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
/* Get the memory address into R0. */
|
/* Get the memory address into R0. */
|
||||||
retval = mem_ap_write_atomic_u32(armv7a->debug_ap,
|
retval = mem_ap_write_atomic_u32(armv7a->debug_ap,
|
||||||
armv7a->debug_base + CPUDBG_DTRRX, address);
|
armv7a->debug_base + CPUDBG_DTRRX, address);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
retval = cortex_a_exec_opcode(target, ARMV4_5_MRC(14, 0, 0, 0, 5, 0), &dscr);
|
retval = cortex_a_exec_opcode(target, ARMV4_5_MRC(14, 0, 0, 0, 5, 0), &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
if (size == 4 && (address % 4) == 0) {
|
if (size == 4 && (address % 4) == 0) {
|
||||||
/* We are doing a word-aligned transfer, so use fast mode. */
|
/* We are doing a word-aligned transfer, so use fast mode. */
|
||||||
@@ -2288,7 +2288,6 @@ static int cortex_a_write_cpu_memory(struct target *target,
|
|||||||
retval = cortex_a_write_cpu_memory_slow(target, size, count, buffer, &dscr);
|
retval = cortex_a_write_cpu_memory_slow(target, size, count, buffer, &dscr);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
final_retval = retval;
|
final_retval = retval;
|
||||||
|
|
||||||
/* Switch to non-blocking mode if not already in that mode. */
|
/* Switch to non-blocking mode if not already in that mode. */
|
||||||
@@ -2564,7 +2563,7 @@ static int cortex_a_read_cpu_memory(struct target *target,
|
|||||||
/* Switch to non-blocking mode if not already in that mode. */
|
/* Switch to non-blocking mode if not already in that mode. */
|
||||||
retval = cortex_a_set_dcc_mode(target, DSCR_EXT_DCC_NON_BLOCKING, &dscr);
|
retval = cortex_a_set_dcc_mode(target, DSCR_EXT_DCC_NON_BLOCKING, &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
/* Mark R0 as dirty. */
|
/* Mark R0 as dirty. */
|
||||||
arm_reg_current(arm, 0)->dirty = true;
|
arm_reg_current(arm, 0)->dirty = true;
|
||||||
@@ -2572,16 +2571,16 @@ static int cortex_a_read_cpu_memory(struct target *target,
|
|||||||
/* Read DFAR and DFSR, as they will be modified in the event of a fault. */
|
/* Read DFAR and DFSR, as they will be modified in the event of a fault. */
|
||||||
retval = cortex_a_read_dfar_dfsr(target, &orig_dfar, &orig_dfsr, &dscr);
|
retval = cortex_a_read_dfar_dfsr(target, &orig_dfar, &orig_dfsr, &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
/* Get the memory address into R0. */
|
/* Get the memory address into R0. */
|
||||||
retval = mem_ap_write_atomic_u32(armv7a->debug_ap,
|
retval = mem_ap_write_atomic_u32(armv7a->debug_ap,
|
||||||
armv7a->debug_base + CPUDBG_DTRRX, address);
|
armv7a->debug_base + CPUDBG_DTRRX, address);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
retval = cortex_a_exec_opcode(target, ARMV4_5_MRC(14, 0, 0, 0, 5, 0), &dscr);
|
retval = cortex_a_exec_opcode(target, ARMV4_5_MRC(14, 0, 0, 0, 5, 0), &dscr);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
goto out;
|
return retval;
|
||||||
|
|
||||||
if (size == 4 && (address % 4) == 0) {
|
if (size == 4 && (address % 4) == 0) {
|
||||||
/* We are doing a word-aligned transfer, so use fast mode. */
|
/* We are doing a word-aligned transfer, so use fast mode. */
|
||||||
@@ -2607,7 +2606,6 @@ static int cortex_a_read_cpu_memory(struct target *target,
|
|||||||
retval = cortex_a_read_cpu_memory_slow(target, size, count, buffer, &dscr);
|
retval = cortex_a_read_cpu_memory_slow(target, size, count, buffer, &dscr);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
final_retval = retval;
|
final_retval = retval;
|
||||||
|
|
||||||
/* Switch to non-blocking mode if not already in that mode. */
|
/* Switch to non-blocking mode if not already in that mode. */
|
||||||
@@ -2874,11 +2872,7 @@ static int cortex_a_examine_first(struct target *target)
|
|||||||
int retval = ERROR_OK;
|
int retval = ERROR_OK;
|
||||||
uint32_t didr, cpuid, dbg_osreg, dbg_idpfr1;
|
uint32_t didr, cpuid, dbg_osreg, dbg_idpfr1;
|
||||||
|
|
||||||
if (armv7a->debug_ap) {
|
if (!armv7a->debug_ap) {
|
||||||
dap_put_ap(armv7a->debug_ap);
|
|
||||||
armv7a->debug_ap = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pc->ap_num == DP_APSEL_INVALID) {
|
if (pc->ap_num == DP_APSEL_INVALID) {
|
||||||
/* Search for the APB-AP - it is needed for access to debug registers */
|
/* Search for the APB-AP - it is needed for access to debug registers */
|
||||||
retval = dap_find_get_ap(swjdp, AP_TYPE_APB_AP, &armv7a->debug_ap);
|
retval = dap_find_get_ap(swjdp, AP_TYPE_APB_AP, &armv7a->debug_ap);
|
||||||
@@ -2893,6 +2887,7 @@ static int cortex_a_examine_first(struct target *target)
|
|||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
retval = mem_ap_init(armv7a->debug_ap);
|
retval = mem_ap_init(armv7a->debug_ap);
|
||||||
if (retval != ERROR_OK) {
|
if (retval != ERROR_OK) {
|
||||||
|
|||||||
@@ -879,16 +879,6 @@ static int cortex_m_poll(struct target *target)
|
|||||||
struct cortex_m_common *cortex_m = target_to_cm(target);
|
struct cortex_m_common *cortex_m = target_to_cm(target);
|
||||||
struct armv7m_common *armv7m = &cortex_m->armv7m;
|
struct armv7m_common *armv7m = &cortex_m->armv7m;
|
||||||
|
|
||||||
/* Check if debug_ap is available to prevent segmentation fault.
|
|
||||||
* If the re-examination after an error does not find a MEM-AP
|
|
||||||
* (e.g. the target stopped communicating), debug_ap pointer
|
|
||||||
* can suddenly become NULL.
|
|
||||||
*/
|
|
||||||
if (!armv7m->debug_ap) {
|
|
||||||
target->state = TARGET_UNKNOWN;
|
|
||||||
return ERROR_TARGET_NOT_EXAMINED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read from Debug Halting Control and Status Register */
|
/* Read from Debug Halting Control and Status Register */
|
||||||
retval = cortex_m_read_dhcsr_atomic_sticky(target);
|
retval = cortex_m_read_dhcsr_atomic_sticky(target);
|
||||||
if (retval != ERROR_OK) {
|
if (retval != ERROR_OK) {
|
||||||
@@ -2280,6 +2270,22 @@ static void cortex_m_dwt_free(struct target *target)
|
|||||||
cm->dwt_cache = NULL;
|
cm->dwt_cache = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool cortex_m_has_tz(struct target *target)
|
||||||
|
{
|
||||||
|
struct armv7m_common *armv7m = target_to_armv7m(target);
|
||||||
|
uint32_t dauthstatus;
|
||||||
|
|
||||||
|
if (armv7m->arm.arch != ARM_ARCH_V8M)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int retval = target_read_u32(target, DAUTHSTATUS, &dauthstatus);
|
||||||
|
if (retval != ERROR_OK) {
|
||||||
|
LOG_WARNING("Error reading DAUTHSTATUS register");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return (dauthstatus & DAUTHSTATUS_SID_MASK) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
#define MVFR0 0xe000ef40
|
#define MVFR0 0xe000ef40
|
||||||
#define MVFR1 0xe000ef44
|
#define MVFR1 0xe000ef44
|
||||||
|
|
||||||
@@ -2311,11 +2317,7 @@ int cortex_m_examine(struct target *target)
|
|||||||
/* hla_target shares the examine handler but does not support
|
/* hla_target shares the examine handler but does not support
|
||||||
* all its calls */
|
* all its calls */
|
||||||
if (!armv7m->is_hla_target) {
|
if (!armv7m->is_hla_target) {
|
||||||
if (armv7m->debug_ap) {
|
if (!armv7m->debug_ap) {
|
||||||
dap_put_ap(armv7m->debug_ap);
|
|
||||||
armv7m->debug_ap = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cortex_m->apsel == DP_APSEL_INVALID) {
|
if (cortex_m->apsel == DP_APSEL_INVALID) {
|
||||||
/* Search for the MEM-AP */
|
/* Search for the MEM-AP */
|
||||||
retval = cortex_m_find_mem_ap(swjdp, &armv7m->debug_ap);
|
retval = cortex_m_find_mem_ap(swjdp, &armv7m->debug_ap);
|
||||||
@@ -2330,6 +2332,7 @@ int cortex_m_examine(struct target *target)
|
|||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
armv7m->debug_ap->memaccess_tck = 8;
|
armv7m->debug_ap->memaccess_tck = 8;
|
||||||
|
|
||||||
@@ -2411,7 +2414,7 @@ int cortex_m_examine(struct target *target)
|
|||||||
for (size_t idx = ARMV7M_FPU_FIRST_REG; idx <= ARMV7M_FPU_LAST_REG; idx++)
|
for (size_t idx = ARMV7M_FPU_FIRST_REG; idx <= ARMV7M_FPU_LAST_REG; idx++)
|
||||||
armv7m->arm.core_cache->reg_list[idx].exist = false;
|
armv7m->arm.core_cache->reg_list[idx].exist = false;
|
||||||
|
|
||||||
if (armv7m->arm.arch != ARM_ARCH_V8M)
|
if (!cortex_m_has_tz(target))
|
||||||
for (size_t idx = ARMV8M_FIRST_REG; idx <= ARMV8M_LAST_REG; idx++)
|
for (size_t idx = ARMV8M_FIRST_REG; idx <= ARMV8M_LAST_REG; idx++)
|
||||||
armv7m->arm.core_cache->reg_list[idx].exist = false;
|
armv7m->arm.core_cache->reg_list[idx].exist = false;
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ struct cortex_m_part_info {
|
|||||||
#define DCB_DEMCR 0xE000EDFC
|
#define DCB_DEMCR 0xE000EDFC
|
||||||
#define DCB_DSCSR 0xE000EE08
|
#define DCB_DSCSR 0xE000EE08
|
||||||
|
|
||||||
|
#define DAUTHSTATUS 0xE000EFB8
|
||||||
|
#define DAUTHSTATUS_SID_MASK 0x00000030
|
||||||
|
|
||||||
#define DCRSR_WNR BIT(16)
|
#define DCRSR_WNR BIT(16)
|
||||||
|
|
||||||
#define DWT_CTRL 0xE0001000
|
#define DWT_CTRL 0xE0001000
|
||||||
|
|||||||
@@ -2200,8 +2200,8 @@ int dsp5680xx_f_lock(struct target *target)
|
|||||||
struct jtag_tap *tap_chp;
|
struct jtag_tap *tap_chp;
|
||||||
|
|
||||||
struct jtag_tap *tap_cpu;
|
struct jtag_tap *tap_cpu;
|
||||||
uint16_t lock_word[] = { HFM_LOCK_FLASH };
|
uint16_t lock_word = HFM_LOCK_FLASH;
|
||||||
retval = dsp5680xx_f_wr(target, (uint8_t *) (lock_word), HFM_LOCK_ADDR_L, 2, 1);
|
retval = dsp5680xx_f_wr(target, (uint8_t *)&lock_word, HFM_LOCK_ADDR_L, 2, 1);
|
||||||
err_check_propagate(retval);
|
err_check_propagate(retval);
|
||||||
|
|
||||||
jtag_add_reset(0, 1);
|
jtag_add_reset(0, 1);
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ static int esirisc_jtag_recv(struct esirisc_jtag *jtag_info,
|
|||||||
int num_in_bytes = DIV_ROUND_UP(num_in_bits, 8);
|
int num_in_bytes = DIV_ROUND_UP(num_in_bits, 8);
|
||||||
|
|
||||||
struct scan_field fields[3];
|
struct scan_field fields[3];
|
||||||
uint8_t r[num_in_bytes * 2];
|
/* prevent zero-size variable length array */
|
||||||
|
int r_size = num_in_bytes ? num_in_bytes * 2 : 1;
|
||||||
|
uint8_t r[r_size];
|
||||||
|
|
||||||
esirisc_jtag_set_instr(jtag_info, INSTR_DEBUG);
|
esirisc_jtag_set_instr(jtag_info, INSTR_DEBUG);
|
||||||
|
|
||||||
|
|||||||
@@ -136,16 +136,13 @@ static int mem_ap_examine(struct target *target)
|
|||||||
struct mem_ap *mem_ap = target->arch_info;
|
struct mem_ap *mem_ap = target->arch_info;
|
||||||
|
|
||||||
if (!target_was_examined(target)) {
|
if (!target_was_examined(target)) {
|
||||||
if (mem_ap->ap) {
|
if (!mem_ap->ap) {
|
||||||
dap_put_ap(mem_ap->ap);
|
|
||||||
mem_ap->ap = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
mem_ap->ap = dap_get_ap(mem_ap->dap, mem_ap->ap_num);
|
mem_ap->ap = dap_get_ap(mem_ap->dap, mem_ap->ap_num);
|
||||||
if (!mem_ap->ap) {
|
if (!mem_ap->ap) {
|
||||||
LOG_ERROR("Cannot get AP");
|
LOG_ERROR("Cannot get AP");
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
target_set_examined(target);
|
target_set_examined(target);
|
||||||
target->state = TARGET_UNKNOWN;
|
target->state = TARGET_UNKNOWN;
|
||||||
target->debug_reason = DBG_REASON_UNDEFINED;
|
target->debug_reason = DBG_REASON_UNDEFINED;
|
||||||
|
|||||||
@@ -900,7 +900,7 @@ static int mips_m4k_set_watchpoint(struct target *target,
|
|||||||
LOG_ERROR("BUG: watchpoint->rw neither read, write nor access");
|
LOG_ERROR("BUG: watchpoint->rw neither read, write nor access");
|
||||||
}
|
}
|
||||||
|
|
||||||
watchpoint->number = wp_num;
|
watchpoint_set(watchpoint, wp_num);
|
||||||
comparator_list[wp_num].used = 1;
|
comparator_list[wp_num].used = 1;
|
||||||
comparator_list[wp_num].bp_value = watchpoint->address;
|
comparator_list[wp_num].bp_value = watchpoint->address;
|
||||||
|
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ static int or1k_adv_jtag_write_memory(struct or1k_jtag *jtag_info,
|
|||||||
void *t = NULL;
|
void *t = NULL;
|
||||||
struct target *target = jtag_info->target;
|
struct target *target = jtag_info->target;
|
||||||
if ((target->endianness == TARGET_BIG_ENDIAN) && (size != 1)) {
|
if ((target->endianness == TARGET_BIG_ENDIAN) && (size != 1)) {
|
||||||
t = malloc(count * size * sizeof(uint8_t));
|
t = calloc(count * size, sizeof(uint8_t));
|
||||||
if (!t) {
|
if (!t) {
|
||||||
LOG_ERROR("Out of memory");
|
LOG_ERROR("Out of memory");
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
@@ -947,6 +947,9 @@ static int or1k_adv_jtag_write_memory(struct or1k_jtag *jtag_info,
|
|||||||
case 2:
|
case 2:
|
||||||
buf_bswap16(t, buffer, size * count);
|
buf_bswap16(t, buffer, size * count);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
free(t);
|
||||||
|
return ERROR_TARGET_FAILURE;
|
||||||
}
|
}
|
||||||
buffer = t;
|
buffer = t;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,43 +241,37 @@ int target_rtt_find_control_block(struct target *target,
|
|||||||
target_addr_t *address, size_t size, const char *id, bool *found,
|
target_addr_t *address, size_t size, const char *id, bool *found,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
|
target_addr_t address_end = *address + size;
|
||||||
uint8_t buf[1024];
|
uint8_t buf[1024];
|
||||||
|
|
||||||
*found = false;
|
*found = false;
|
||||||
|
|
||||||
size_t j = 0;
|
size_t id_matched_length = 0;
|
||||||
size_t cb_offset = 0;
|
|
||||||
const size_t id_length = strlen(id);
|
const size_t id_length = strlen(id);
|
||||||
|
|
||||||
LOG_INFO("rtt: Searching for control block '%s'", id);
|
LOG_INFO("rtt: Searching for control block '%s'", id);
|
||||||
|
|
||||||
for (target_addr_t addr = 0; addr < size; addr = addr + sizeof(buf)) {
|
for (target_addr_t addr = *address; addr < address_end; addr += sizeof(buf)) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
const size_t buf_size = MIN(sizeof(buf), size - addr);
|
const size_t buf_size = MIN(sizeof(buf), address_end - addr);
|
||||||
ret = target_read_buffer(target, *address + addr, buf_size, buf);
|
ret = target_read_buffer(target, addr, buf_size, buf);
|
||||||
|
|
||||||
if (ret != ERROR_OK)
|
if (ret != ERROR_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
size_t start = 0;
|
for (size_t buf_off = 0; buf_off < buf_size; buf_off++) {
|
||||||
size_t i = 0;
|
if (id_matched_length > 0 &&
|
||||||
|
buf[buf_off] != id[id_matched_length]) {
|
||||||
while (i < buf_size) {
|
/* Start from beginning */
|
||||||
if (buf[i] != id[j]) {
|
id_matched_length = 0;
|
||||||
start++;
|
|
||||||
cb_offset++;
|
|
||||||
i = start;
|
|
||||||
j = 0;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
if (buf[buf_off] == id[id_matched_length])
|
||||||
j++;
|
id_matched_length++;
|
||||||
|
|
||||||
if (j == id_length) {
|
if (id_matched_length == id_length) {
|
||||||
*address = *address + cb_offset;
|
*address = addr + buf_off + 1 - id_length;
|
||||||
*found = true;
|
*found = true;
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4251,11 +4251,19 @@ static void write_gmon(uint32_t *samples, uint32_t sample_num, const char *filen
|
|||||||
|
|
||||||
/* max should be (largest sample + 1)
|
/* max should be (largest sample + 1)
|
||||||
* Refer to binutils/gprof/hist.c (find_histogram_for_pc) */
|
* Refer to binutils/gprof/hist.c (find_histogram_for_pc) */
|
||||||
|
if (max < UINT32_MAX)
|
||||||
max++;
|
max++;
|
||||||
|
|
||||||
|
/* gprof requires (max - min) >= 2 */
|
||||||
|
while ((max - min) < 2) {
|
||||||
|
if (max < UINT32_MAX)
|
||||||
|
max++;
|
||||||
|
else
|
||||||
|
min--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int address_space = max - min;
|
uint32_t address_space = max - min;
|
||||||
assert(address_space >= 2);
|
|
||||||
|
|
||||||
/* FIXME: What is the reasonable number of buckets?
|
/* FIXME: What is the reasonable number of buckets?
|
||||||
* The profiling result will be more accurate if there are enough buckets. */
|
* The profiling result will be more accurate if there are enough buckets. */
|
||||||
@@ -4331,6 +4339,19 @@ COMMAND_HANDLER(handle_profile_command)
|
|||||||
|
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], offset);
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], offset);
|
||||||
|
|
||||||
|
uint32_t start_address = 0;
|
||||||
|
uint32_t end_address = 0;
|
||||||
|
bool with_range = false;
|
||||||
|
if (CMD_ARGC == 4) {
|
||||||
|
with_range = true;
|
||||||
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], start_address);
|
||||||
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], end_address);
|
||||||
|
if (start_address > end_address || (end_address - start_address) < 2) {
|
||||||
|
command_print(CMD, "Error: end - start < 2");
|
||||||
|
return ERROR_COMMAND_ARGUMENT_INVALID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t *samples = malloc(sizeof(uint32_t) * MAX_PROFILE_SAMPLE_NUM);
|
uint32_t *samples = malloc(sizeof(uint32_t) * MAX_PROFILE_SAMPLE_NUM);
|
||||||
if (!samples) {
|
if (!samples) {
|
||||||
LOG_ERROR("No memory to store samples.");
|
LOG_ERROR("No memory to store samples.");
|
||||||
@@ -4383,15 +4404,6 @@ COMMAND_HANDLER(handle_profile_command)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t start_address = 0;
|
|
||||||
uint32_t end_address = 0;
|
|
||||||
bool with_range = false;
|
|
||||||
if (CMD_ARGC == 4) {
|
|
||||||
with_range = true;
|
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], start_address);
|
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], end_address);
|
|
||||||
}
|
|
||||||
|
|
||||||
write_gmon(samples, num_of_samples, CMD_ARGV[1],
|
write_gmon(samples, num_of_samples, CMD_ARGV[1],
|
||||||
with_range, start_address, end_address, target, duration_ms);
|
with_range, start_address, end_address, target, duration_ms);
|
||||||
command_print(CMD, "Wrote %s", CMD_ARGV[1]);
|
command_print(CMD, "Wrote %s", CMD_ARGV[1]);
|
||||||
@@ -6433,16 +6445,52 @@ static int jim_target_names(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
|
|||||||
return JIM_OK;
|
return JIM_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct target_list *
|
||||||
|
__attribute__((warn_unused_result))
|
||||||
|
create_target_list_node(Jim_Obj *const name) {
|
||||||
|
int len;
|
||||||
|
const char *targetname = Jim_GetString(name, &len);
|
||||||
|
struct target *target = get_target(targetname);
|
||||||
|
LOG_DEBUG("%s ", targetname);
|
||||||
|
if (!target)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
struct target_list *new = malloc(sizeof(struct target_list));
|
||||||
|
if (!new) {
|
||||||
|
LOG_ERROR("Out of memory");
|
||||||
|
return new;
|
||||||
|
}
|
||||||
|
|
||||||
|
new->target = target;
|
||||||
|
return new;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_target_with_common_rtos_type(struct list_head *lh, struct target **result)
|
||||||
|
{
|
||||||
|
struct target *target = NULL;
|
||||||
|
struct target_list *curr;
|
||||||
|
foreach_smp_target(curr, lh) {
|
||||||
|
struct rtos *curr_rtos = curr->target->rtos;
|
||||||
|
if (curr_rtos) {
|
||||||
|
if (target && target->rtos && target->rtos->type != curr_rtos->type) {
|
||||||
|
LOG_ERROR("Different rtos types in members of one smp target!");
|
||||||
|
return JIM_ERR;
|
||||||
|
}
|
||||||
|
target = curr->target;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*result = target;
|
||||||
|
return JIM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
|
static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
const char *targetname;
|
|
||||||
int retval, len;
|
|
||||||
static int smp_group = 1;
|
static int smp_group = 1;
|
||||||
struct target *target = NULL;
|
|
||||||
struct target_list *head, *new;
|
|
||||||
|
|
||||||
retval = 0;
|
if (argc == 1) {
|
||||||
|
LOG_DEBUG("Empty SMP target");
|
||||||
|
return JIM_OK;
|
||||||
|
}
|
||||||
LOG_DEBUG("%d", argc);
|
LOG_DEBUG("%d", argc);
|
||||||
/* argv[1] = target to associate in smp
|
/* argv[1] = target to associate in smp
|
||||||
* argv[2] = target to associate in smp
|
* argv[2] = target to associate in smp
|
||||||
@@ -6456,27 +6504,24 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
|
|||||||
}
|
}
|
||||||
INIT_LIST_HEAD(lh);
|
INIT_LIST_HEAD(lh);
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
|
struct target_list *new = create_target_list_node(argv[i]);
|
||||||
targetname = Jim_GetString(argv[i], &len);
|
if (new)
|
||||||
target = get_target(targetname);
|
|
||||||
LOG_DEBUG("%s ", targetname);
|
|
||||||
if (target) {
|
|
||||||
new = malloc(sizeof(struct target_list));
|
|
||||||
new->target = target;
|
|
||||||
list_add_tail(&new->lh, lh);
|
list_add_tail(&new->lh, lh);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/* now parse the list of cpu and put the target in smp mode*/
|
/* now parse the list of cpu and put the target in smp mode*/
|
||||||
foreach_smp_target(head, lh) {
|
struct target_list *curr;
|
||||||
target = head->target;
|
foreach_smp_target(curr, lh) {
|
||||||
|
struct target *target = curr->target;
|
||||||
target->smp = smp_group;
|
target->smp = smp_group;
|
||||||
target->smp_targets = lh;
|
target->smp_targets = lh;
|
||||||
}
|
}
|
||||||
smp_group++;
|
smp_group++;
|
||||||
|
|
||||||
if (target && target->rtos)
|
struct target *rtos_target;
|
||||||
retval = rtos_smp_init(target);
|
int retval = get_target_with_common_rtos_type(lh, &rtos_target);
|
||||||
|
if (retval == JIM_OK && rtos_target)
|
||||||
|
retval = rtos_smp_init(rtos_target);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if { [info exists CHIPNAME] } {
|
|||||||
set _CHIPNAME xcu
|
set _CHIPNAME xcu
|
||||||
}
|
}
|
||||||
|
|
||||||
# The cvarious chips in the Ultrascale family have different IR length.
|
# The various chips in the Ultrascale family have different IR length.
|
||||||
# Set $CHIP before including this file to determine the device.
|
# Set $CHIP before including this file to determine the device.
|
||||||
array set _XCU_DATA {
|
array set _XCU_DATA {
|
||||||
XCKU025 {0x03824093 6}
|
XCKU025 {0x03824093 6}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ adapter driver bcm2835gpio
|
|||||||
bcm2835gpio peripheral_base 0x3F000000
|
bcm2835gpio peripheral_base 0x3F000000
|
||||||
|
|
||||||
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
|
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
|
||||||
# These depend on system clock, calibrated for stock 700MHz
|
# These depend on system clock, calibrated for scaling_max_freq 900MHz
|
||||||
# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET
|
# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET
|
||||||
bcm2835gpio speed_coeffs 146203 36
|
bcm2835gpio speed_coeffs 225000 36
|
||||||
|
|
||||||
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
|
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
|
||||||
# Header pin numbers: 23 22 19 21
|
# Header pin numbers: 23 22 19 21
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ if {[using_jtag]} {
|
|||||||
swd newdap max32620 cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
swd newdap max32620 cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dap create max32620.dap -chain-position max32620.cpu
|
||||||
|
|
||||||
# target configuration
|
# target configuration
|
||||||
target create max32620.cpu cortex_m -chain-position max32620.cpu
|
target create max32620.cpu cortex_m -dap max32620.dap
|
||||||
max32620.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
max32620.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
||||||
|
|
||||||
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ if {[using_jtag]} {
|
|||||||
swd newdap max32625 cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
swd newdap max32625 cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dap create max32625.dap -chain-position max32625.cpu
|
||||||
|
|
||||||
# target configuration
|
# target configuration
|
||||||
target create max32625.cpu cortex_m -chain-position max32625.cpu
|
target create max32625.cpu cortex_m -dap max32625.dap
|
||||||
max32625.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
max32625.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
||||||
|
|
||||||
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ if {[using_jtag]} {
|
|||||||
swd newdap max3263x cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
swd newdap max3263x cpu -irlen 4 -irmask 0xf -expected-id 0x2ba01477 -ignore-version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dap create max3263x.dap -chain-position max3263x.cpu
|
||||||
|
|
||||||
# target configuration
|
# target configuration
|
||||||
target create max3263x.cpu cortex_m -chain-position max3263x.cpu
|
target create max3263x.cpu cortex_m -dap max3263x.dap
|
||||||
max3263x.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
max3263x.cpu configure -work-area-phys 0x20005000 -work-area-size 0x2000
|
||||||
|
|
||||||
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
# Config Command: flash bank name driver base size chip_width bus_width target [driver_options]
|
||||||
|
|||||||
Reference in New Issue
Block a user