Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge up to 16e9b9c44fa62ea6eec99d1fb7bc43a8f1cc2f7e from upstream. #986

Merged
merged 51 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3862e07
target: Remove break/watchpoints in target_destroy()
zapb-0 Nov 1, 2023
9ebc2a6
doc: xtensa architecture clarifications/fixes
ianstcdns Oct 20, 2023
f8096ce
xtensa: update XDM register map for TRAX support
ianstcdns Nov 9, 2023
7c60f65
breakpoints: Fix endless loop in bp/wp_clear_target
kr-sc Oct 18, 2023
851d1ad
breakpoints: Add target logging to breakpoints and watchpoints
MarekVCodasip Sep 29, 2023
ee96a95
openocd: src/target: Correctly handle CCSIDR_EL1.Associativity=0
pcc Sep 28, 2023
393da81
aarch64: Use 64-bit reads/writes to access SCTLR_EL1
pcc Oct 18, 2023
8bf7f60
contrib/firmware: remove unnecessary delay commands in the i2c bit-ba…
Oct 16, 2023
a69a4e2
contrib/firmware: extend the number of bytes to be sent in the i2c bi…
Oct 16, 2023
bb27677
contrib/firmware: add 'send not acknowledged' function to the i2c bit…
Oct 16, 2023
b25e532
jtag/drivers/cmsis-dap: Restructure commands
zapb-0 Nov 6, 2023
ba79d50
jtag/drivers/cmsis-dap: Return error in 'backend' command
zapb-0 Nov 6, 2023
1c9f4ac
drivers/cmsis_dap: drop unused variable
tom-van Nov 7, 2023
f55b122
jtag/drivers/kitprog: Restructure commands
zapb-0 Nov 7, 2023
62b526d
mips32: MIPS32_OP_SRL was using SRA opcode.
Aug 1, 2016
a23c69d
jtag/drivers/jlink: Use correct command errors
zapb-0 Nov 9, 2023
acc1717
jtag/drivers/ftdi: Use correct command error
zapb-0 Nov 9, 2023
dc0f79d
jtag/drivers/jtag_vpi: Remove redundant error messages
zapb-0 Nov 9, 2023
1df35d9
jtag/drivers/rshim: Remove redundant error message
zapb-0 Nov 9, 2023
738f1e1
flash/nor/stm32f2x: Remove redundant error messages
zapb-0 Nov 11, 2023
b310b3b
flash/nor/stm32h7x: Remove redundant error messages
zapb-0 Nov 11, 2023
ea07b3c
flash/nor/stm32l4x: Remove redundant error messages
zapb-0 Nov 11, 2023
4e5b009
flash/nor/pic32mx: Remove redundant error message
zapb-0 Nov 11, 2023
8ccd782
flash/nor/stmqspi: Use correct command errors
zapb-0 Nov 11, 2023
acde409
rtt/tcl: Fix line indentation
zapb-0 Mar 27, 2022
53e67c3
rtt_server: Add option for a message when client connects
ThiemoVanEngelen Jun 23, 2023
be5cfdc
target: remove `target_number`
en-sc Oct 31, 2023
1b0b07b
target: Throw error in 'debug_reason' command
zapb-0 Nov 12, 2023
7ac389c
tcl/target/gd32vf103: work around broken ndmreset
tchebb Apr 30, 2022
15038ab
target/mips32: pracc write cp0 status register first
709924470 Nov 17, 2023
73d62f3
target: clarify usage of `coreid`
en-sc Oct 31, 2023
119a533
target/target: Fix 'wp' command usage
zapb-0 Nov 20, 2023
0f70c6c
remote_bitbang: Add SWD support
mwick83 Jan 30, 2021
fd75e9e
jtag/drivers/cmsis_dap_bulk: use asynchronous libusb transfer
tom-van Nov 19, 2022
66391d2
jtag/drivers/cmsis_dap: implement canceling of pending USB requests
tom-van Nov 20, 2022
ba16fdc
drivers/cmsis_dap: use quirk workarounds optionally
tom-van Nov 7, 2023
d3ffcc7
target/espressif: add algorithm support to execute code on target
erhankur Jul 3, 2023
d06d8ea
target/xtensa: add algorithm support
erhankur Jul 10, 2023
4003762
target/espressif: add algorithm support to xtensa chips
erhankur Jul 10, 2023
0ce08ec
target: Add some info messages about examination process.
kr-sc Oct 31, 2023
2bd40b0
target: Increase maximum profile sample count to 1000000
karlp Nov 22, 2023
5f6b25a
tcl/target/at91sama5d2.cfg: allow choice of SWD instead of JTAG
majbthrd Nov 15, 2023
c1ae95f
HACKING: fix how to retrieve hooks/commit-msg
borneoa Dec 1, 2023
3413ae6
cmsis_dap_usb_hid: improve detection of probes with unusual report sizes
samueldewan Dec 1, 2023
49348f1
target: use bool for backup_working_area
borneoa Dec 3, 2023
d3d287b
helper: nvp: minor fixes
borneoa Dec 3, 2023
f018cd7
jtag: Rename 'hasidcode' to 'has_idcode'
zapb-0 Dec 6, 2023
d2b34b4
jtag/core: Use 'bool' data type for 'bypass'
zapb-0 Dec 6, 2023
16e9b9c
doc/usb_adapters: add dumps of two versions of Atmel EDBG
tom-van Dec 6, 2023
e4a0658
Merge commit '16e9b9c44fa62ea6eec99d1fb7bc43a8f1cc2f7e' into from_ups…
timsifive Dec 22, 2023
a7b5b32
Fix build.
timsifive Dec 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions HACKING
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ topics. It is possible because @c for/master is not a traditional Git
branch.
-# You will need to install this hook, we will look into a better solution:
@code
scp -p -P 29418 USERNAME@review.openocd.org:hooks/commit-msg .git/hooks/
@endcode
Or with http only:
@code
wget https://review.openocd.org/tools/hooks/commit-msg
mv commit-msg .git/hooks
chmod +x .git/hooks/commit-msg
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ AC_ARG_ENABLE([internal-libjaylink],
[use_internal_libjaylink=$enableval], [use_internal_libjaylink=no])

