Skip to content
Snippets Groups Projects
Commit 969b03d0 authored by Pieter Donker's avatar Pieter Donker
Browse files

Merge branch 'master' into L2SDP-261

parents 94d6fc64 d893b0a9
Branches
Tags
No related merge requests found
stages:
- image
docker-build:
stage: image
image: docker:latest
tags:
- privileged
only:
refs:
- master
services:
- docker:dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}"
FROM ubuntu:20.04
# Install build tools for sdptr and the C language OPC-UA lib
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common && \
DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:open62541-team/ppa && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake git make g++ build-essential pkg-config libboost-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev libopen62541-1-dev libopen62541-1-tools && \
apt-get clean
# Copy sdptr
COPY . /sdptr
# Build and install
RUN cd /sdptr && \
autoreconf -v -f -i && \
./configure && \
bash -c "make -j `nproc` install"
# Remove source
RUN rm -rf /sdptr
# Remove build dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get purge -y autoconf automake git make g++ build-essential libboost-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
RUN DEBIAN_FRONTEND=noninteractive apt-get clean
......@@ -61,7 +61,7 @@ extern int debug;
Periph_fpga::Periph_fpga(uint global_nr, string ipaddr, uint n_beamsets):
GlobalNr(global_nr),
nBeamsets(n_beamsets),
Masked(false),
Masked(true),
Online(false),
my_current_design_name("-"),
my_current_hw_version(0),
......@@ -137,7 +137,7 @@ bool Periph_fpga::read(TermOutput& termout, const string addr,
return false;
}
if (!Online) { // Selected but not possible
cout << "read() error node " << GlobalNr << " not enabled or not online" << endl;
cout << "read() error node " << GlobalNr << " not online" << endl;
return false;
}
if (mmap->empty()) {
......@@ -383,7 +383,7 @@ bool Periph_fpga::write(TermOutput& termout, const string addr, const string typ
return false;
}
if (!Online) { // Selected but not possible
cout << "write() error node " << GlobalNr << " not enabled or not online" << endl;
cout << "write() error node " << GlobalNr << " not online" << endl;
return false;
}
if (mmap->empty()) {
......@@ -760,7 +760,6 @@ bool Periph_fpga::read_system_info(TermOutput& termout)
}
cout << "node " << GlobalNr << " no response" << endl;
Online = false;
Masked = false;
mmap->clear();
return false;
}
......@@ -773,7 +772,6 @@ bool Periph_fpga::read_system_info(TermOutput& termout)
cout << "new mmap for node " << GlobalNr << endl;
mmap->print_screen();
Online = true;
Masked = true;
my_current_design_name = read_design_name();
cout << "node " << GlobalNr << " now active design_name = " << my_current_design_name << endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment