Compare commits

..

18 Commits

Author SHA1 Message Date
Antonio Borneo
40e6c98dfc helper: configuration: check for empty search dirs
The function find_file() is supposed to be called when the search
dirs in 'script_search_dirs' has already been populated.

This is not the case when the command 'ocd_find' is used in one of
the embedded scripts 'startup.tcl'. It then triggers SIGSEGV.

Check for 'script_search_dirs' and eventually skip searching in
the dirs.

Change-Id: I9e75a8739c94de72041fb64487910d60dffcb2bd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8931
Tested-by: jenkins
2025-06-07 09:58:53 +00:00
Marc Schink
3fbca95ae1 tcl/board: Add config for nRF5340 development kit
Tested with nRF5340 development kit.

Change-Id: I44f1ba176dd4ac491b5dccea4c4d6d6d9bfaf479
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8867
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:58:31 +00:00
Marc Schink
20d7e83576 tcl/board: Add config for nRF9160 development kit
Tested with nRF9160 development kit.

Change-Id: I367b869b9707bef0547b5d3575b24e19db74cd21
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8866
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:58:08 +00:00
Marc Schink
895dfb5d87 tcl/board: Deprecate nordic_nrf52_ftx232.cfg
Board configuration files for specific external debug adapters are not /
no longer supported.

Checkpatch-ignore: LONG_LINE_STRING

Change-Id: I0f391dfb1a2d7ceb92c2ad3e34eaeb8a85b2cdc5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8865
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:57:44 +00:00
Marc Schink
84f6c561f3 tcl/board: Deprecate old nordic configuration files
Add the old configuration files to the 'file_renaming' list in order to
ensure backwards compatibility.

Change-Id: Ia61df8e5cd8c19cee19a494635c8025e36f3f4a7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8907
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:57:14 +00:00
Marc Schink
1ee7c09d95 tcl/board: Move nordic configuration files
Move board configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.

Change-Id: Icbf368d7a453c82813e685d2935b186eb738c3ea
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8864
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:09:30 +00:00
Marc Schink
fbdb86adbd tcl/board: Use moved nordic target files
Use the moved nordic target configuration files.

Change-Id: Ie0e2eb7f9514eedb1ae6678eeee59291856c2674
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8906
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:09:13 +00:00
Marc Schink
83c1546e77 tcl/target: Deprecate old nordic configuration files
Keep the old configuration files to ensure backwards compatibility.

Change-Id: Ia1d06b5a8a646d65f2cdc5a9415df3014a93b7d7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8863
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:08:28 +00:00
Marc Schink
152becc460 tcl/target: Move nordic configuration files
Move target configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.

Note that the moved files are still accessible via the old path to ensure
backwards compatibility. This works because of the extended file search in
vendor folders.

Change-Id: If3935985769dc543e8c7d72cda590c9d79303abb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8905
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 09:06:12 +00:00
Antonio Borneo
b06212b5a2 startup.tcl: extend the file search in vendor folders
The TCL configuration files are going to be dispatched in vendor
specific folders.
Old user configuration files will fail to find the new files to
include, so a set of fallback files reporting the deprecation
should replace the renamed files.

To prevent such enormous proliferation of fallback files, extend
the search of files in the vendor folders too.
For non-trivial renames, a dedicated table is added in the file
tcl/file_renaming.cfg to track old --> new file names.
The deprecated message is then part of the extended search.

E.g.:
old file names:
- path/to/a/certain/vendor_config_file
- path/to/a/certain/vendor-config_file
trigger search of:
- path/to/a/certain/vendor/config_file

and
- path/to/a/certain/config_file
trigger search of:
- path/to/a/certain/${vendor}/config_file
among a possible vendors list.

This is a temporarily feature that should be removed as soon as
possible to prevent clashing on files with the same name.
The names in tcl/file_renaming.cfg are for demonstration purpose
only and should be dropped when the first real entries are added.

Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8929
Tested-by: jenkins
2025-06-07 08:49:20 +00:00
Lucien Dufour
b1c1dd1ec4 tcl/target: Add support for TMS570LS1xxx
Added support for TMS570LS1xxx series parts. This uses the existing
ti_tms570.cfg as parent.

