Skip to content

Commit

Permalink
Merge up to ad87fbd from upstream
Browse files Browse the repository at this point in the history
Conflicts:

* `doc/openocd.texi`: due to d382c95,
resolved by selecting the upstream version.

* `src/server/gdb_server.c`: between
944fe66 and
92e8823. Resolved by adopting the use
of `LOG_TARGET_*`.
* `src/target/target.c`: between
639e68a and
c5358c8, selected the version from
`riscv-openocd`.

Change-Id: Ic1327f25e147945e0ec82947a82452501e8ee5de
  • Loading branch information
en-sc committed Jun 25, 2024
2 parents fdd07f1 + ad87fbd commit 2eedd74
Show file tree
Hide file tree
Showing 62 changed files with 1,469 additions and 843 deletions.
68 changes: 0 additions & 68 deletions contrib/coresight-trace.txt

This file was deleted.

25 changes: 12 additions & 13 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -7345,12 +7345,13 @@ flash bank $_FLASHNAME npcx 0x64000000 0 0 0 $_TARGETNAME
@end deffn

@deffn {Flash Driver} {nrf5}
All members of the nRF51 microcontroller families from Nordic Semiconductor
include internal flash and use ARM Cortex-M0 core. nRF52 family powered
by ARM Cortex-M4 or M4F core is supported too. nRF52832 is fully supported
including BPROT flash protection scheme. nRF52833 and nRF52840 devices are
supported with the exception of security extensions (flash access control list
- ACL).
Supports all members of the nRF51, nRF52 and nRF53 microcontroller families from
Nordic Semiconductor. nRF91 family is supported too. One driver handles both
the main flash and the UICR area.

Flash protection is handled on nRF51 family and nRF52805, nRF52810, nRF52811,
nRF52832 devices. Flash access control list (ACL) protection scheme of the newer
devices is not supported.

@example
flash bank $_FLASHNAME nrf5 0 0x00000000 0 0 $_TARGETNAME
Expand Down Expand Up @@ -8827,8 +8828,8 @@ The file format must be inferred by the driver.

@section PLD/FPGA Drivers, Options, and Commands

Drivers may support PLD-specific options to the @command{pld device}
definition command, and may also define commands usable only with
Drivers may support PLD-specific options to the @command{pld create}
command, and may also define commands usable only with
that particular type of PLD.

@deffn {FPGA Driver} {virtex2} [@option{-no_jstart}]
Expand Down Expand Up @@ -8914,13 +8915,12 @@ For the option @option{-family} @var{name} is one of @var{trion|titanium}.
@end deffn


@deffn {FPGA Driver} {intel} [@option{-family} <name>]
@deffn {FPGA Driver} {intel} @option{-family} <name>
This driver can be used to load the bitstream into Intel (former Altera) FPGAs.
The families Cyclone III, Cyclone IV, Cyclone V, Cyclone 10, Arria II are supported.
The families Cyclone III, Cyclone IV, Cyclone V, Cyclone 10 and Arria II are supported.
@c Arria V and Arria 10, MAX II, MAX V, MAX10)

For the option @option{-family} @var{name} is one of @var{cycloneiii cycloneiv cyclonev cyclone10 arriaii}.
This is needed when the JTAG ID of the device is ambiguous (same ID is used for chips in different families).
The option @option{-family} @var{name} is one of @var{cycloneiii cycloneiv cyclonev cyclone10 arriaii}.

As input file format the driver supports a '.rbf' (raw bitstream file) file. The '.rbf' file can be generated
from a '.sof' file with @verb{|quartus_cpf -c blinker.sof blinker.rbf|}
Expand Down Expand Up @@ -11376,7 +11376,6 @@ tunneled DR scan consists of:
@item A width+1 stream of bits for the tunneled TDI. The plus one is because there is a one-clock skew between TDI of Xilinx chain and TDO from tunneled chain.
@item 3 bits of zero that the tunnel uses to go back to idle state.
@end enumerate

@end deffn

@deffn {Command} {riscv set_bscan_tunnel_ir} value
Expand Down
2 changes: 1 addition & 1 deletion src/flash/nor/ambiqmicro.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ FLASH_BANK_COMMAND_HANDLER(ambiqmicro_flash_bank_command)
if (CMD_ARGC < 6)
return ERROR_COMMAND_SYNTAX_ERROR;

ambiqmicro_info = calloc(sizeof(struct ambiqmicro_flash_bank), 1);
ambiqmicro_info = calloc(1, sizeof(struct ambiqmicro_flash_bank));

bank->driver_priv = ambiqmicro_info;

