import: pb5700_sdk-FPGA package
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType">
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateConsole" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateTelnetConsole" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doSecondReset" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbCLient" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbServer" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.enableSemihosting" value="false"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.firstResetType" value="init"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherCommands" value="set mem inaccessible-by-default off set remotetimeout 250 set arch riscv:rv32"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherOptions" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerConnectionAddress" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerExecutable" value="${openocd_path}/${openocd_executable}"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerOther" value="-f "${ProjDirPath}/../../../Tools/openocd/scripts/target/pb5700.cfg""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTclPortNumber" value="6666"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherRunCommands" value="monitor reset halt"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.secondResetType" value="halt"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value="${ProjDirPath}/../../../Drivers/PB5700/Device/inc/SVD/PB5700.svd"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU OpenOCD"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/Project.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="Project"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/Project"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||
<stringAttribute key="org.eclipse.embedcdt.debug.gdbjtag.core.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals/> "/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.jlink.launchConfigurationType">
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doConnectToRunning" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doContinue" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doDebugInRam" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doFirstReset" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerAllocateConsole" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerAllocateSemihostingConsole" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerInitRegs" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerLocalOnly" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerSilent" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doGdbServerVerifyDownload" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doSecondReset" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.doStartGdbServer" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.enableFlashBreakpoints" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.enableSemihosting" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.enableSemihostingIoclientGdbClient" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.enableSemihostingIoclientTelnet" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.enableSwo" value="true"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.firstResetSpeed" value="1000"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.firstResetType" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbClientOtherCommands" value="set mem inaccessible-by-default off"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbClientOtherOptions" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerConnection" value="usb"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerConnectionAddress" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerDebugInterface" value="jtag"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerDeviceEndianness" value="little"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerDeviceName" value="rv32"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerDeviceSpeed" value="auto"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerExecutable" value="${jlink_path}/${jlink_gdbserver}"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerGdbPortNumber" value="2331"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerLog" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerOther" value="-singlerun -strict -timeout 0 -nogui"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerSwoPortNumber" value="2332"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.gdbServerTelnetPortNumber" value="2333"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.interfaceSpeed" value="auto"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.otherInitCommands" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.otherRunCommands" value=""/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.secondResetType" value=""/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.swoEnableTargetCpuFreq" value="0"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.swoEnableTargetPortMask" value="0x1"/>
|
||||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.jlink.swoEnableTargetSwoFreq" value="0"/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value="${ProjDirPath}/../../../Drivers/PB5700/Device/inc/SVD/PB5700.svd"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU J-Link"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/Project.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="Project"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/Project"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;memoryBlockExpressionList context=&amp;quot;Context string&amp;quot;/&amp;gt;&amp;#13;&amp;#10;"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,349 @@
|
||||
#!/bin/sh
|
||||
# Generate tags or cscope files
|
||||
# Usage tags.sh <mode>
|
||||
#
|
||||
# mode may be any of: tags, TAGS, cscope
|
||||
#
|
||||
# Uses the following environment variables:
|
||||
# ARCH, SUBARCH, SRCARCH, srctree, src, obj
|
||||
|
||||
#
|
||||
# e.g.
|
||||
# $ make tags ARCH=arm
|
||||
# $ make gtags ARCH=arm
|
||||
# $ make cscope ARCH=arm
|
||||
#
|
||||
|
||||
if [ "$KBUILD_VERBOSE" = "1" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# RCS_FIND_IGNORE has escaped ()s -- remove them.
|
||||
ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )"
|
||||
# tags and cscope files should also ignore MODVERSION *.mod.c files
|
||||
ignore="$ignore ( -name *.mod.c ) -prune -o"
|
||||
|
||||
# Do not use full path if we do not use O=.. builds
|
||||
# Use make O=. {tags|cscope}
|
||||
# to force full paths for a non-O= build
|
||||
if [ "${KBUILD_SRC}" = "" ]; then
|
||||
tree=./
|
||||
else
|
||||
tree=${srctree}/
|
||||
fi
|
||||
|
||||
# ignore userspace tools
|
||||
ignore="$ignore ( -path ${tree}tools ) -prune -o"
|
||||
ignore="$ignore ( -path ${tree}out/syntax ) -prune -o"
|
||||
ignore="$ignore ( -path ${tree}out/uncrustify ) -prune -o"
|
||||
|
||||
# Find all available archs
|
||||
find_all_archs()
|
||||
{
|
||||
ALLSOURCE_ARCHS=""
|
||||
for arch in `ls ${tree}arch`; do
|
||||
ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/}
|
||||
done
|
||||
}
|
||||
|
||||
# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
|
||||
if [ "${ALLSOURCE_ARCHS}" = "" ]; then
|
||||
ALLSOURCE_ARCHS=${SRCARCH}
|
||||
elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then
|
||||
find_all_archs
|
||||
fi
|
||||
|
||||
# find sources in arch/$ARCH
|
||||
find_arch_sources()
|
||||
{
|
||||
for i in $archincludedir; do
|
||||
prune="$prune -wholename $i -prune -o"
|
||||
done
|
||||
find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" \
|
||||
-not -type l -print;
|
||||
}
|
||||
|
||||
# find sources in arch/$1/include
|
||||
find_arch_include_sources()
|
||||
{
|
||||
include=$(find ${tree}arch/$1/ $subarchprune \
|
||||
-name include -type d -print);
|
||||
if [ -n "$include" ]; then
|
||||
archincludedir="$archincludedir $include"
|
||||
find $include $ignore -name "$2" -not -type l -print;
|
||||
fi
|
||||
}
|
||||
|
||||
# find sources in include/
|
||||
find_include_sources()
|
||||
{
|
||||
find ${tree} $ignore -name config -prune -o -name "$1" \
|
||||
-not -type l -print;
|
||||
}
|
||||
|
||||
# find sources in rest of tree
|
||||
# we could benefit from a list of dirs to search in here
|
||||
find_other_sources()
|
||||
{
|
||||
find ${tree}* $ignore \
|
||||
\( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \
|
||||
-name "$1" -not -type l -print;
|
||||
}
|
||||
|
||||
find_sources()
|
||||
{
|
||||
find_arch_sources $1 "$2"
|
||||
}
|
||||
|
||||
all_sources()
|
||||
{
|
||||
# find_arch_include_sources ${SRCARCH} '*.[chS]'
|
||||
# if [ ! -z "$archinclude" ]; then
|
||||
# find_arch_include_sources $archinclude '*.[chS]'
|
||||
# fi
|
||||
find_include_sources '*.[chS]'
|
||||
# for arch in $ALLSOURCE_ARCHS
|
||||
# do
|
||||
# find_sources $arch '*.[chS]'
|
||||
# done
|
||||
# find_other_sources '*.[chS]'
|
||||
}
|
||||
|
||||
all_compiled_sources()
|
||||
{
|
||||
for i in $(all_sources); do
|
||||
case "$i" in
|
||||
*.[cS])
|
||||
j=${i/\.[cS]/\.o}
|
||||
if [ -e $j ]; then
|
||||
echo $i
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo $i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
all_target_sources()
|
||||
{
|
||||
if [ -n "$COMPILED_SOURCE" ]; then
|
||||
all_compiled_sources
|
||||
else
|
||||
all_sources
|
||||
fi
|
||||
}
|
||||
|
||||
all_kconfigs()
|
||||
{
|
||||
for arch in $ALLSOURCE_ARCHS; do
|
||||
find_sources $arch 'Kconfig*'
|
||||
done
|
||||
find_other_sources 'Kconfig*'
|
||||
}
|
||||
|
||||
all_defconfigs()
|
||||
{
|
||||
find_sources $ALLSOURCE_ARCHS "defconfig"
|
||||
}
|
||||
|
||||
docscope()
|
||||
{
|
||||
(echo \-k; echo \-q; all_target_sources) > cscope.files
|
||||
cscope -b -f cscope.out
|
||||
}
|
||||
|
||||
dogtags()
|
||||
{
|
||||
(all_target_sources) > cscope.files
|
||||
all_target_sources | gtags -i -f -
|
||||
}
|
||||
|
||||
exuberant()
|
||||
{
|
||||
all_target_sources | xargs $1 -a \
|
||||
-I __initdata,__exitdata,__initconst, \
|
||||
-I __cpuinitdata,__initdata_memblock \
|
||||
-I __refdata,__attribute,__maybe_unused,__always_unused \
|
||||
-I __acquires,__releases,__deprecated \
|
||||
-I __read_mostly,__aligned,____cacheline_aligned \
|
||||
-I ____cacheline_aligned_in_smp \
|
||||
-I __cacheline_aligned,__cacheline_aligned_in_smp \
|
||||
-I ____cacheline_internodealigned_in_smp \
|
||||
-I __used,__packed,__packed2__,__must_check,__must_hold \
|
||||
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \
|
||||
-I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
|
||||
-I static,const \
|
||||
--extra=+f --c-kinds=+px \
|
||||
--regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \
|
||||
--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \
|
||||
--regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \
|
||||
--regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \
|
||||
--regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \
|
||||
--regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \
|
||||
--regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \
|
||||
--regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \
|
||||
--regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \
|
||||
--regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \
|
||||
--regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \
|
||||
--regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
|
||||
--regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
|
||||
--regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \
|
||||
--regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
|
||||
--regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \
|
||||
--regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
|
||||
--regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \
|
||||
--regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \
|
||||
--regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \
|
||||
--regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \
|
||||
--regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \
|
||||
--regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \
|
||||
--regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \
|
||||
--regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \
|
||||
--regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \
|
||||
--regex-c++='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \
|
||||
--regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \
|
||||
--regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \
|
||||
--regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \
|
||||
--regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \
|
||||
--regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \
|
||||
--regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \
|
||||
--regex-c='/DEFINE_(RAW_SPINLOCK|RWLOCK|SEQLOCK)\((\w*)/\2/v/' \
|
||||
--regex-c='/DECLARE_(RWSEM|COMPLETION)\((\w*)/\2/v/' \
|
||||
--regex-c='/DECLARE_BITMAP\((\w*)/\1/v/' \
|
||||
--regex-c='/(^|\s)(|L|H)LIST_HEAD\((\w*)/\3/v/' \
|
||||
--regex-c='/(^|\s)RADIX_TREE\((\w*)/\2/v/' \
|
||||
--regex-c='/DEFINE_PER_CPU\(([^,]*,\s*)(\w*).*\)/\2/v/' \
|
||||
--regex-c='/DEFINE_PER_CPU_SHARED_ALIGNED\(([^,]*,\s*)(\w*).*\)/\2/v/' \
|
||||
--regex-c='/DECLARE_WAIT_QUEUE_HEAD\((\w*)/\1/v/' \
|
||||
--regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/' \
|
||||
--regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/' \
|
||||
--regex-c='/(^\s)OFFSET\((\w*)/\2/v/' \
|
||||
--regex-c='/(^\s)DEFINE\((\w*)/\2/v/' \
|
||||
--regex-c='/DEFINE_HASHTABLE\((\w*)/\1/v/'
|
||||
|
||||
all_kconfigs | xargs $1 -a \
|
||||
--langdef=kconfig --language-force=kconfig \
|
||||
--regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/'
|
||||
|
||||
all_kconfigs | xargs $1 -a \
|
||||
--langdef=kconfig --language-force=kconfig \
|
||||
--regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/CONFIG_\2/'
|
||||
|
||||
all_defconfigs | xargs -r $1 -a \
|
||||
--langdef=dotconfig --language-force=dotconfig \
|
||||
--regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'
|
||||
}
|
||||
|
||||
emacs()
|
||||
{
|
||||
all_target_sources | xargs $1 -a \
|
||||
--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
|
||||
--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
|
||||
--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
|
||||
--regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \
|
||||
--regex='/PAGEFLAG(\([^,)]*\).*/Page\1/' \
|
||||
--regex='/PAGEFLAG(\([^,)]*\).*/SetPage\1/' \
|
||||
--regex='/PAGEFLAG(\([^,)]*\).*/ClearPage\1/' \
|
||||
--regex='/TESTSETFLAG(\([^,)]*\).*/TestSetPage\1/' \
|
||||
--regex='/TESTPAGEFLAG(\([^,)]*\).*/Page\1/' \
|
||||
--regex='/SETPAGEFLAG(\([^,)]*\).*/SetPage\1/' \
|
||||
--regex='/__SETPAGEFLAG(\([^,)]*\).*/__SetPage\1/' \
|
||||
--regex='/TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \
|
||||
--regex='/__TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \
|
||||
--regex='/CLEARPAGEFLAG(\([^,)]*\).*/ClearPage\1/' \
|
||||
--regex='/__CLEARPAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \
|
||||
--regex='/__PAGEFLAG(\([^,)]*\).*/__SetPage\1/' \
|
||||
--regex='/__PAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \
|
||||
--regex='/PAGEFLAG_FALSE(\([^,)]*\).*/Page\1/' \
|
||||
--regex='/TESTSCFLAG(\([^,)]*\).*/TestSetPage\1/' \
|
||||
--regex='/TESTSCFLAG(\([^,)]*\).*/TestClearPage\1/' \
|
||||
--regex='/SETPAGEFLAG_NOOP(\([^,)]*\).*/SetPage\1/' \
|
||||
--regex='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \
|
||||
--regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \
|
||||
--regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \
|
||||
--regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \
|
||||
--regex='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \
|
||||
--regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \
|
||||
--regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \
|
||||
--regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \
|
||||
--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \
|
||||
--regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \
|
||||
--regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\
|
||||
--regex='/DEFINE_HASHTABLE\((\w*)/\1/v/'
|
||||
|
||||
all_kconfigs | xargs $1 -a \
|
||||
--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
|
||||
|
||||
all_kconfigs | xargs $1 -a \
|
||||
--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/'
|
||||
|
||||
all_defconfigs | xargs -r $1 -a \
|
||||
--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'
|
||||
}
|
||||
|
||||
xtags()
|
||||
{
|
||||
if $1 --version 2>&1 | grep -iq exuberant; then
|
||||
exuberant $1
|
||||
elif $1 --version 2>&1 | grep -iq emacs; then
|
||||
emacs $1
|
||||
else
|
||||
all_target_sources | xargs $1 -a
|
||||
fi
|
||||
}
|
||||
|
||||
# # Support um (which uses SUBARCH)
|
||||
# if [ "${ARCH}" = "um" ]; then
|
||||
# if [ "$SUBARCH" = "i386" ]; then
|
||||
# archinclude=x86
|
||||
# elif [ "$SUBARCH" = "x86_64" ]; then
|
||||
# archinclude=x86
|
||||
# else
|
||||
# archinclude=${SUBARCH}
|
||||
# fi
|
||||
# elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
|
||||
# subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
|
||||
# -name "plat-*" -type d);
|
||||
# for i in $subarchdir; do
|
||||
# case "$i" in
|
||||
# *"mach-"${SUBARCH})
|
||||
# ;;
|
||||
# *"plat-"${SUBARCH})
|
||||
# ;;
|
||||
# *)
|
||||
# subarchprune="$subarchprune \
|
||||
# -wholename $i -prune -o"
|
||||
# ;;
|
||||
# esac
|
||||
# done
|
||||
# fi
|
||||
|
||||
remove_structs=
|
||||
case "$1" in
|
||||
"cscope")
|
||||
docscope
|
||||
;;
|
||||
|
||||
"gtags")
|
||||
dogtags
|
||||
;;
|
||||
|
||||
"tags")
|
||||
rm -f tags
|
||||
xtags ctags
|
||||
remove_structs=y
|
||||
;;
|
||||
|
||||
"TAGS")
|
||||
rm -f TAGS
|
||||
xtags etags
|
||||
remove_structs=y
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove structure forward declarations.
|
||||
if [ -n "$remove_structs" ]; then
|
||||
LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
|
||||
fi
|
||||
Reference in New Issue
Block a user