Change-Id: I40567bfb8dc052532807df68ef3d42f8e7a8ecf4
Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero>
Reviewed-on: https://review.openocd.org/c/openocd/+/8928
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: zapb <dev@zapb.de>
2025-06-07 08:43:40 +00:00
Lucien Dufour
25b99ae456 cortex_a: Use endianness for soft breakpoints
Fix endianness for cortex_r4 and cortex_r5 when inserting software
breakpoints. Because the cortex_a target is used by the cortex_r
architecture and some chips start in BE by default (e.g. TMS570)

Change-Id: I68b7fe7c4604de67fee2e64fff0fad2691659a58
Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero>
Reviewed-on: https://review.openocd.org/c/openocd/+/8909
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 08:43:10 +00:00
Tomas Vanek
c545b9c4ab rtos/hwthread: use printf format specifier
instead of typecast.

Change-Id: I62e3a0faebd915615f6b72a456667c49970a4091
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8926
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 08:40:46 +00:00
Tim Newsome
330b06b440 rtos/hwthread: Nicer debug message in hwthread_update_threads()
Imported from
https://github.com/riscv-collab/riscv-openocd/pull/763

Change-Id: Ia5931a772476a2ae186ed87cd70d7e4be2f196fb
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8917
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 08:40:17 +00:00
Tomas Vanek
6975baa88b doc: list target unavailable state
Fixes: 8911: target: Add TARGET_UNAVAILABLE state | https://review.openocd.org/c/openocd/+/8911
Change-Id: I6d152aea5bb449f79fd0f829252442b8b9f8ed9c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8923
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 08:38:52 +00:00
Tim Newsome
7f57e72afe gdb_server: Operate on available targets.
When SMP is enabled, gdb will always use the first target in the SMP
group. That doesn't work when that first target is unavailable, but
others in the SMP group are still available.

For cases where gdb expects an operation to affect the entire group (run
control, memory access), find the first available target in an SMP group
and use that.

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767

Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8912
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 08:20:32 +00:00
Tim Newsome
98ed83e278 rtos/hwthread: Hide unavailable targets from thread list.
Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767

Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8919
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 08:17:14 +00:00
Tim Newsome
92287c1a2a target: Add TARGET_UNAVAILABLE state
This is added for future RISC-V changes. The RISC-V debug interface can
explicitly tell a debugger when a hart is unavailable. This is used for
instance when that hart is powered down (or yet to be powered up out of
reset).

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/752

Change-Id: I8a062d59eea1e5b3c788281a75159592db024683
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8911
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Bernhard Rosenkränzer <bero@baylibre.com>
2025-06-07 08:15:30 +00:00
22 changed files with 187 additions and 37 deletions

View File

@@ -5439,7 +5439,8 @@ Displays the current target state:
@code{debug-running},
@code{halted},
@code{reset},
@code{running}, or @code{unknown}.
@code{running},
@code{unavailable} or @code{unknown}.
(Also, @pxref{eventpolling,,Event Polling}.)
@end deffn

View File

