diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2022-09-06 00:57:11 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-09-13 22:13:50 +0000 |
commit | efa2068f1a2b1d6e96c9aa4067174787207ff2bc (patch) | |
tree | fb3775e4f6597429fef552169c080657f38c3895 /src/flash/nor/cc26xx.c | |
parent | a79927dd925362850169c500058f457e1ad4e457 (diff) | |
download | riscv-openocd-efa2068f1a2b1d6e96c9aa4067174787207ff2bc.zip riscv-openocd-efa2068f1a2b1d6e96c9aa4067174787207ff2bc.tar.gz riscv-openocd-efa2068f1a2b1d6e96c9aa4067174787207ff2bc.tar.bz2 |
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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7172
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Diffstat (limited to 'src/flash/nor/cc26xx.c')
-rw-r--r-- | src/flash/nor/cc26xx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/flash/nor/cc26xx.c b/src/flash/nor/cc26xx.c index b8d18a7..9fbb880 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) |