summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/openocd
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-05-09 11:59:59 -0700
committerArmin Kuster <akuster808@gmail.com>2018-05-17 08:20:49 -0700
commit31cebbf0d5705c9c303e6cdf08099c69d509ecda (patch)
tree59d3bd569e859a401537be1fca43c9aa66f025f0 /meta-oe/recipes-devtools/openocd
parent6412bb5530f0f5e31b8b30846cc4bee46c81dcd3 (diff)
downloadmeta-openembedded-31cebbf0d5705c9c303e6cdf08099c69d509ecda.tar.gz
openocd: Upgrade to tip of master
Drop upstreamed patches Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/openocd')
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch155
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch53
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch27
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch30
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch27
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd_git.bb7
6 files changed, 1 insertions, 298 deletions
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch b/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch
deleted file mode 100644
index 644146c4d..000000000
--- a/meta-oe/recipes-devtools/openocd/openocd/0001-Add-fallthrough-comments.patch
+++ /dev/null
@@ -1,155 +0,0 @@
1From 8f85163b030e7b957648f90cd8fa599fb04d5d65 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 16 Jun 2017 23:32:49 -0700
4Subject: [PATCH 1/5] Add fallthrough comments
5
6Fixes
7
8src/svf/svf.c:663:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
9 i = -1;
10 ~~^~~~
11
12Upstream-Status: Pending
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 src/flash/mflash.c | 3 ++-
17 src/flash/nand/mx3.c | 1 +
18 src/jtag/drivers/ftdi.c | 1 +
19 src/svf/svf.c | 2 ++
20 src/target/arm_adi_v5.c | 9 +++++++++
21 src/target/arm_disassembler.c | 1 +
22 src/target/target.c | 1 +
23 7 files changed, 17 insertions(+), 1 deletion(-)
24
25diff --git a/src/flash/mflash.c b/src/flash/mflash.c
26index b69995542..3254a3d56 100644
27--- a/src/flash/mflash.c
28+++ b/src/flash/mflash.c
29@@ -259,10 +259,11 @@ static int mg_dsk_wait(mg_io_type_wait wait_local, uint32_t time_var)
30 case mg_io_wait_rdy:
31 if (status & mg_io_rbit_status_ready)
32 return ERROR_OK;
33-
34+ /* fallthru */
35 case mg_io_wait_drq:
36 if (status & mg_io_rbit_status_data_req)
37 return ERROR_OK;
38+ /* fallthru */
39
40 default:
41 break;
42diff --git a/src/flash/nand/mx3.c b/src/flash/nand/mx3.c
43index b61e47535..0a55929ed 100644
44--- a/src/flash/nand/mx3.c
45+++ b/src/flash/nand/mx3.c
46@@ -281,6 +281,7 @@ static int imx31_command(struct nand_device *nand, uint8_t command)
47 * offset == one half of page size
48 */
49 in_sram_address = MX3_NF_MAIN_BUFFER0 + (nand->page_size >> 1);
50+ /* fallthru */
51 default:
52 in_sram_address = MX3_NF_MAIN_BUFFER0;
53 }
54diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
55index 00fe37faf..20f17d810 100644
56--- a/src/jtag/drivers/ftdi.c
57+++ b/src/jtag/drivers/ftdi.c
58@@ -855,6 +855,7 @@ COMMAND_HANDLER(ftdi_handle_set_signal_command)
59 ftdi_set_signal(sig, *CMD_ARGV[1]);
60 break;
61 }
62+ /* fallthru */
63 default:
64 LOG_ERROR("unknown signal level '%s', use 0, 1 or z", CMD_ARGV[1]);
65 return ERROR_COMMAND_SYNTAX_ERROR;
66diff --git a/src/svf/svf.c b/src/svf/svf.c
67index e7e815c10..7b261cc72 100644
68--- a/src/svf/svf.c
69+++ b/src/svf/svf.c
70@@ -661,11 +661,13 @@ static int svf_read_command_from_file(FILE *fd)
71 if (svf_getline(&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
72 return ERROR_FAIL;
73 i = -1;
74+ /* fallthru */
75 case '\r':
76 slash = 0;
77 /* Don't save '\r' and '\n' if no data is parsed */
78 if (!cmd_pos)
79 break;
80+ /* fallthru */
81 default:
82 /* The parsing code currently expects a space
83 * before parentheses -- "TDI (123)". Also a
84diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
85index eafc2ddc0..d444db2b1 100644
86--- a/src/target/arm_adi_v5.c
87+++ b/src/target/arm_adi_v5.c
88@@ -346,10 +346,13 @@ static int mem_ap_write(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t siz
89 case 4:
90 outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
91 outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
92+ /* fallthru */
93 case 2:
94 outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
95+ /* fallthru */
96 case 1:
97 outvalue |= (uint32_t)*buffer++ << 8 * (address++ & 3);
98+ /* fallthru */
99 }
100 }
101
102@@ -509,20 +512,26 @@ static int mem_ap_read(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint
103 case 4:
104 *buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
105 *buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
106+ /* fallthru */
107 case 2:
108 *buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
109+ /* fallthru */
110 case 1:
111 *buffer++ = *read_ptr >> 8 * (3 - (address++ & 3));
112+ /* fallthru */
113 }
114 } else {
115 switch (this_size) {
116 case 4:
117 *buffer++ = *read_ptr >> 8 * (address++ & 3);
118 *buffer++ = *read_ptr >> 8 * (address++ & 3);
119+ /* fallthru */
120 case 2:
121 *buffer++ = *read_ptr >> 8 * (address++ & 3);
122+ /* fallthru */
123 case 1:
124 *buffer++ = *read_ptr >> 8 * (address++ & 3);
125+ /* fallthru */
126 }
127 }
128
129diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
130index 5277b94d8..2eb21ea33 100644
131--- a/src/target/arm_disassembler.c
132+++ b/src/target/arm_disassembler.c
133@@ -3299,6 +3299,7 @@ static int t2ev_data_immed(uint32_t opcode, uint32_t address,
134 case 0x10:
135 case 0x12:
136 is_signed = true;
137+ /* fallthru */
138 case 0x18:
139 case 0x1a:
140 /* signed/unsigned saturated add */
141diff --git a/src/target/target.c b/src/target/target.c
142index e04ecc470..597b4b13d 100644
143--- a/src/target/target.c
144+++ b/src/target/target.c
145@@ -3684,6 +3684,7 @@ COMMAND_HANDLER(handle_bp_command)
146 addr = 0;
147 return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
148 }
149+ /* fallthru */
150
151 case 4:
152 hw = BKPT_HARD;
153--
1542.13.1
155
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch b/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch
deleted file mode 100644
index aa99735f6..000000000
--- a/meta-oe/recipes-devtools/openocd/openocd/0002-Workaround-new-warnings-generated-by-GCC-7.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 8daaa8c27794653d02854c5982669a7638473224 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 16 Jun 2017 23:52:46 -0700
4Subject: [PATCH 2/5] Workaround new warnings generated by GCC 7
5
6src/flash/nor/xmc4xxx.c: In function 'xmc4xxx_get_info_command':
7src/flash/nor/xmc4xxx.c:939:43: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Werror=format-truncation=]
8 snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
9 ^~
10src/flash/nor/xmc4xxx.c:939:40: note: directive argument in the range [0, 2147483647]
11 snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
12 ^~~~~~~~
13src/flash/nor/xmc4xxx.c:939:5: note: 'snprintf' output between 5 and 14 bytes into a destination of size 8
14 snprintf(otp_str, sizeof(otp_str), "- %d\n", i);
15 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17Upstream-Status: Pending
18
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 src/flash/nor/xmc4xxx.c | 2 +-
22 src/target/arm_adi_v5.c | 2 +-
23 2 files changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c
26index 02df46a3f..e6c398ff9 100644
27--- a/src/flash/nor/xmc4xxx.c
28+++ b/src/flash/nor/xmc4xxx.c
29@@ -931,7 +931,7 @@ static int xmc4xxx_get_info_command(struct flash_bank *bank, char *buf, int buf_
30
31 /* If OTP Write protection is enabled (User 2), list each
32 * sector that has it enabled */
33- char otp_str[8];
34+ char otp_str[14];
35 if (otp_enabled) {
36 strcat(prot_str, "\nOTP Protection is enabled for sectors:\n");
37 for (int i = 0; i < bank->num_sectors; i++) {
38diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
39index d444db2b1..d0d95121f 100644
40--- a/src/target/arm_adi_v5.c
41+++ b/src/target/arm_adi_v5.c
42@@ -1062,7 +1062,7 @@ static int dap_rom_display(struct command_context *cmd_ctx,
43 int retval;
44 uint64_t pid;
45 uint32_t cid;
46- char tabs[7] = "";
47+ char tabs[16] = "";
48
49 if (depth > 16) {
50 command_print(cmd_ctx, "\tTables too deep");
51--
522.13.1
53
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch b/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch
deleted file mode 100644
index bcfbfc92b..000000000
--- a/meta-oe/recipes-devtools/openocd/openocd/0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 8e5051e83fedb078170565a24d1f5de6c2ce4428 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Jun 2017 00:01:51 -0700
4Subject: [PATCH 3/5] armv7a: Add missing break to fix fallthrough warning
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 src/target/armv7a.c | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/src/target/armv7a.c b/src/target/armv7a.c
14index 6021def4e..bad806b3d 100644
15--- a/src/target/armv7a.c
16+++ b/src/target/armv7a.c
17@@ -355,6 +355,7 @@ int armv7a_mmu_translate_va_pa(struct target *target, uint32_t va,
18 break;
19 case 7:
20 LOG_INFO("inner: Write-Back, no Write-Allocate");
21+ break;
22
23 default:
24 LOG_INFO("inner: %" PRIx32 " ???", INNER);
25--
262.13.1
27
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch b/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch
deleted file mode 100644
index bfc5627c1..000000000
--- a/meta-oe/recipes-devtools/openocd/openocd/0004-Fix-overflow-warning.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From d3ca56370a2be7e737d48bd14d474d790a0ab8ac Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Jun 2017 00:04:00 -0700
4Subject: [PATCH 4/5] Fix overflow warning
5
6Remove an empty space which makes it fit into 11 byte string
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/target/nds32_cmd.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/target/nds32_cmd.c b/src/target/nds32_cmd.c
16index edb4872e4..73355073c 100644
17--- a/src/target/nds32_cmd.c
18+++ b/src/target/nds32_cmd.c
19@@ -821,7 +821,7 @@ static int jim_nds32_bulk_read(Jim_Interp *interp, int argc, Jim_Obj * const *ar
20 jim_wide i;
21 Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
22 for (i = 0; i < count; i++) {
23- sprintf(data_str, "0x%08" PRIx32 " ", data[i]);
24+ sprintf(data_str, "0x%08" PRIx32 "", data[i]);
25 Jim_AppendStrings(interp, Jim_GetResult(interp), data_str, NULL);
26 }
27
28--
292.13.1
30
diff --git a/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch b/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch
deleted file mode 100644
index 60f75da2c..000000000
--- a/meta-oe/recipes-devtools/openocd/openocd/0005-command-Move-the-fall-through-comment-to-right-scope.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 29dbf92ffdbdda29662b4190a2f8eb09caad8b51 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Jun 2017 00:06:32 -0700
4Subject: [PATCH 5/5] command: Move the fall through comment to right scope
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 src/helper/command.c | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/src/helper/command.c b/src/helper/command.c
12index 5deaee859..287c14857 100644
13--- a/src/helper/command.c
14+++ b/src/helper/command.c
15@@ -1456,8 +1456,8 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const char *label)
16 LOG_ERROR("%s: argument '%s' is not valid", CMD_NAME, in);
17 return ERROR_COMMAND_SYNTAX_ERROR;
18 }
19- /* fall through */
20 }
21+ /* fall through */
22 case 0:
23 LOG_INFO("%s is %s", label, *out ? "enabled" : "disabled");
24 break;
25--
262.13.1
27
diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb
index 20bc663f9..67abeede9 100644
--- a/meta-oe/recipes-devtools/openocd/openocd_git.bb
+++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb
@@ -5,13 +5,8 @@ DEPENDS = "libusb-compat libftdi"
5RDEPENDS_${PN} = "libusb1" 5RDEPENDS_${PN} = "libusb1"
6 6
7SRC_URI = "git://repo.or.cz/openocd.git \ 7SRC_URI = "git://repo.or.cz/openocd.git \
8 file://0001-Add-fallthrough-comments.patch \
9 file://0002-Workaround-new-warnings-generated-by-GCC-7.patch \
10 file://0003-armv7a-Add-missing-break-to-fix-fallthrough-warning.patch \
11 file://0004-Fix-overflow-warning.patch \
12 file://0005-command-Move-the-fall-through-comment-to-right-scope.patch \
13" 8"
14SRCREV = "1025be363e2bf42f1613083223a2322cc3a9bd4c" 9SRCREV = "3737dd69e73816d186ba418d7b833462a8041079"
15 10
16PV = "0.10+gitr${SRCPV}" 11PV = "0.10+gitr${SRCPV}"
17S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"