From bc7e7d21128f8aaac4d2b6191bfd904fe76f7deb Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Mon, 18 Jun 2012 20:27:06 +1200 Subject: Removed target header files containing a single prototype. Target probe prototypes are all in target.h now. --- src/adiv5.c | 2 -- src/cortexm.c | 10 ++++------ src/include/cortexm.h | 33 --------------------------------- src/include/lmi.h | 29 ----------------------------- src/include/nxp_tgt.h | 28 ---------------------------- src/include/stm32.h | 30 ------------------------------ src/include/target.h | 9 +++++++++ src/nxp_tgt.c | 1 - src/stm32f1.c | 1 - src/stm32f4.c | 1 - 10 files changed, 13 insertions(+), 131 deletions(-) delete mode 100644 src/include/cortexm.h delete mode 100644 src/include/lmi.h delete mode 100644 src/include/nxp_tgt.h delete mode 100644 src/include/stm32.h (limited to 'src') diff --git a/src/adiv5.c b/src/adiv5.c index 65068e3..ee9ef56 100644 --- a/src/adiv5.c +++ b/src/adiv5.c @@ -36,8 +36,6 @@ #include "target.h" -#include "cortexm.h" - #ifndef DO_RESET_SEQ #define DO_RESET_SEQ 0 #endif diff --git a/src/cortexm.c b/src/cortexm.c index a3da2bf..bd67e10 100644 --- a/src/cortexm.c +++ b/src/cortexm.c @@ -36,14 +36,12 @@ #include "adiv5.h" #include "target.h" -#include "cortexm.h" -#include "lmi.h" -#include "stm32.h" -#include "nxp_tgt.h" -#include "sam3u.h" - static char cortexm_driver_str[] = "ARM Cortex-M3"; +/* target options recognised by the Cortex-M target */ +#define TOPT_FLAVOUR_V6M (1<<0) /* if not set, target is assumed to be v7m */ +#define TOPT_FLAVOUR_V7MF (1<<1) /* if set, floating-point enabled. */ + /* Private peripheral bus base address */ #define CORTEXM_PPB_BASE 0xE0000000 diff --git a/src/include/cortexm.h b/src/include/cortexm.h deleted file mode 100644 index fe4ac83..0000000 --- a/src/include/cortexm.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the Black Magic Debug project. - * - * Copyright (C) 2011 Black Sphere Technologies Ltd. - * Written by Gareth McMullin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __CORTEXM_H -#define __CORTEXM_H - -#include "target.h" - -/* target options recognised by the Cortex-M target */ -#define TOPT_FLAVOUR_V6M (1<<0) /* if not set, target is assumed to be v7m */ -#define TOPT_FLAVOUR_V7MF (1<<1) /* if set, floating-point enabled. */ - -int cortexm_probe(struct target_s *target); - -#endif - diff --git a/src/include/lmi.h b/src/include/lmi.h deleted file mode 100644 index ac21a33..0000000 --- a/src/include/lmi.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of the Black Magic Debug project. - * - * Copyright (C) 2011 Black Sphere Technologies Ltd. - * Written by Gareth McMullin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __LMI_H -#define __LMI_H - -#include "target.h" - -int lmi_probe(struct target_s *target); - -#endif - diff --git a/src/include/nxp_tgt.h b/src/include/nxp_tgt.h deleted file mode 100644 index 20e4d5a..0000000 --- a/src/include/nxp_tgt.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of the Black Magic Debug project. - * - * Copyright (C) 2011 Black Sphere Technologies Ltd. - * Written by Gareth McMullin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __NXP_TGT_H -#define __NXP_TGT_H - -#include "target.h" - -int lpc11xx_probe(struct target_s *target); - -#endif diff --git a/src/include/stm32.h b/src/include/stm32.h deleted file mode 100644 index 9413737..0000000 --- a/src/include/stm32.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of the Black Magic Debug project. - * - * Copyright (C) 2011 Black Sphere Technologies Ltd. - * Written by Gareth McMullin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __STM32_H -#define __STM32_H - -#include "target.h" - -int stm32f1_probe(struct target_s *target); -int stm32f4_probe(struct target_s *target); - -#endif - diff --git a/src/include/target.h b/src/include/target.h index 5630b93..6f97950 100644 --- a/src/include/target.h +++ b/src/include/target.h @@ -176,5 +176,14 @@ typedef struct target_s { extern target *target_list, *cur_target, *last_target; +/* Probe for various targets. + * Actual functions implemented in their respective drivers. + */ +int cortexm_probe(struct target_s *target); +int stm32f1_probe(struct target_s *target); +int stm32f4_probe(struct target_s *target); +int lmi_probe(struct target_s *target); +int lpc11xx_probe(struct target_s *target); + #endif diff --git a/src/nxp_tgt.c b/src/nxp_tgt.c index e703eb2..8973c76 100644 --- a/src/nxp_tgt.c +++ b/src/nxp_tgt.c @@ -6,7 +6,6 @@ #include "general.h" #include "adiv5.h" #include "target.h" -#include "nxp_tgt.h" #define IAP_PGM_CHUNKSIZE 256 /* should fit in RAM on any device */ diff --git a/src/stm32f1.c b/src/stm32f1.c index 2cce513..1b4dff6 100644 --- a/src/stm32f1.c +++ b/src/stm32f1.c @@ -35,7 +35,6 @@ #include "general.h" #include "adiv5.h" #include "target.h" -#include "stm32.h" static int stm32md_flash_erase(struct target_s *target, uint32_t addr, int len); static int stm32hd_flash_erase(struct target_s *target, uint32_t addr, int len); diff --git a/src/stm32f4.c b/src/stm32f4.c index 790f97d..e7593b2 100644 --- a/src/stm32f4.c +++ b/src/stm32f4.c @@ -36,7 +36,6 @@ #include "general.h" #include "adiv5.h" #include "target.h" -#include "stm32.h" static int stm32f4_flash_erase(struct target_s *target, uint32_t addr, int len); static int stm32f4_flash_write_words(struct target_s *target, uint32_t dest, const uint32_t *src, -- cgit v1.2.3