-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
664 additions
and
539 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
set -x -e | ||
|
||
export EPICS_HOST_ARCH=`sh $HOME/epics-base/startup/EpicsHostArch` | ||
|
||
make -j2 | ||
|
||
[ "$TEST" = "YES" ] || exit 0 | ||
|
||
lspci | ||
|
||
make tapfiles | ||
|
||
make -s test-results || find . -name '*.tap' -print0 | xargs -0 -n1 prove -e cat -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh | ||
set -e -x | ||
|
||
cat << EOF > configure/RELEASE | ||
EPICS_BASE=$HOME/epics-base | ||
EOF | ||
|
||
git clone --depth 10 --branch $BASE https://github.com/epics-base/epics-base.git $HOME/epics-base | ||
|
||
export EPICS_HOST_ARCH=`sh $HOME/epics-base/startup/EpicsHostArch` | ||
|
||
case "$STATIC" in | ||
static) | ||
cat << EOF >> "$HOME/epics-base/configure/CONFIG_SITE" | ||
SHARED_LIBRARIES=NO | ||
STATIC_BUILD=YES | ||
EOF | ||
;; | ||
*) ;; | ||
esac | ||
|
||
case "$CMPLR" in | ||
clang) | ||
echo "Host compiler is clang" | ||
cat << EOF >> $HOME/epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH | ||
GNU = NO | ||
CMPLR_CLASS = clang | ||
CC = clang | ||
CCC = clang++ | ||
EOF | ||
;; | ||
*) echo "Host compiler is default";; | ||
esac | ||
|
||
# requires wine and g++-mingw-w64-i686 | ||
if [ "$WINE" = "32" ] | ||
then | ||
echo "Cross mingw32" | ||
sed -i -e '/CMPLR_PREFIX/d' $HOME/epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw | ||
cat << EOF >> $HOME/epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw | ||
CMPLR_PREFIX=i686-w64-mingw32- | ||
EOF | ||
cat << EOF >> $HOME/epics-base/configure/CONFIG_SITE | ||
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw | ||
EOF | ||
fi | ||
|
||
# set RTEMS to eg. "4.9" or "4.10" | ||
if [ -n "$RTEMS" ] | ||
then | ||
echo "Cross RTEMS${RTEMS} for pc386" | ||
curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \ | ||
| tar -C / -xmj | ||
|
||
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' $HOME/epics-base/configure/os/CONFIG_SITE.Common.RTEMS | ||
cat << EOF >> $HOME/epics-base/configure/os/CONFIG_SITE.Common.RTEMS | ||
RTEMS_VERSION=$RTEMS | ||
RTEMS_BASE=$HOME/.rtems | ||
EOF | ||
cat << EOF >> $HOME/epics-base/configure/CONFIG_SITE | ||
CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu | ||
EOF | ||
|
||
fi | ||
|
||
make -C "$HOME/epics-base" -j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
/dbd/ | ||
/include/ | ||
/lib/ | ||
/cfg/ | ||
O.*/ | ||
*.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
sudo: false | ||
dist: trusty | ||
language: c | ||
compiler: | ||
- gcc | ||
addons: | ||
apt: | ||
packages: | ||
- libreadline6-dev | ||
- libncurses5-dev | ||
- perl | ||
- clang | ||
- qemu-system-x86 | ||
env: | ||
- BASE=3.14 STATIC=shared | ||
- BASE=3.14 STATIC=static | ||
- BASE=7.0 STATIC=shared RTEMS=4.9 TEST=YES | ||
- BASE=3.16 STATIC=shared TEST=YES | ||
- BASE=3.16 STATIC=static RTEMS=4.9 | ||
- BASE=3.16 STATIC=shared CMPLR=clang RTEMS=4.10 | ||
- BASE=3.15 STATIC=shared | ||
- BASE=3.15 STATIC=static | ||
- BASE=3.16 STATIC=shared | ||
- BASE=3.16 STATIC=static | ||
install: ./build-deps.sh | ||
script: | ||
- make -j2 | ||
- make -s runtests | ||
- BASE=3.14 STATIC=shared | ||
- BASE=R3.14.12.2 STATIC=shared | ||
install: .ci/travis-prepare.sh | ||
script: .ci/travis-build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef DEVLIBVERSION_H | ||
#define DEVLIBVERSION_H | ||
|
||
#include <epicsVersion.h> | ||
|
||
#ifndef VERSION_INT | ||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) | ||
# define EPICS_VERSION_INT VERSION_INT(EPICS_VERSION, EPICS_REVISION, EPICS_MODIFICATION, EPICS_PATCH_LEVEL) | ||
#endif | ||
|
||
#endif // DEVLIBVERSION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DEVLIB2_MAJOR_VERSION = 2 | ||
DEVLIB2_MINOR_VERSION = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
|
||
/** @page exploreapp PCI driver/hardware development tool | ||
@section exploreintro Purpose | ||
The exploreApp support is intended as a tool to explore new PCI devices. | ||
This may be useful when preparing to write a dedicated driver and/or | ||
during development of PCI/PCIe device firmware. | ||
exploreApp allows a PCI register to be read and/or written an EPICS record. | ||
For example: | ||
@code | ||
record(longout, "pcitestout") { | ||
field(DTYP, "Explore Write32 LSB") | ||
field(OUT , "@8:0.0 bar=0 offset=0xc") | ||
} | ||
@endcode | ||
The record @b pcitestout will be connected to the PCI device 8:0.0 (bus 8, device 0, function 0) with the first BAR. | ||
A single write of 4 bytes is made when the record is processed. | ||
The following can be added to some @b xyzApp/src/Makefile to include exploreApp. | ||
@code | ||
PROD_IOC += myioc | ||
DBD += myioc.dbd | ||
myioc_DBD += exploreSupport.dbd | ||
myioc_LIBS += explorepci epicspci | ||
@endcode | ||
@section exploreopts Options | ||
@b INP/OUT link strings may contain the following components | ||
@li "bar=#" (default: 0) | ||
@li "offset=#" in bytes (default: 0) | ||
@li "mask=#" bit mask (default: 0 aka. no mask) | ||
@li "shift=#" in bits (default: 0) | ||
@li "step=#" in bytes (default: read size. eg Read32 defaults to step=4) | ||
@li "initread=1|0" bool (default: 1 for .OUT recordtypes, 0 otherwise) | ||
For record types: @b longout, @b bo, @b mbbo, @b mbboDirect, @b ao | ||
allowed @b DTYP are: | ||
@li Explore Write8 | ||
@li Explore Write16 NAT | ||
@li Explore Write16 LSB | ||
@li Explore Write16 MSB | ||
@li Explore Write32 NAT | ||
@li Explore Write32 LSB | ||
@li Explore Write32 MSB | ||
For record types: @b longin, @b longout, @b bi, @b bo, @b mbbi, @b mbbo, @b mbbiDirect, @b mbboDirect, @b ai, @b ao | ||
@li Explore Read8 | ||
@li Explore Read16 NAT | ||
@li Explore Read16 LSB | ||
@li Explore Read16 MSB | ||
@li Explore Read32 NAT | ||
@li Explore Read32 LSB | ||
@li Explore Read32 MSB | ||
The @b ao record type also accepts | ||
@li Explore WriteF32 LSB | ||
@li Explore WriteF32 MSB | ||
The @b ai record type also accepts | ||
@li Explore ReadF32 LSB | ||
@li Explore ReadF32 MSB | ||
The @b waveform record type accepts both integer Read and Write @b DTYP. | ||
The @b step= link option may be applied to change how the address counter is incremented. | ||
The default step size is the read size (eg. 4 for Read32). | ||
A step size of 0 will read the base address @b NELM times. | ||
@section exploreirq PCI Interrupt | ||
Limited support of PCI interrupts is available on Linux only. | ||
A @b longin record with DTYP="Explore IRQ Count" and SCAN="I/O Intr" | ||
will be processed each time an interrupt occurs. | ||
This requires that a UIO kernel module be installed. | ||
@section explorefrib FRIB Specific | ||
The DTYP="Explore FRIB Flash" support implements a FRIB specific protocol | ||
for accessing a SPI flash chip over PCI. | ||
The @b frib-flash.db file demonstrates use. | ||
*/ | ||
|
||
/** @page iocsh IOC shell functions | ||
Several IOC shell functions are provided to access PCI and VME devices | ||
@section iocshpci IOCsh functions for PCI devices | ||
- devPCIShow() List PCI devices present | ||
- devLibPCIUse() Select PCI system access implementation | ||
- pcidiagset() Select device for read/write functions | ||
- pciwrite() | ||
- pciread() | ||
- pciconfread() | ||
To use, begin by calling pcidiagset() to select the device and BAR that subsequent | ||
read/write calls will operate on. | ||
@section iocshvme IOCsh functions for VME devices | ||
- vmeread() | ||
- vmewrite() | ||
- vmeirqattach() | ||
- vmeirq() | ||
*/ |
Oops, something went wrong.