|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-13 22:14:32
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 5d6be673c36b00eb962cbb441dd557d3cc8eb03c (commit)
via efa2068f1a2b1d6e96c9aa4067174787207ff2bc (commit)
from a79927dd925362850169c500058f457e1ad4e457 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5d6be673c36b00eb962cbb441dd557d3cc8eb03c
Author: Antonio Borneo <bor...@gm...>
Date: Tue Sep 6 01:28:09 2022 +0200
target: don't export local symbols
Symbols that are not used outside the file should not be exported
and should be declared as static.
Change-Id: Icbe7f7bce287b903edec9dc9db3370722c51fbd5
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7173
Tested-by: jenkins
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/src/target/arm.h b/src/target/arm.h
index bcfa85c79..de46ffb4b 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -310,7 +310,4 @@ void arm_set_cpsr(struct arm *arm, uint32_t cpsr);
struct reg *arm_reg_current(struct arm *arm, unsigned regnum);
struct reg *armv8_reg_current(struct arm *arm, unsigned regnum);
-extern struct reg arm_gdb_dummy_fp_reg;
-extern struct reg arm_gdb_dummy_fps_reg;
-
#endif /* OPENOCD_TARGET_ARM_H */
diff --git a/src/target/arm946e.c b/src/target/arm946e.c
index d2bccad22..3f8a88105 100644
--- a/src/target/arm946e.c
+++ b/src/target/arm946e.c
@@ -44,7 +44,7 @@ static int arm946e_post_debug_entry(struct target *target);
static void arm946e_pre_restore_context(struct target *target);
static int arm946e_read_cp15(struct target *target, int reg_addr, uint32_t *value);
-int arm946e_init_arch_info(struct target *target,
+static int arm946e_init_arch_info(struct target *target,
struct arm946e_common *arm946e,
struct jtag_tap *tap)
{
@@ -173,7 +173,7 @@ static int arm946e_read_cp15(struct target *target, int reg_addr, uint32_t *valu
return ERROR_OK;
}
-int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value)
+static int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value)
{
int retval = ERROR_OK;
struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
@@ -720,7 +720,7 @@ static const struct command_registration arm946e_exec_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
-const struct command_registration arm946e_command_handlers[] = {
+static const struct command_registration arm946e_command_handlers[] = {
{
.chain = arm9tdmi_command_handlers,
},
diff --git a/src/target/arm946e.h b/src/target/arm946e.h
index 741687869..0196c2b37 100644
--- a/src/target/arm946e.h
+++ b/src/target/arm946e.h
@@ -32,10 +32,4 @@ static inline struct arm946e_common *target_to_arm946(struct target *target)
arm7_9_common.arm);
}
-int arm946e_init_arch_info(struct target *target,
- struct arm946e_common *arm946e, struct jtag_tap *tap);
-int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value);
-
-extern const struct command_registration arm946e_command_handlers[];
-
#endif /* OPENOCD_TARGET_ARM946E_H */
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 321772699..66e276f16 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -535,7 +535,7 @@ static struct reg_feature arm_gdb_dummy_fp_features = {
* Modern ARM cores use Vector Floating Point (VFP), if they
* have any floating point support. VFP is not FPA-compatible.
*/
-struct reg arm_gdb_dummy_fp_reg = {
+static struct reg arm_gdb_dummy_fp_reg = {
.name = "GDB dummy FPA register",
.value = (uint8_t *) arm_gdb_dummy_fp_value,
.valid = true,
@@ -552,7 +552,7 @@ static const uint8_t arm_gdb_dummy_fps_value[4];
* Dummy FPA status registers are required to support GDB on ARM.
* Register packets require an obsolete FPA status register.
*/
-struct reg arm_gdb_dummy_fps_reg = {
+static struct reg arm_gdb_dummy_fps_reg = {
.name = "GDB dummy FPA status register",
.value = (uint8_t *) arm_gdb_dummy_fps_value,
.valid = true,
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c
index 621caaf37..9a6e8dbe7 100644
--- a/src/target/dsp5680xx.c
+++ b/src/target/dsp5680xx.c
@@ -16,7 +16,7 @@
#include "target_type.h"
#include "dsp5680xx.h"
-struct dsp5680xx_common dsp5680xx_context;
+static struct dsp5680xx_common dsp5680xx_context;
#define _E "DSP5680XX_ERROR:%d\nAt:%s:%d:%s"
#define err_check(r, c, m) if (r != ERROR_OK) {LOG_ERROR(_E, c, __func__, __LINE__, m); return r; }
diff --git a/src/target/dsp5680xx.h b/src/target/dsp5680xx.h
index 3c03ac269..152f44697 100644
--- a/src/target/dsp5680xx.h
+++ b/src/target/dsp5680xx.h
@@ -278,8 +278,6 @@ struct dsp5680xx_common {
bool debug_mode_enabled;
};
-extern struct dsp5680xx_common dsp5680xx_context;
-
static inline struct dsp5680xx_common *target_to_dsp5680xx(struct target
*target)
{
diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c
index 79d929c54..9f5840e55 100644
--- a/src/target/mips32_pracc.c
+++ b/src/target/mips32_pracc.c
@@ -150,7 +150,7 @@ static int mips32_pracc_clean_text_jump(struct mips_ejtag *ejtag_info)
return ERROR_OK;
}
-int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_info *ctx,
+static int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_info *ctx,
uint32_t *param_out, bool check_last)
{
int code_count = 0;
@@ -323,7 +323,7 @@ void pracc_add(struct pracc_queue_info *ctx, uint32_t addr, uint32_t instr)
ctx->store_count++;
}
-void pracc_add_li32(struct pracc_queue_info *ctx, uint32_t reg_num, uint32_t data, bool optimize)
+static void pracc_add_li32(struct pracc_queue_info *ctx, uint32_t reg_num, uint32_t data, bool optimize)
{
if (LOWER16(data) == 0 && optimize)
pracc_add(ctx, 0, MIPS32_LUI(ctx->isa, reg_num, UPPER16(data))); /* load only upper value */
diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h
index a736e668a..1b0076867 100644
--- a/src/target/mips32_pracc.h
+++ b/src/target/mips32_pracc.h
@@ -53,7 +53,6 @@ struct pracc_queue_info {
void pracc_queue_init(struct pracc_queue_info *ctx);
void pracc_add(struct pracc_queue_info *ctx, uint32_t addr, uint32_t instr);
-void pracc_add_li32(struct pracc_queue_info *ctx, uint32_t reg_num, uint32_t data, bool optimize);
void pracc_queue_free(struct pracc_queue_info *ctx);
int mips32_pracc_queue_exec(struct mips_ejtag *ejtag_info,
struct pracc_queue_info *ctx, uint32_t *buf, bool check_last);
@@ -68,9 +67,6 @@ int mips32_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_are
int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs);
int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs);
-int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_info *ctx,
- uint32_t *param_out, bool check_last);
-
/**
* \b mips32_cp0_read
*
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 8d13447a0..247570289 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -1357,7 +1357,7 @@ static const struct command_registration mips_m4k_exec_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
-const struct command_registration mips_m4k_command_handlers[] = {
+static const struct command_registration mips_m4k_command_handlers[] = {
{
.chain = mips32_command_handlers,
},
diff --git a/src/target/mips_m4k.h b/src/target/mips_m4k.h
index 8026de232..f63d72f73 100644
--- a/src/target/mips_m4k.h
+++ b/src/target/mips_m4k.h
@@ -43,6 +43,5 @@ static inline void mips_m4k_isa_filter(enum mips32_isa_imp isa_imp, target_addr_
}
}
}
-extern const struct command_registration mips_m4k_command_handlers[];
#endif /* OPENOCD_TARGET_MIPS_M4K_H */
commit efa2068f1a2b1d6e96c9aa4067174787207ff2bc
Author: Antonio Borneo <bor...@gm...>
Date: Tue Sep 6 00:57:11 2022 +0200
flash/nor: move variable's declaration in C file
Variables should not be declared in the include file, otherwise
multiple include will cause multiple instances.
Move the declaration in the C file and make it static.
Change-Id: I8b4884cba643a792a78df4e123aa324b19d92279
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7172
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
diff --git a/src/flash/nor/cc26xx.c b/src/flash/nor/cc26xx.c
index b8d18a7d9..9fbb880b4 100644
--- a/src/flash/nor/cc26xx.c
+++ b/src/flash/nor/cc26xx.c
@@ -34,6 +34,16 @@ struct cc26xx_bank {
uint32_t params_addr[2];
};
+/* Flash helper algorithm for CC26x0 Chameleon targets */
+static const uint8_t cc26x0_algo[] = {
+#include "../../../contrib/loaders/flash/cc26xx/cc26x0_algo.inc"
+};
+
+/* Flash helper algorithm for CC26x2 Agama targets */
+static const uint8_t cc26x2_algo[] = {
+#include "../../../contrib/loaders/flash/cc26xx/cc26x2_algo.inc"
+};
+
static int cc26xx_auto_probe(struct flash_bank *bank);
static uint32_t cc26xx_device_type(uint32_t icepick_id, uint32_t user_id)
diff --git a/src/flash/nor/cc26xx.h b/src/flash/nor/cc26xx.h
index fdba73939..83fc94024 100644
--- a/src/flash/nor/cc26xx.h
+++ b/src/flash/nor/cc26xx.h
@@ -77,14 +77,4 @@ struct cc26xx_algo_params {
uint8_t status[4];
};
-/* Flash helper algorithm for CC26x0 Chameleon targets */
-const uint8_t cc26x0_algo[] = {
-#include "../../../contrib/loaders/flash/cc26xx/cc26x0_algo.inc"
-};
-
-/* Flash helper algorithm for CC26x2 Agama targets */
-const uint8_t cc26x2_algo[] = {
-#include "../../../contrib/loaders/flash/cc26xx/cc26x2_algo.inc"
-};
-
#endif /* OPENOCD_FLASH_NOR_CC26XX_H */
diff --git a/src/flash/nor/cc3220sf.c b/src/flash/nor/cc3220sf.c
index b639bd109..6493d6c83 100644
--- a/src/flash/nor/cc3220sf.c
+++ b/src/flash/nor/cc3220sf.c
@@ -22,6 +22,11 @@ struct cc3220sf_bank {
struct armv7m_algorithm armv7m_info;
};
+/* Flash helper algorithm for CC3220SF */
+static const uint8_t cc3220sf_algo[] = {
+#include "../../../contrib/loaders/flash/cc3220sf/cc3220sf.inc"
+};
+
static int cc3220sf_mass_erase(struct flash_bank *bank)
{
struct target *target = bank->target;
diff --git a/src/flash/nor/cc3220sf.h b/src/flash/nor/cc3220sf.h
index 7e935f23a..eb2a6c648 100644
--- a/src/flash/nor/cc3220sf.h
+++ b/src/flash/nor/cc3220sf.h
@@ -26,9 +26,4 @@
#define FMC_ERASE_VALUE (FMC_DEFAULT_VALUE | FMC_ERASE_BIT)
#define FMC_MERASE_VALUE (FMC_DEFAULT_VALUE | FMC_MERASE_BIT)
-/* Flash helper algorithm for CC3220SF */
-const uint8_t cc3220sf_algo[] = {
-#include "../../../contrib/loaders/flash/cc3220sf/cc3220sf.inc"
-};
-
#endif /* OPENOCD_FLASH_NOR_CC3220SF_H */
diff --git a/src/flash/nor/msp432.c b/src/flash/nor/msp432.c
index 931c4ff66..6adf6c34b 100644
--- a/src/flash/nor/msp432.c
+++ b/src/flash/nor/msp432.c
@@ -45,6 +45,21 @@ struct msp432_bank {
struct armv7m_algorithm armv7m_info;
};
+/* Flash helper algorithm for MSP432P401x targets */
+static const uint8_t msp432p401x_algo[] = {
+#include "../../../contrib/loaders/flash/msp432/msp432p401x_algo.inc"
+};
+
+/* Flash helper algorithm for MSP432P411x targets */
+static const uint8_t msp432p411x_algo[] = {
+#include "../../../contrib/loaders/flash/msp432/msp432p411x_algo.inc"
+};
+
+/* Flash helper algorithm for MSP432E4x targets */
+static const uint8_t msp432e4x_algo[] = {
+#include "../../../contrib/loaders/flash/msp432/msp432e4x_algo.inc"
+};
+
static int msp432_auto_probe(struct flash_bank *bank);
static int msp432_device_type(uint32_t family_type, uint32_t device_id,
diff --git a/src/flash/nor/msp432.h b/src/flash/nor/msp432.h
index 504e7a8ec..d0a62c488 100644
--- a/src/flash/nor/msp432.h
+++ b/src/flash/nor/msp432.h
@@ -101,19 +101,4 @@ struct msp432_algo_params {
uint8_t unlock_bsl[4];
};
-/* Flash helper algorithm for MSP432P401x targets */
-const uint8_t msp432p401x_algo[] = {
-#include "../../../contrib/loaders/flash/msp432/msp432p401x_algo.inc"
-};
-
-/* Flash helper algorithm for MSP432P411x targets */
-const uint8_t msp432p411x_algo[] = {
-#include "../../../contrib/loaders/flash/msp432/msp432p411x_algo.inc"
-};
-
-/* Flash helper algorithm for MSP432E4x targets */
-const uint8_t msp432e4x_algo[] = {
-#include "../../../contrib/loaders/flash/msp432/msp432e4x_algo.inc"
-};
-
#endif /* OPENOCD_FLASH_NOR_MSP432_H */
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/cc26xx.c | 10 ++++++++++
src/flash/nor/cc26xx.h | 10 ----------
src/flash/nor/cc3220sf.c | 5 +++++
src/flash/nor/cc3220sf.h | 5 -----
src/flash/nor/msp432.c | 15 +++++++++++++++
src/flash/nor/msp432.h | 15 ---------------
src/target/arm.h | 3 ---
src/target/arm946e.c | 6 +++---
src/target/arm946e.h | 6 ------
src/target/armv4_5.c | 4 ++--
src/target/dsp5680xx.c | 2 +-
src/target/dsp5680xx.h | 2 --
src/target/mips32_pracc.c | 4 ++--
src/target/mips32_pracc.h | 4 ----
src/target/mips_m4k.c | 2 +-
src/target/mips_m4k.h | 1 -
16 files changed, 39 insertions(+), 55 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|