kopia lustrzana https://github.com/stlink-org/stlink
Add a netbeans project setup
Has two run configs, one for the gdb server, and one for the command line tools and library build.pull/29/head
rodzic
1b2e65ae06
commit
b444dd7b7d
|
@ -0,0 +1,75 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
#
|
||||
# Generated - do not edit!
|
||||
#
|
||||
|
||||
# Macros
|
||||
TOP=`pwd`
|
||||
CND_PLATFORM=GNU-Linux-x86
|
||||
CND_CONF=gdbserver
|
||||
CND_DISTDIR=dist
|
||||
CND_BUILDDIR=build
|
||||
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
|
||||
TMPDIRNAME=tmp-packaging
|
||||
OUTPUT_PATH=gdbserver/st-util
|
||||
OUTPUT_BASENAME=st-util
|
||||
PACKAGE_TOP_DIR=stlink/
|
||||
|
||||
# Functions
|
||||
function checkReturnCode
|
||||
{
|
||||
rc=$?
|
||||
if [ $rc != 0 ]
|
||||
then
|
||||
exit $rc
|
||||
fi
|
||||
}
|
||||
function makeDirectory
|
||||
# $1 directory path
|
||||
# $2 permission (optional)
|
||||
{
|
||||
mkdir -p "$1"
|
||||
checkReturnCode
|
||||
if [ "$2" != "" ]
|
||||
then
|
||||
chmod $2 "$1"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
function copyFileToTmpDir
|
||||
# $1 from-file path
|
||||
# $2 to-file path
|
||||
# $3 permission
|
||||
{
|
||||
cp "$1" "$2"
|
||||
checkReturnCode
|
||||
if [ "$3" != "" ]
|
||||
then
|
||||
chmod $3 "$2"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
|
||||
# Setup
|
||||
cd "${TOP}"
|
||||
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
|
||||
rm -rf ${NBTMPDIR}
|
||||
mkdir -p ${NBTMPDIR}
|
||||
|
||||
# Copy files and create directories and links
|
||||
cd "${TOP}"
|
||||
makeDirectory "${NBTMPDIR}/stlink/bin"
|
||||
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
|
||||
|
||||
|
||||
# Generate tar file
|
||||
cd "${TOP}"
|
||||
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/stlink.tar
|
||||
cd ${NBTMPDIR}
|
||||
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/stlink.tar *
|
||||
checkReturnCode
|
||||
|
||||
# Cleanup
|
||||
cd "${TOP}"
|
||||
rm -rf ${NBTMPDIR}
|
|
@ -0,0 +1,75 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
#
|
||||
# Generated - do not edit!
|
||||
#
|
||||
|
||||
# Macros
|
||||
TOP=`pwd`
|
||||
CND_PLATFORM=GNU-Linux-x86
|
||||
CND_CONF=library_cli
|
||||
CND_DISTDIR=dist
|
||||
CND_BUILDDIR=build
|
||||
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
|
||||
TMPDIRNAME=tmp-packaging
|
||||
OUTPUT_PATH=test_usb
|
||||
OUTPUT_BASENAME=test_usb
|
||||
PACKAGE_TOP_DIR=stlink/
|
||||
|
||||
# Functions
|
||||
function checkReturnCode
|
||||
{
|
||||
rc=$?
|
||||
if [ $rc != 0 ]
|
||||
then
|
||||
exit $rc
|
||||
fi
|
||||
}
|
||||
function makeDirectory
|
||||
# $1 directory path
|
||||
# $2 permission (optional)
|
||||
{
|
||||
mkdir -p "$1"
|
||||
checkReturnCode
|
||||
if [ "$2" != "" ]
|
||||
then
|
||||
chmod $2 "$1"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
function copyFileToTmpDir
|
||||
# $1 from-file path
|
||||
# $2 to-file path
|
||||
# $3 permission
|
||||
{
|
||||
cp "$1" "$2"
|
||||
checkReturnCode
|
||||
if [ "$3" != "" ]
|
||||
then
|
||||
chmod $3 "$2"
|
||||
checkReturnCode
|
||||
fi
|
||||
}
|
||||
|
||||
# Setup
|
||||
cd "${TOP}"
|
||||
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
|
||||
rm -rf ${NBTMPDIR}
|
||||
mkdir -p ${NBTMPDIR}
|
||||
|
||||
# Copy files and create directories and links
|
||||
cd "${TOP}"
|
||||
makeDirectory "${NBTMPDIR}/stlink/bin"
|
||||
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
|
||||
|
||||
|
||||
# Generate tar file
|
||||
cd "${TOP}"
|
||||
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/stlink.tar
|
||||
cd ${NBTMPDIR}
|
||||
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/stlink.tar *
|
||||
checkReturnCode
|
||||
|
||||
# Cleanup
|
||||
cd "${TOP}"
|
||||
rm -rf ${NBTMPDIR}
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="79">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
|
||||
<df name="stlink" root=".">
|
||||
<df name="example">
|
||||
<in>main.c</in>
|
||||
</df>
|
||||
<df name="gdbserver">
|
||||
<in>gdb-remote.c</in>
|
||||
<in>gdb-remote.h</in>
|
||||
<in>gdb-server.c</in>
|
||||
</df>
|
||||
<df name="src">
|
||||
<in>stlink-common.c</in>
|
||||
<in>stlink-common.h</in>
|
||||
<in>stlink-sg.c</in>
|
||||
<in>stlink-sg.h</in>
|
||||
<in>stlink-usb.c</in>
|
||||
<in>stlink-usb.h</in>
|
||||
<in>test_sg.c</in>
|
||||
<in>test_usb.c</in>
|
||||
</df>
|
||||
<df name="stm32l_notes">
|
||||
</df>
|
||||
</df>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false"
|
||||
kind="IMPORTANT_FILES_FOLDER">
|
||||
<itemPath>build/Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
|
||||
<sourceRootList>
|
||||
<Elem>.</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>build/Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="library_cli" type="0">
|
||||
<toolsSet>
|
||||
<remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
|
||||
<compilerSet>default</compilerSet>
|
||||
</toolsSet>
|
||||
<makefileType>
|
||||
<makeTool>
|
||||
<buildCommandWorkingDir></buildCommandWorkingDir>
|
||||
<buildCommand>${MAKE} -f Makefile</buildCommand>
|
||||
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
|
||||
<executablePath>test_usb</executablePath>
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>stm32l/src</pElem>
|
||||
<pElem>/usr/include/libusb-1.0</pElem>
|
||||
<pElem>stm32l/build</pElem>
|
||||
<pElem>src</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>CONFIG_USE_LIBUSB=1</Elem>
|
||||
<Elem>__GNUC_STDC_INLINE__=1</Elem>
|
||||
<Elem>__OPTIMIZE__=1</Elem>
|
||||
<Elem>__REGISTER_PREFIX__=</Elem>
|
||||
<Elem>__STDC_VERSION__=199901L</Elem>
|
||||
<Elem>__USER_LABEL_PREFIX__=</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</makeTool>
|
||||
</makefileType>
|
||||
</conf>
|
||||
<conf name="gdbserver" type="0">
|
||||
<toolsSet>
|
||||
<remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
|
||||
<compilerSet>default</compilerSet>
|
||||
</toolsSet>
|
||||
<makefileType>
|
||||
<makeTool>
|
||||
<buildCommandWorkingDir>gdbserver</buildCommandWorkingDir>
|
||||
<buildCommand>${MAKE} -f Makefile</buildCommand>
|
||||
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
|
||||
<executablePath>gdbserver/st-util</executablePath>
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>stm32l/src</pElem>
|
||||
<pElem>/usr/include/libusb-1.0</pElem>
|
||||
<pElem>stm32l/build</pElem>
|
||||
<pElem>src</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>CONFIG_USE_LIBUSB=1</Elem>
|
||||
<Elem>__GNUC_STDC_INLINE__=1</Elem>
|
||||
<Elem>__OPTIMIZE__=1</Elem>
|
||||
<Elem>__REGISTER_PREFIX__=</Elem>
|
||||
<Elem>__STDC_VERSION__=199901L</Elem>
|
||||
<Elem>__USER_LABEL_PREFIX__=</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
</makeTool>
|
||||
</makefileType>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.cnd.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>stlink</name>
|
||||
<c-extensions>c</c-extensions>
|
||||
<cpp-extensions/>
|
||||
<header-extensions>h</header-extensions>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
<sourceRootList>
|
||||
<sourceRootElem>.</sourceRootElem>
|
||||
</sourceRootList>
|
||||
<confList>
|
||||
<confElem>
|
||||
<name>library_cli</name>
|
||||
<type>0</type>
|
||||
</confElem>
|
||||
<confElem>
|
||||
<name>gdbserver</name>
|
||||
<type>0</type>
|
||||
</confElem>
|
||||
</confList>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
Ładowanie…
Reference in New Issue