@@ -71,17 +71,18 @@ char *find_file(const char *file)
full_path = alloc_printf("%s", file);
fp = fopen(full_path, mode);
while (!fp) {
free(full_path);
full_path = NULL;
dir = *search_dirs++;
if (script_search_dirs)
while (!fp) {
free(full_path);
full_path = NULL;
dir = *search_dirs++;
if (!dir)
break;
if (!dir)
break;
full_path = alloc_printf("%s/%s", dir, file);
fp = fopen(full_path, mode);
}
full_path = alloc_printf("%s/%s", dir, file);
fp = fopen(full_path, mode);
}
if (fp) {
fclose(fp);

View File

@@ -7,7 +7,8 @@
# Try flipping / and \ to find file if the filename does not
# match the precise spelling
proc find {filename} {
# lappend _telnet_autocomplete_skip _find_internal
proc _find_internal {filename} {
if {[catch {ocd_find $filename} t]==0} {
return $t
}
@@ -20,6 +21,49 @@ proc find {filename} {
# make sure error message matches original input string
return -code error "Can't find $filename"
}
proc find {filename} {
if {[catch {_find_internal $filename} t]==0} {
return $t
}
# Check in vendor specific folder:
# - path/to/a/certain/vendor_config_file
# - path/to/a/certain/vendor-config_file
# replaced with
# - path/to/a/certain/vendor/config_file
regsub {([/\\])([^/\\_-]*)[_-]([^/\\]*$)} $filename "\\1\\2\\1\\3" f
if {[catch {_find_internal $f} t]==0} {
echo "WARNING: '$filename' is deprecated, use '$f' instead"
return $t
}
foreach vendor {nordic ti st} {
# - path/to/a/certain/config_file
# replaced with
# - path/to/a/certain/${vendor}/config_file
regsub {([/\\])([^/\\]*$)} $filename "\\1$vendor\\1\\2" f
if {[catch {_find_internal $f} t]==0} {
echo "WARNING: '$filename' is deprecated, use '$f' instead"
return $t
}
}
# at last, check for explicit renaming
if {[catch {
source [_find_internal file_renaming.cfg]
set unixname [string map {\\ /} $filename]
regsub {^(.*/|)((board|chip|cpld|cpu|fpga|interface|target|test|tools)/.*.cfg$)} $unixname {{\1} {\2}} split
set newname [lindex $split 0][dict get $_file_renaming [lindex $split 1]]
_find_internal $newname
} t]==0} {
echo "WARNING: '$filename' is deprecated, use '$newname' instead"
return $t
}
return -code error "Can't find $filename"
}
add_usage_text find "<file>"
add_help_text find "print full path to file according to OpenOCD search rules"

View File

@@ -105,7 +105,8 @@ static int hwthread_update_threads(struct rtos *rtos)
foreach_smp_target(head, target->smp_targets) {
struct target *curr = head->target;
if (!target_was_examined(curr))
if (!target_was_examined(curr) ||
curr->state == TARGET_UNAVAILABLE)
continue;
++thread_list_size;
@@ -130,7 +131,8 @@ static int hwthread_update_threads(struct rtos *rtos)
foreach_smp_target(head, target->smp_targets) {
struct target *curr = head->target;
if (!target_was_examined(curr))
if (!target_was_examined(curr) ||
curr->state == TARGET_UNAVAILABLE)
continue;
threadid_t tid = threadid_from_target(curr);
@@ -204,8 +206,8 @@ static int hwthread_update_threads(struct rtos *rtos)
else
rtos->current_thread = threadid_from_target(target);
LOG_TARGET_DEBUG(target, "%s current_thread=%i", __func__,
(int)rtos->current_thread);
LOG_TARGET_DEBUG(target, "current_thread=%" PRId64 ", threads_found=%d",
rtos->current_thread, threads_found);
return 0;
}

View File

@@ -151,6 +151,29 @@ static bool gdb_use_target_description = true;
/* current processing free-run type, used by file-I/O */
static char gdb_running_type;
/* Find an available target in the SMP group that gdb is connected to. For
* commands that affect an entire SMP group (like memory access and run control)
* this will give better results than returning the unavailable target and having
* the command fail. If gdb was aware that targets can be unavailable we
* wouldn't need this logic.
*/
struct target *get_available_target_from_connection(struct connection *connection)
{
struct gdb_service *gdb_service = connection->service->priv;
struct target *target = gdb_service->target;
if (target->state == TARGET_UNAVAILABLE && target->smp) {
struct target_list *tlist;
foreach_smp_target(tlist, target->smp_targets) {
struct target *t = tlist->target;
if (t->state != TARGET_UNAVAILABLE)
return t;
}
/* If we can't find an available target, just return the
* original. */
}
return target;
}
static int gdb_last_signal(struct target *target)
{
LOG_TARGET_DEBUG(target, "Debug reason is: %s",
@@ -961,9 +984,9 @@ static int gdb_target_callback_event_handler(struct target *target,
enum target_event event, void *priv)
{
struct connection *connection = priv;
struct gdb_service *gdb_service = connection->service->priv;
struct target *gdb_target = get_available_target_from_connection(connection);
if (gdb_service->target != target)
if (gdb_target != target)
return ERROR_OK;
switch (event) {
@@ -1504,7 +1527,7 @@ static int gdb_error(struct connection *connection, int retval)
static int gdb_read_memory_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
char *separator;
uint64_t addr = 0;
uint32_t len = 0;
@@ -1579,7 +1602,7 @@ static int gdb_read_memory_packet(struct connection *connection,
static int gdb_write_memory_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
char *separator;
uint64_t addr = 0;
uint32_t len = 0;
@@ -1630,7 +1653,7 @@ static int gdb_write_memory_packet(struct connection *connection,
static int gdb_write_memory_binary_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
char *separator;
uint64_t addr = 0;
uint32_t len = 0;
@@ -1709,7 +1732,7 @@ static int gdb_write_memory_binary_packet(struct connection *connection,
static int gdb_step_continue_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
bool current = false;
uint64_t address = 0x0;
int retval = ERROR_OK;
@@ -1737,7 +1760,7 @@ static int gdb_step_continue_packet(struct connection *connection,
static int gdb_breakpoint_watchpoint_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
int type;
enum breakpoint_type bp_type = BKPT_SOFT /* dummy init to avoid warning */;
enum watchpoint_rw wp_type = WPT_READ /* dummy init to avoid warning */;
@@ -1910,7 +1933,7 @@ static int gdb_memory_map(struct connection *connection,
* have to regenerate it a couple of times.
*/
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
struct flash_bank *p;
char *xml = NULL;
int size = 0;
@@ -2986,7 +3009,7 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p
__attribute__((unused)) int packet_size)
{
struct gdb_connection *gdb_connection = connection->priv;
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
const char *parse = packet;
int retval;
@@ -3208,7 +3231,7 @@ static void gdb_restart_inferior(struct connection *connection, const char *pack
static bool gdb_handle_vrun_packet(struct connection *connection, const char *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
const char *parse = packet;
/* Skip "vRun" */
@@ -3254,7 +3277,7 @@ static int gdb_v_packet(struct connection *connection,
struct gdb_connection *gdb_connection = connection->priv;
int result;
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
if (strncmp(packet, "vCont", 5) == 0) {
bool handled;
@@ -3433,7 +3456,7 @@ static int gdb_detach(struct connection *connection)
static int gdb_fileio_response_packet(struct connection *connection,
char const *packet, int packet_size)
{
struct target *target = get_target_from_connection(connection);
struct target *target = get_available_target_from_connection(connection);
char *separator;
char *parsing_point;
int fileio_retcode = strtoul(packet + 1, &separator, 16);
@@ -3726,10 +3749,11 @@ static int gdb_input_inner(struct connection *connection)
}
if (gdb_con->ctrl_c) {
if (target->state == TARGET_RUNNING) {
struct target *t = target;
if (target->rtos)
target->rtos->gdb_target_for_threadid(connection, target->rtos->current_threadid, &t);
struct target *available_target = get_available_target_from_connection(connection);
if (available_target->state == TARGET_RUNNING) {
struct target *t = available_target;
if (available_target->rtos)
available_target->rtos->gdb_target_for_threadid(connection, target->rtos->current_threadid, &t);
retval = target_halt(t);
if (retval == ERROR_OK)
retval = target_poll(t);

View File

@@ -1380,6 +1380,19 @@ static int cortex_a_set_breakpoint(struct target *target,
buf_set_u32(code, 0, 32, ARMV5_BKPT(0x11));
}
/*
* ARMv7-A/R fetches instructions in little-endian on both LE and BE CPUs.
* But Cortex-R4 and Cortex-R5 big-endian require BE instructions.
* https://developer.arm.com/documentation/den0042/a/Coding-for-Cortex-R-Processors/Endianness
* https://developer.arm.com/documentation/den0013/d/Porting/Endianness
*/
if ((((cortex_a->cpuid & CPUDBG_CPUID_MASK) == CPUDBG_CPUID_CORTEX_R4) ||
((cortex_a->cpuid & CPUDBG_CPUID_MASK) == CPUDBG_CPUID_CORTEX_R5)) &&
target->endianness == TARGET_BIG_ENDIAN) {
// In place swapping is allowed
buf_bswap32(code, code, 4);
}
retval = target_read_memory(target,
breakpoint->address & 0xFFFFFFFE,
breakpoint->length, 1,

View File

@@ -30,6 +30,9 @@
#define CORTEX_A_MIDR_PARTNUM_SHIFT 4
#define CPUDBG_CPUID 0xD00
#define CPUDBG_CPUID_MASK 0xff00fff0
#define CPUDBG_CPUID_CORTEX_R4 0x4100c140
#define CPUDBG_CPUID_CORTEX_R5 0x4100c150
#define CPUDBG_CTYPR 0xD04
#define CPUDBG_TTYPR 0xD0C
#define CPUDBG_LOCKACCESS 0xFB0

View File

@@ -220,6 +220,7 @@ static const struct nvp nvp_target_state[] = {
{ .name = "halted", .value = TARGET_HALTED },
{ .name = "reset", .value = TARGET_RESET },
{ .name = "debug-running", .value = TARGET_DEBUG_RUNNING },
{ .name = "unavailable", .value = TARGET_UNAVAILABLE },
{ .name = NULL, .value = -1 },
};

View File

@@ -46,6 +46,8 @@ struct gdb_fileio_info;
* not sure how this is used with all the recent changes)
* TARGET_DEBUG_RUNNING = 4: the target is running, but it is executing code on
* behalf of the debugger (e.g. algorithm for flashing)
* TARGET_UNAVAILABLE = 5: The target is unavailable for some reason. It might
* be powered down, for instance.
*
* also see: target_state_name();
*/
@@ -56,6 +58,7 @@ enum target_state {
TARGET_HALTED = 2,
TARGET_RESET = 3,
TARGET_DEBUG_RUNNING = 4,
TARGET_UNAVAILABLE = 5
};
enum target_reset_mode {

View File

@@ -8,4 +8,4 @@ source [find interface/jlink.cfg]
transport select swd
source [find target/nrf51.cfg]
source [find target/nordic/nrf51.cfg]

View File

@@ -5,4 +5,4 @@
#
source [find interface/cmsis-dap.cfg]
source [find target/nrf51.cfg]
source [find target/nordic/nrf51.cfg]

View File

@@ -8,4 +8,4 @@ source [find interface/jlink.cfg]
transport select swd
source [find target/nrf52.cfg]
source [find target/nordic/nrf52.cfg]

View File

@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Nordic Semiconductor nRF5340 Development Kit
# https://www.nordicsemi.com/Products/Development-hardware/nRF5340-DK
#
source [find interface/jlink.cfg]
transport select swd
source [find target/nordic/nrf53.cfg]

View File

@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Nordic Semiconductor nRF9160 Development Kit
# https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK
#
source [find interface/jlink.cfg]
transport select swd
source [find target/nordic/nrf91.cfg]

View File

@@ -5,9 +5,11 @@
# or any FT232H/FT2232H/FT4232H based board/module
#
echo "WARNING: 'board/nordic_nrf52_ftx232.cfg' is deprecated, use '-f interface/ftdi/ft232h-module-swd.cfg -f target/nordic/nrf52.cfg' instead"
source [find interface/ftdi/ft232h-module-swd.cfg]
#source [find interface/ftdi/minimodule-swd.cfg]
transport select swd
source [find target/nrf52.cfg]
source [find target/nordic/nrf52.cfg]

24
tcl/file_renaming.cfg Normal file
View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This file is used to remap configuration files that has been
# renamed, except simple renames that are taken care automatically
# like:
# .../file.cfg ==> .../${vendor}/file.cfg
# .../vendor-file.cfg ==> .../vendor/file.cfg
# .../vendor_file.cfg ==> .../vendor/file.cfg
#
# The formatting below is a TCL dict, so pairs of key-value
# in a simple TCL list, using for each line
# old_name new_name
# including in each name one of the prefix folder between
# board, chip, cpld, cpu, fpga, interface, target, test, tools
set _file_renaming {
board/nordic_nrf51822_mkit.cfg board/nordic/nrf51822-mkit.cfg
board/nordic_nrf51_dk.cfg board/nordic/nrf51-dk.cfg
board/nordic_nrf52_dk.cfg board/nordic/nrf52-dk.cfg
target/nrf51.cfg target/nordic/nrf51.cfg
target/nrf52.cfg target/nordic/nrf52.cfg
target/nrf53.cfg target/nordic/nrf53.cfg
target/nrf91.cfg target/nordic/nrf91.cfg
}

View File

@@ -60,7 +60,7 @@ if { ![using_hla] } {
# Keep adapter speed less or equal 2000 kHz or flash programming fails!
adapter speed 1000
source [find target/nrf_common.cfg]
source [find target/nordic/common.cfg]
flash bank $_CHIPNAME.app.flash nrf5 0x00000000 0 0 0 $_TARGETNAME_APP
flash bank $_CHIPNAME.app.uicr nrf5 0x00FF8000 0 0 0 $_TARGETNAME_APP

View File

@@ -45,7 +45,7 @@ adapter speed 1000
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
source [find target/nrf_common.cfg]
source [find target/nordic/common.cfg]
flash bank $_CHIPNAME.flash nrf5 0x00000000 0 0 0 $_TARGETNAME
flash bank $_CHIPNAME.uicr nrf5 0x00FF8000 0 0 0 $_TARGETNAME

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# TMS570LS1114, TMS570LS1115
# TMS570LS1224, TMS570LS1225, TMS570LS1227
set DAP_TAPID 0x0B95502F
set JRC_TAPID 0x0B95502F
source [find target/ti_tms570.cfg]