Expand Down
4 changes: 2 additions & 2 deletions src/flash/nor/at91sam7.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static int at91sam7_read_part_info(struct flash_bank *bank)
if (bnk > 0) {
if (!t_bank->next) {
/* create a new flash bank element */
struct flash_bank *fb = calloc(sizeof(struct flash_bank), 1);
struct flash_bank *fb = calloc(1, sizeof(struct flash_bank));
if (!fb) {
LOG_ERROR("No memory for flash bank");
return ERROR_FAIL;
Expand Down Expand Up @@ -748,7 +748,7 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
if (bnk > 0) {
if (!t_bank->next) {
/* create a new bank element */
struct flash_bank *fb = calloc(sizeof(struct flash_bank), 1);
struct flash_bank *fb = calloc(1, sizeof(struct flash_bank));
if (!fb) {
LOG_ERROR("No memory for flash bank");
return ERROR_FAIL;
Expand Down
10 changes: 5 additions & 5 deletions src/flash/nor/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ struct flash_sector {
uint32_t size;
/**
* Indication of erasure status: 0 = not erased, 1 = erased,
* other = unknown. Set by @c flash_driver_s::erase_check only.
* other = unknown. Set by @c flash_driver::erase_check only.
*
* This information must be considered stale immediately.
* Don't set it in flash_driver_s::erase or a device mass_erase
* Don't clear it in flash_driver_s::write
* Don't set it in flash_driver::erase or a device mass_erase
* Don't clear it in flash_driver::write
* The flag is not used in a protection block
*/
int is_erased;
/**
* Indication of protection status: 0 = unprotected/unlocked,
* 1 = protected/locked, other = unknown. Set by
* @c flash_driver_s::protect_check.
* @c flash_driver::protect_check.
*
* This information must be considered stale immediately.
* A million things could make it stale: power cycle,
Expand All @@ -67,7 +67,7 @@ struct flash_sector {
* a major interface.
*
* This structure will be passed as a parameter to the callbacks in the
* flash_driver_s structure, some of which may modify the contents of
* flash_driver structure, some of which may modify the contents of
* this structure of the area of flash that it defines. Driver writers
* may use the @c driver_priv member to store additional data on a
* per-bank basis, if required.
Expand Down
8 changes: 4 additions & 4 deletions src/flash/nor/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct flash_bank;
* flash bank DRIVERNAME ...parameters...
* @endcode
*
* OpenOCD will search for the driver with a @c flash_driver_s::name
* OpenOCD will search for the driver with a @c flash_driver::name
* that matches @c DRIVERNAME.
*
* The flash subsystem calls some of the other drivers routines a using
Expand Down Expand Up @@ -170,7 +170,7 @@ struct flash_driver {
/**
* Check the erasure status of a flash bank.
* When called, the driver routine must perform the required
* checks and then set the @c flash_sector_s::is_erased field
* checks and then set the @c flash_sector::is_erased field
* for each of the flash banks's sectors.
*
* @param bank The bank to check
Expand All @@ -182,7 +182,7 @@ struct flash_driver {
* Determine if the specific bank is "protected" or not.
* When called, the driver routine must must perform the
* required protection check(s) and then set the @c
* flash_sector_s::is_protected field for each of the flash
* flash_sector::is_protected field for each of the flash
* bank's sectors.
*
* If protection is not implemented, set method to NULL
Expand All @@ -204,7 +204,7 @@ struct flash_driver {
int (*info)(struct flash_bank *bank, struct command_invocation *cmd);

/**
* A more gentle flavor of flash_driver_s::probe, performing
* A more gentle flavor of flash_driver::probe, performing
* setup with less noise. Generally, driver routines should test
* to see if the bank has already been probed; if it has, the
* driver probably should not perform its probe a second time.
Expand Down
4 changes: 2 additions & 2 deletions src/flash/nor/kinetis.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ FLASH_BANK_COMMAND_HANDLER(kinetis_flash_bank_command)
k_chip = kinetis_get_chip(target);

if (!k_chip) {
k_chip = calloc(sizeof(struct kinetis_chip), 1);
k_chip = calloc(1, sizeof(struct kinetis_chip));
if (!k_chip) {
LOG_ERROR("No memory");
return ERROR_FAIL;
Expand Down Expand Up @@ -1031,7 +1031,7 @@ static int kinetis_create_missing_banks(struct kinetis_chip *k_chip)
bank_idx - k_chip->num_pflash_blocks);
}

bank = calloc(sizeof(struct flash_bank), 1);
bank = calloc(1, sizeof(struct flash_bank));
if (!bank)
return ERROR_FAIL;

Expand Down
2 changes: 1 addition & 1 deletion src/flash/nor/max32xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ FLASH_BANK_COMMAND_HANDLER(max32xxx_flash_bank_command)
return ERROR_FLASH_BANK_INVALID;
}

info = calloc(sizeof(struct max32xxx_flash_bank), 1);
info = calloc(1, sizeof(struct max32xxx_flash_bank));
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[2], info->flash_size);
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[6], info->flc_base);
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[7], info->sector_size);
Expand Down
2 changes: 1 addition & 1 deletion src/flash/nor/msp432.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ static int msp432_probe(struct flash_bank *bank)

if (is_main && MSP432P4 == msp432_bank->family_type) {
/* Create the info flash bank needed by MSP432P4 variants */
struct flash_bank *info = calloc(sizeof(struct flash_bank), 1);
struct flash_bank *info = calloc(1, sizeof(struct flash_bank));
if (!info)
return ERROR_FAIL;

Expand Down
Loading

0 comments on commit 2eedd74

Please sign in to comment.