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

50 lines
1.8 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/
det_lib = ../../slsDetectorSoftware/include/sls/
md5_dir = ../../slsSupportLib/src/
script_dir = ../../etc/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
# FLAT stack size: elf2flt defaults to 4 KB, the update and startup paths need more than 8 KB
LDLIBS += -Wl,-elf2flt=-s262144
PROGS = ctbDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)communication_funcs_UDP.c $(main_src)UDPPacketHeaderGenerator.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)/sharedMemory.c $(main_src)/loadPattern.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
all: clean $(PROGS)
version: clean versioning $(PROGS)
boot: $(OBJS)
version_name=APICTB
version_path=slsDetectorServers/ctbDetectorServer
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)
rm *.gdb
rm $(main_src)*.o $(md5_dir)*.o
clean:
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o