Files
Erik Fröjdhandmaliakal_d 70b039eb42
Build and Deploy on local RHEL9 / build (push) Successful in 2m0s
Build on RHEL9 docker image / build (push) Successful in 5m0s
Build and Deploy on local RHEL8 / build (push) Successful in 5m10s
Build on RHEL8 docker image / build (push) Successful in 5m27s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m41s
Run Simulator Tests on local RHEL8 / build (push) Successful in 24m6s
Enabling optimizations for for slsDetectorServers (#1631)
* replaced bf specific usleep replacement with one using cycle counts to be stable while changing optimization levels

* uint32_t signature on usleep since the register read is 32bit...

* enabled -O2 for ctb and mythen + a few additional warnings

* configure stack size for blackfin servers to 256kB instead of the default 4kB

* enable opt for JF and Moench, ratemax make local for eiger

* fixed misplaced volatile on Beb_Read32

* removed dead code in eiger server (which had 2 byte read passt end), usleep_bf returns -1 for sleeps that can't be represented

* deal with fall through of table filling in ratecorr table

* memory clobber for inline asm and added flags on eiger

* -O2 for gotthard and xilinx

* fixes to remove the new warnings

* fixed new eiger warnings

* binaries in

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2026-10-27 17:23:42 +01:00

47 lines
1.6 KiB
Makefile
Executable File

# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
current_dir = $(shell pwd)
main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/
md5_dir = ../../slsSupportLib/src/
script_dir = ../../etc/
CROSS = nios2-buildroot-linux-gnu-
CC = $(CROSS)gcc
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = gotthard2DetectorServer
DESTDIR ?= bin
INSTMODE = 0777
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)nios.c $(main_src)common.c $(main_src)DAC6571.c $(main_src)LTC2620_Driver.c $(main_src)ALTERA_PLL_CYCLONE10.c $(main_src)ASIC_Driver.c $(main_src)/programViaNios.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
all: clean $(PROGS)
version: clean versioning $(PROGS)
boot: $(OBJS)
version_name=APIGOTTHARD2
version_path=slsDetectorServers/gotthard2DetectorServer
versioning:
echo `tput setaf 6; python $(script_dir)updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
$(PROGS): $(OBJS)
# echo $(OBJS)
mkdir -p $(DESTDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
mv $(PROGS) $(DESTDIR)
cp config_gotthard2.txt $(DESTDIR)
cp detid_gotthard2.txt $(DESTDIR)
rm $(main_src)*.o $(md5_dir)*.o
clean:
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o