Skip to content

Commit 2eedd74

Browse files
committed
Merge up to ad87fbd from upstream
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
2 parents fdd07f1 + ad87fbd commit 2eedd74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1469
-843
lines changed

contrib/coresight-trace.txt

Lines changed: 0 additions & 68 deletions
This file was deleted.

doc/openocd.texi

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7345,12 +7345,13 @@ flash bank $_FLASHNAME npcx 0x64000000 0 0 0 $_TARGETNAME
73457345
@end deffn
73467346

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

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

88288829
@section PLD/FPGA Drivers, Options, and Commands
88298830

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

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

89168917

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

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

89258925
As input file format the driver supports a '.rbf' (raw bitstream file) file. The '.rbf' file can be generated
89268926
from a '.sof' file with @verb{|quartus_cpf -c blinker.sof blinker.rbf|}
@@ -11376,7 +11376,6 @@ tunneled DR scan consists of:
1137611376
@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.
1137711377
@item 3 bits of zero that the tunnel uses to go back to idle state.
1137811378
@end enumerate
11379-
1138011379
@end deffn
1138111380

1138211381
@deffn {Command} {riscv set_bscan_tunnel_ir} value

src/flash/nor/ambiqmicro.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ FLASH_BANK_COMMAND_HANDLER(ambiqmicro_flash_bank_command)
124124
if (CMD_ARGC < 6)
125125
return ERROR_COMMAND_SYNTAX_ERROR;
126126

127-
ambiqmicro_info = calloc(sizeof(struct ambiqmicro_flash_bank), 1);
127+
ambiqmicro_info = calloc(1, sizeof(struct ambiqmicro_flash_bank));
128128

129129
bank->driver_priv = ambiqmicro_info;
130130

src/flash/nor/at91sam7.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static int at91sam7_read_part_info(struct flash_bank *bank)
560560
if (bnk > 0) {
561561
if (!t_bank->next) {
562562
/* create a new flash bank element */
563-
struct flash_bank *fb = calloc(sizeof(struct flash_bank), 1);
563+
struct flash_bank *fb = calloc(1, sizeof(struct flash_bank));
564564
if (!fb) {
565565
LOG_ERROR("No memory for flash bank");
566566
return ERROR_FAIL;
@@ -748,7 +748,7 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
748748
if (bnk > 0) {
749749
if (!t_bank->next) {
750750
/* create a new bank element */
751-
struct flash_bank *fb = calloc(sizeof(struct flash_bank), 1);
751+
struct flash_bank *fb = calloc(1, sizeof(struct flash_bank));
752752
if (!fb) {
753753
LOG_ERROR("No memory for flash bank");
754754
return ERROR_FAIL;

src/flash/nor/core.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ struct flash_sector {
3232
uint32_t size;
3333
/**
3434
* Indication of erasure status: 0 = not erased, 1 = erased,
35-
* other = unknown. Set by @c flash_driver_s::erase_check only.
35+
* other = unknown. Set by @c flash_driver::erase_check only.
3636
*
3737
* This information must be considered stale immediately.
38-
* Don't set it in flash_driver_s::erase or a device mass_erase
39-
* Don't clear it in flash_driver_s::write
38+
* Don't set it in flash_driver::erase or a device mass_erase
39+
* Don't clear it in flash_driver::write
4040
* The flag is not used in a protection block
4141
*/
4242
int is_erased;
4343
/**
4444
* Indication of protection status: 0 = unprotected/unlocked,
4545
* 1 = protected/locked, other = unknown. Set by
46-
* @c flash_driver_s::protect_check.
46+
* @c flash_driver::protect_check.
4747
*
4848
* This information must be considered stale immediately.
4949
* A million things could make it stale: power cycle,
@@ -67,7 +67,7 @@ struct flash_sector {
6767
* a major interface.
6868
*
6969
* This structure will be passed as a parameter to the callbacks in the
70-
* flash_driver_s structure, some of which may modify the contents of
70+
* flash_driver structure, some of which may modify the contents of
7171
* this structure of the area of flash that it defines. Driver writers
7272
* may use the @c driver_priv member to store additional data on a
7373
* per-bank basis, if required.

src/flash/nor/driver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct flash_bank;
2929
* flash bank DRIVERNAME ...parameters...
3030
* @endcode
3131
*
32-
* OpenOCD will search for the driver with a @c flash_driver_s::name
32+
* OpenOCD will search for the driver with a @c flash_driver::name
3333
* that matches @c DRIVERNAME.
3434
*
3535
* The flash subsystem calls some of the other drivers routines a using
@@ -170,7 +170,7 @@ struct flash_driver {
170170
/**
171171
* Check the erasure status of a flash bank.
172172
* When called, the driver routine must perform the required
173-
* checks and then set the @c flash_sector_s::is_erased field
173+
* checks and then set the @c flash_sector::is_erased field
174174
* for each of the flash banks's sectors.
175175
*
176176
* @param bank The bank to check
@@ -182,7 +182,7 @@ struct flash_driver {
182182
* Determine if the specific bank is "protected" or not.
183183
* When called, the driver routine must must perform the
184184
* required protection check(s) and then set the @c
185-
* flash_sector_s::is_protected field for each of the flash
185+
* flash_sector::is_protected field for each of the flash
186186
* bank's sectors.
187187
*
188188
* If protection is not implemented, set method to NULL
@@ -204,7 +204,7 @@ struct flash_driver {
204204
int (*info)(struct flash_bank *bank, struct command_invocation *cmd);
205205

206206
/**
207-
* A more gentle flavor of flash_driver_s::probe, performing
207+
* A more gentle flavor of flash_driver::probe, performing
208208
* setup with less noise. Generally, driver routines should test
209209
* to see if the bank has already been probed; if it has, the
210210
* driver probably should not perform its probe a second time.

src/flash/nor/kinetis.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ FLASH_BANK_COMMAND_HANDLER(kinetis_flash_bank_command)
930930
k_chip = kinetis_get_chip(target);
931931

932932
if (!k_chip) {
933-
k_chip = calloc(sizeof(struct kinetis_chip), 1);
933+
k_chip = calloc(1, sizeof(struct kinetis_chip));
934934
if (!k_chip) {
935935
LOG_ERROR("No memory");
936936
return ERROR_FAIL;
@@ -1031,7 +1031,7 @@ static int kinetis_create_missing_banks(struct kinetis_chip *k_chip)
10311031
bank_idx - k_chip->num_pflash_blocks);
10321032
}
10331033

1034-
bank = calloc(sizeof(struct flash_bank), 1);
1034+
bank = calloc(1, sizeof(struct flash_bank));
10351035
if (!bank)
10361036
return ERROR_FAIL;
10371037

src/flash/nor/max32xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ FLASH_BANK_COMMAND_HANDLER(max32xxx_flash_bank_command)
8787
return ERROR_FLASH_BANK_INVALID;
8888
}
8989

90-
info = calloc(sizeof(struct max32xxx_flash_bank), 1);
90+
info = calloc(1, sizeof(struct max32xxx_flash_bank));
9191
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[2], info->flash_size);
9292
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[6], info->flc_base);
9393
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[7], info->sector_size);

src/flash/nor/msp432.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static int msp432_probe(struct flash_bank *bank)
937937

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

0 commit comments

Comments
 (0)