87c90393fe
Remove a use of AH_BOTTOM from configure.ac. This macro is used by autoheader to add '#include' of some include file to the end of config.h.in and then to config.h. OpenOCD can be built with a custom config.h, so it's preferable to move these '#include' statement directly in the C files that need them dropping this unneeded dependency. It also causes problems when I want to use the gnulib library (which comes with its own Makefile, and does not have the same include path as the top-level Makefile). So this change touches a lot of files, but is actually really simple. It does not affect functionality at all. Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/6171 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
118 lines
3.3 KiB
C
118 lines
3.3 KiB
C
/***************************************************************************
|
|
* Copyright (C) 2013 Andes Technology *
|
|
* Hsiangkai Wang <hkwang@andestech.com> *
|
|
* *
|
|
* 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 2 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 <http://www.gnu.org/licenses/>. *
|
|
***************************************************************************/
|
|
|
|
#ifndef OPENOCD_TARGET_NDS32_EDM_H
|
|
#define OPENOCD_TARGET_NDS32_EDM_H
|
|
|
|
#include "helper/types.h"
|
|
|
|
/**
|
|
* @file
|
|
* This is the interface to the Embedded Debug Module for Andes cores.
|
|
*/
|
|
|
|
/* EDM misc registers */
|
|
enum nds_edm_misc_reg {
|
|
NDS_EDM_MISC_DIMIR = 0x0,
|
|
NDS_EDM_MISC_SBAR,
|
|
NDS_EDM_MISC_EDM_CMDR,
|
|
NDS_EDM_MISC_DBGER,
|
|
NDS_EDM_MISC_ACC_CTL,
|
|
NDS_ED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
|
|
NDS_EDM_SR_EDMSW = 0x30,
|
|
NDS_EDM_SR_EDM_CTL = 0x38,
|
|
NDS_EDM_SR_EDM_DTR = 0x40,
|
|
NDS_EDM_SR_BPMTV = 0x48,
|
|
NDS_EDM_SR_DIMBR = 0x50,
|
|
NDS_EDM_SR_TECR0 = 0x70,
|
|
NDS_EDM_SR_TECR1 = 0x71,
|
|
};
|
|
|
|
enum nds_memory_access {
|
|
NDS_MEMORY_ACC_BUS = 0,
|
|
NDS_MEMORY_ACC_CPU,
|
|
};
|
|
|
|
enum nds_memory_select {
|
|
NDS_MEMORY_SELECT_AUTO = 0,
|
|
NDS_MEMORY_SELECT_MEM = 1,
|
|
NDS_MEMORY_SELECT_ILM = 2,
|
|
NDS_MEMORY_SELECT_DLM = 3,
|
|
};
|
|
|
|
#define NDS_DBGER_DEX (0x1)
|
|
#define NDS_DBGER_DPED (0x2)
|
|
#define NDS_DBGER_CRST (0x4)
|
|
#define NDS_DBGER_AT_MAX (0x8)
|
|
#define NDS_DBGER_ILL_SEC_ACC (0x10)
|
|
#define NDS_DBGER_ALL_SUPRS_EX (0x40000000)
|
|
#define NDS_DBGER_RESACC (0x80000000)
|
|
#define NDS_DBGER_CLEAR_ALL (0x1F)
|
|
|
|
#define NDS_EDMSW_WDV (1 << 0)
|
|
#define NDS_EDMSW_RDV (1 << 1)
|
|
|
|
#endif /* OPENOCD_TARGET_NDS32_EDM_H */
|