AC_ARG_ENABLE([remote-bitbang],
AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang jtag driver]),
AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang driver]),
[build_remote_bitbang=$enableval], [build_remote_bitbang=yes])

AS_CASE(["${host_cpu}"],
Expand Down Expand Up @@ -599,9 +599,9 @@ AS_IF([test "x$use_internal_jimtcl" = "xyes"], [

AS_IF([test "x$build_remote_bitbang" = "xyes"], [
build_bitbang=yes
AC_DEFINE([BUILD_REMOTE_BITBANG], [1], [1 if you want the Remote Bitbang JTAG driver.])
AC_DEFINE([BUILD_REMOTE_BITBANG], [1], [1 if you want the Remote Bitbang driver.])
], [
AC_DEFINE([BUILD_REMOTE_BITBANG], [0], [0 if you don't want the Remote Bitbang JTAG driver.])
AC_DEFINE([BUILD_REMOTE_BITBANG], [0], [0 if you don't want the Remote Bitbang driver.])
])

AS_IF([test "x$build_sysfsgpio" = "xyes"], [
Expand Down
1 change: 1 addition & 0 deletions contrib/firmware/angie/c/include/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void repeated_start(void);
void stop_cd(void);
void clock_cd(void);
void send_ack(void);
void send_nack(void);
bool get_ack(void);

uint8_t get_address(uint8_t adr, uint8_t rdwr);
Expand Down
10 changes: 10 additions & 0 deletions contrib/firmware/angie/c/src/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ void send_ack(void)
delay_us(1);
}

void send_nack(void)
{
PIN_SDA = 1;
delay_us(1);
PIN_SCL = 1;
delay_us(1);
PIN_SCL = 0;
delay_us(1);
}

bool get_ack(void)
{
PIN_SDA_DIR = 1;
Expand Down
34 changes: 15 additions & 19 deletions contrib/firmware/angie/c/src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,14 +757,13 @@ void i2c_recieve(void)
PIN_SDA_DIR = 0;
if (EP6FIFOBUF[0] == 1) {
uint8_t rdwr = EP6FIFOBUF[0]; //read
uint8_t reg_adr_check = EP6FIFOBUF[1];
uint8_t count = EP6FIFOBUF[2]; //request data count
uint8_t data_count = EP6FIFOBUF[1]; //data sent count
uint8_t count = EP6FIFOBUF[2]; //requested data count
uint8_t adr = EP6FIFOBUF[3]; //address
uint8_t reg_adr = EP6FIFOBUF[4];
uint8_t address = get_address(adr, rdwr); //address byte (read command)
uint8_t address_2 = get_address(adr, 0); //address byte 2 (write command)

printf("%d\n", address);
printf("%d\n", address - 1);

/* start: */
start_cd();
Expand All @@ -773,41 +772,38 @@ void i2c_recieve(void)
/* ack: */
uint8_t ack = get_ack();

delay_us(10);

/* send data */
if (reg_adr_check) { //if there is a byte reg
send_byte(reg_adr);
/* ack(): */
ack = get_ack();
if (data_count) { //if there is a byte reg
for (uint8_t i = 0; i < data_count; i++) {
send_byte(EP6FIFOBUF[i + 4]);
/* ack(): */
ack = get_ack();
}
}

delay_us(10);

/* repeated start: */
repeated_start();
/* address: */
send_byte(address);
/* get ack: */
ack = get_ack();

delay_us(10);

/* receive data */
for (uint8_t i = 0; i < count; i++) {
for (uint8_t i = 0; i < count - 1; i++) {
EP8FIFOBUF[i] = receive_byte();

/* send ack: */
/* send ack: */
send_ack();
}

delay_ms(1);
EP8FIFOBUF[count - 1] = receive_byte();

/* send Nack: */
send_nack();

/* stop */
stop_cd();

delay_us(10);

EP8BCH = 0; //EP8
syncdelay(3);
EP8BCL = count; //EP8
Expand Down
38 changes: 38 additions & 0 deletions contrib/loaders/trampoline/espressif/xtensa/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: GPL-2.0-or-later

# Espressif Xtensa Makefile to compile flasher stub wrapper
# Copyright (C) 2023 Espressif Systems Ltd.

# Prefix for Espressif xtensa cross compilers (can include a directory path)
CROSS ?= xtensa-esp32-elf-

APP_ARCH := xtensa
APP_CHIP_PATH := $(shell pwd)
SRCS := $(APP_CHIP_PATH)/esp_xtensa_stub_tramp_win.S

BIN2C = ../../../../../src/helper/bin2char.sh
BUILD_DIR = build

APP = esp_xtensa_stub_tramp_win
APP_OBJ = $(BUILD_DIR)/$(APP).o
APP_BIN = $(BUILD_DIR)/$(APP).bin
APP_CODE = $(APP).inc

.PHONY: all clean

all: $(BUILD_DIR) $(APP_OBJ) $(APP_CODE)

$(BUILD_DIR):
$(Q) mkdir $@

$(APP_OBJ): $(SRCS)
@echo " CC $^ -> $@"
$(Q) $(CROSS)gcc -c $(CFLAGS) -o $@ $^

$(APP_CODE): $(APP_OBJ)
@echo " CC $^ -> $@"
$(Q) $(CROSS)objcopy -O binary -j.text $^ $(APP_BIN)
$(Q) $(BIN2C) < $(APP_BIN) > $@

clean:
$(Q) rm -rf $(BUILD_DIR)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */

/***************************************************************************
* Xtensa flasher stub wrapper *
* Copyright (C) 2017 Espressif Systems Ltd. *
***************************************************************************/

/*
* Expects :
* a0 = zero
* a1 = stack_base + stack_size - 16, 16 bytes aligned
* a8 = address of the function to call
* Params :
* a2 = command arg0, result (out)
* a3 = command arg1
* a4 = command arg2
* a5 = command arg3
* a6 = command arg4
* Maximum 5 user args
*/
.text

.align 4
_stub_enter:
/* initialize initial stack frame for callx8 */
addi a9, sp, 32 /* point 16 past extra save area */
s32e a9, sp, -12 /* access to extra save area */
/* prepare args */
mov a10, a2
mov a11, a3
mov a12, a4
mov a13, a5
mov a14, a6
/* call stub */
callx8 a8
/* prepare return value */
mov a2, a10
break 0,0

_idle_loop:
j _idle_loop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* Autogenerated with ../../../../../src/helper/bin2char.sh */
0x92,0xc1,0x20,0x90,0xd1,0x49,0xad,0x02,0xbd,0x03,0xcd,0x04,0xdd,0x05,0x60,0xe6,
0x20,0xe0,0x08,0x00,0x2d,0x0a,0x00,0x40,0x00,0x06,0xff,0xff,
Loading
Loading