1010/Enabling optimizations for slsDetectorServers (#1640)
Build on RHEL9 docker image / build (push) Successful in 3m39s
Build on RHEL8 docker image / build (push) Successful in 4m49s
Run Simulator Tests on local RHEL9 / build (push) Successful in 19m31s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m59s

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

(cherry picked from commit 4d2f37c205)

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

(cherry picked from commit 5468b1e4dd)

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

(cherry picked from commit 5500800503)

* fixed misplaced volatile on Beb_Read32

(cherry picked from commit 7b9f408df1)

* removed dead code in eiger server (which had 2 byte read passt end)

10.1.0.rc: only the Eiger part of the original commit is applied. The
usleep_bf change (return -1 for sleeps that cannot be represented) does
not apply, usleep_bf does not exist on this branch.

(cherry picked from commit 8e24c0196f)

* deal with fall through of table filling in ratecorr table

(cherry picked from commit f69856b5ff)

* memory clobber for inline asm and added flags on eiger

(cherry picked from commit a8c391509e)

* -O2 for gotthard and xilinx

(cherry picked from commit bf73241a47)

* fixes to remove the new warnings

(cherry picked from commit eb525e96be)

* fixed new eiger warnings

(cherry picked from commit 9c86c36534)

* binaries in

* fixes for warnings (already in developer from list.h separation PR)

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
Erik Fröjdhandmaliakal_d authored and GitHub committed 2026-10-28 11:32:23 +01:00
1 parent 6552490232
commit 01a5e4f2d1
25 files changed
+75 -100

No files matched your search

@@ -10,8 +10,10 @@ script_dir = ../../etc/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
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
@@ -2013,7 +2013,7 @@ int validatePhaseinDegrees(enum CLKINDEX ind, int val, int retval) {
}
int setFrequency(enum CLKINDEX ind, int val) {
if (ind < 0 || ind >= NUM_CLOCKS) {
if (ind >= NUM_CLOCKS) {
LOG(logERROR, ("Unknown clock index %d to set frequency\n", ind));
return FAIL;
}
@@ -2063,7 +2063,7 @@ int setFrequency(enum CLKINDEX ind, int val) {
}
int getFrequency(enum CLKINDEX ind) {
if (ind < 0 || ind >= NUM_CLOCKS) {
if (ind >= NUM_CLOCKS) {
LOG(logERROR, ("Unknown clock index %d to get frequency\n", ind));
return -1;
}
+8 -50
View File
@@ -6,6 +6,7 @@
#include "xparameters.h"
#include <fcntl.h>
#include <stddef.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
@@ -14,20 +15,8 @@ extern int isControlServer;
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
struct LocalLinkInterface ll_beb_local, *ll_beb;
struct udp_header_type udp_header;
int Beb_send_ndata;
unsigned int Beb_send_buffer_size;
unsigned int *Beb_send_data_raw;
unsigned int *Beb_send_data;
int Beb_recv_ndata;
unsigned int Beb_recv_buffer_size;
unsigned int *Beb_recv_data_raw;
unsigned int *Beb_recv_data;
short Beb_bit_mode;
int BEB_MMAP_SIZE = 0x1000;
@@ -47,28 +36,6 @@ int Beb_deactivated_right_datastream = 1;
int Beb_deactivated_num_destinations = 1;
int Beb_Beb() {
Beb_send_ndata = 0;
Beb_send_buffer_size = 1026;
Beb_send_data_raw =
malloc((Beb_send_buffer_size + 1) * sizeof(unsigned int));
if (Beb_send_data_raw == NULL) {
LOG(logERROR, ("Could not allocate memory for beb (send_data_raw)\n"));
return 0;
}
Beb_send_data = &Beb_send_data_raw[1];
Beb_recv_ndata = 0;
Beb_recv_buffer_size = 1026;
Beb_recv_data_raw =
malloc((Beb_recv_buffer_size + 1) * sizeof(unsigned int));
if (Beb_recv_data_raw == NULL) {
LOG(logERROR, ("Could not allocate memory for beb (recv_data_raw)\n"));
return 0;
}
Beb_recv_data = &Beb_recv_data_raw[1];
udp_header = (struct udp_header_type){
{0x00, 0x50, 0xc5, 0xb2, 0xcb, 0x46}, // DST MAC
{0x00, 0x50, 0xc2, 0x46, 0xd9, 0x02}, // SRC MAC
@@ -157,19 +124,12 @@ int Beb_SetHeaderData(uint64_t src_mac, uint32_t src_ip, uint16_t src_port,
memcpy(&(udp_header.dst_port[0]), &dst_port, sizeof(udp_header.dst_port));
Beb_AdjustIPChecksum(&udp_header);
unsigned int *base_ptr = (unsigned int *)&udp_header;
unsigned int num_words = (sizeof(struct udp_header_type) + 3) / 4;
for (unsigned int i = 0; i < num_words; i++)
Beb_send_data[i + 2] = base_ptr[i];
for (unsigned int i = num_words; i < 16; i++)
Beb_send_data[i + 2] = 0;
return 1;
}
void Beb_AdjustIPChecksum(struct udp_header_type *ip) {
unsigned char *cptr = (unsigned char *)ip->ver_headerlen;
unsigned char *cptr =
(unsigned char *)ip + offsetof(struct udp_header_type, ver_headerlen);
ip->ip_header_checksum[0] = 0;
ip->ip_header_checksum[1] = 0;
@@ -372,7 +332,7 @@ int Beb_SetTop(enum TOPINDEX ind) {
}
char *top_names[] = {TOP_NAMES};
int newval = Beb_Write32(csp0base, BEB_CONFIG_WR_OFST, value);
u_int32_t newval = Beb_Write32(csp0base, BEB_CONFIG_WR_OFST, value);
if (newval != value) {
LOG(logERROR,
("Could not set Top flag to %s in Beb\n", top_names[ind]));
@@ -417,7 +377,7 @@ int Beb_SetMaster(enum MASTERINDEX ind) {
}
char *master_names[] = {MASTER_NAMES};
int newval = Beb_Write32(csp0base, BEB_CONFIG_WR_OFST, value);
u_int32_t newval = Beb_Write32(csp0base, BEB_CONFIG_WR_OFST, value);
if (newval != value) {
LOG(logERROR,
("Could not set Master flag to %s in Beb\n", master_names[ind]));
@@ -1167,7 +1127,7 @@ int Beb_SetDetectorPosition(int pos[]) {
value | ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_B_LEFT_OFST);
if ((value & UDP_HEADER_Y_MSK) !=
((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) {
(uint32_t)((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) {
LOG(logERROR, ("Could not set column position for left port\n"));
ret = FAIL;
}
@@ -1180,7 +1140,7 @@ int Beb_SetDetectorPosition(int pos[]) {
value | ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_B_RIGHT_OFST);
if ((value & UDP_HEADER_Y_MSK) !=
((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) {
(uint32_t)((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) {
LOG(logERROR, ("Could not set column position for right port\n"));
ret = FAIL;
}
@@ -1379,9 +1339,7 @@ int Beb_open(u_int32_t **csp0base, u_int32_t offset) {
}
u_int32_t Beb_Read32(u_int32_t *baseaddr, u_int32_t offset) {
volatile u_int32_t value;
value = *(u_int32_t *)(baseaddr + offset / (sizeof(u_int32_t)));
return value;
return *(volatile u_int32_t *)(baseaddr + offset / sizeof(u_int32_t));
}
u_int32_t Beb_Write32(u_int32_t *baseaddr, u_int32_t offset, u_int32_t data) {
@@ -4,6 +4,7 @@
#include "Beb.h"
#include "FebRegisterDefs.h"
#include "clogger.h"
#include "common.h"
#include "sharedMemory.h"
#include "slsDetectorServer_defs.h"
@@ -45,7 +46,6 @@ int64_t Feb_Control_RateTable_Tau_in_nsec = -1;
int64_t Feb_Control_RateTable_Period_in_nsec = -1;
unsigned int Feb_Control_rate_correction_table[1024] = {};
double Feb_Control_rate_meas[16384] = {};
double ratemax = -1;
// setup
void Feb_Control_activate(int activate) { Feb_Control_activated = activate; }
@@ -137,13 +137,6 @@ void Feb_Control_CloseSerialCommunication() {
int Feb_Control_CheckSetup(int master) {
LOG(logDEBUG1, ("Checking Set up\n"));
for (unsigned int j = 0; j < 4; j++) {
if (Feb_Control_idelay[j] < 0) {
LOG(logERROR, ("idelay chip %d not set.\n", j));
return 0;
}
}
int value = 0;
if ((Feb_Control_master) && (!Feb_Control_GetHighVoltage(&value))) {
LOG(logERROR, ("high voltage not set.\n"));
@@ -403,13 +396,14 @@ int Feb_Control_ReceiveHighVoltage(unsigned int *value) {
// normal
if (Feb_Control_normal) {
int retval = 0;
if (readParameterFromFile(NORMAL_HIGHVOLTAGE_INPUTPORT, "high voltage",
value) == FAIL) {
&retval) == FAIL) {
LOG(logERROR, ("Could not get high voltage\n"));
return 0;
}
*value /= 10;
LOG(logINFO, ("High Voltage: %d\n", (*value)));
*value = retval / 10;
LOG(logINFO, ("High Voltage: %u\n", (*value)));
}
// 9m
@@ -490,7 +484,7 @@ float Feb_Control_DACToVoltage(unsigned int digital, unsigned int nsteps,
int Feb_Control_SetDAC(unsigned int ch, int value) {
unsigned int dst_num = Feb_Control_rightAddress;
if (ch < 0 || ch > 15) {
if (ch > 15) {
LOG(logERROR, ("invalid ch for SetDAC.\n"));
return 0;
}
@@ -662,7 +656,7 @@ int Feb_Control_SetTrimbits(unsigned int *trimbits, int top) {
int Feb_Control_SaveAllTrimbitsTo(int value, int top) {
unsigned int chanregs[Feb_Control_trimbit_size];
for (int i = 0; i < Feb_Control_trimbit_size; i++)
for (int i = 0; i < (int)Feb_Control_trimbit_size; i++)
chanregs[i] = value;
return Feb_Control_SetTrimbits(chanregs, top);
}
@@ -1980,6 +1974,7 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
unsigned int np = 16384; // max slope 16 * 1024
double b0[1024];
double m[1024];
double ratemax = -1;
if (tau_in_sec < 0 || period_in_sec < 0) {
if (dr == 32) {
@@ -1997,7 +1992,7 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
LOG(logINFO, ("Changing Rate Correction Table tau:%0.8f sec, period:%f sec",
tau_in_sec, period_in_sec));
LOG(logINFO, ("\tCalculating table for tau of %lld ns.\n", tau_in_Nsec));
for (int i = 0; i < np; i++) {
for (int i = 0; i < (int)np; i++) {
Feb_Control_rate_meas[i] = i * exp(-i / period_in_sec * tau_in_sec);
if (Feb_Control_rate_meas[i] > ratemax)
ratemax = Feb_Control_rate_meas[i];
@@ -2020,7 +2015,7 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
*/
int next_i = 0;
double beforemax;
double beforemax = 0;
b0[0] = 0;
m[0] = 1;
@@ -2030,8 +2025,9 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
for (int b = 1; b < 1024; b++) {
if (m[b - 1] < 15) {
double s = 0, sx = 0, sy = 0, sxx = 0, sxy = 0;
int filled = 0;
for (;; next_i++) {
if (next_i >= np) {
if (next_i >= (int)np) {
for (; b < 1024; b++) {
if (beforemax > ratemax)
b0[b] = beforemax;
@@ -2042,7 +2038,7 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
(((int)(m[b] + 0.5) & 0xf) << 14) |
((int)(b0[b] + 0.5) & 0x3fff);
}
b = 1024;
filled = 1;
break;
}
@@ -2067,6 +2063,8 @@ int Feb_Control_SetRateCorrectionTau(int64_t tau_in_Nsec) {
Feb_Control_rate_meas[next_i]: %f\n", x, y, s, sx, sy, sxx, sxy,
next_i, b, Feb_Control_rate_meas[next_i]));*/
}
if (filled)
break;
double delta = s * sxx - sx * sx;
b0[b] = (sxx * sy - sx * sxy) / delta;
m[b] = (s * sxy - sx * sy) / delta;
@@ -119,6 +119,7 @@ int Feb_Control_PrintCorrectedValues();
// adcs
int Feb_Control_GetLeftFPGATemp();
int Feb_Control_GetRightFPGATemp();
int Feb_Control_GetFPGAHardwareVersion(int *retval);
int64_t Feb_Control_GetFrontLeftFirmwareVersion();
int64_t Feb_Control_GetFrontRightFirmwareVersion();
int64_t Feb_Control_GetMeasuredPeriod();
@@ -8,7 +8,10 @@ xfs_u8 HWIO_xfs_in8(xfs_u32 InAddress) {
*/
xfs_u8 IoContents;
__asm__ volatile("eieio; lbz %0,0(%1)" : "=r"(IoContents) : "b"(InAddress));
__asm__ volatile("eieio; lbz %0,0(%1)"
: "=r"(IoContents)
: "b"(InAddress)
: "memory");
return IoContents;
}
@@ -20,7 +23,10 @@ xfs_u16 HWIO_xfs_in16(xfs_u32 InAddress) {
*/
xfs_u16 IoContents;
__asm__ volatile("eieio; lhz %0,0(%1)" : "=r"(IoContents) : "b"(InAddress));
__asm__ volatile("eieio; lhz %0,0(%1)"
: "=r"(IoContents)
: "b"(InAddress)
: "memory");
return IoContents;
}
@@ -32,7 +38,10 @@ xfs_u32 HWIO_xfs_in32(xfs_u32 InAddress) {
*/
xfs_u32 IoContents;
__asm__ volatile("eieio; lwz %0,0(%1)" : "=r"(IoContents) : "b"(InAddress));
__asm__ volatile("eieio; lwz %0,0(%1)"
: "=r"(IoContents)
: "b"(InAddress)
: "memory");
return IoContents;
}
@@ -43,7 +52,8 @@ void HWIO_xfs_out8(xfs_u32 OutAddress, xfs_u8 Value) {
* such that the I/O operation completes before proceeding on
*/
__asm__ volatile("stb %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress));
__asm__ volatile("stb %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress)
: "memory");
}
/*****************************************************************************/
@@ -52,7 +62,8 @@ void HWIO_xfs_out16(xfs_u32 OutAddress, xfs_u16 Value) {
* such that the I/O operation completes before proceeding on
*/
__asm__ volatile("sth %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress));
__asm__ volatile("sth %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress)
: "memory");
}
/*****************************************************************************/
@@ -62,5 +73,6 @@ void HWIO_xfs_out32(xfs_u32 OutAddress, xfs_u32 Value) {
* such that the I/O operation completes before proceeding on
*/
__asm__ volatile("stw %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress));
__asm__ volatile("stw %0,0(%1); eieio" ::"r"(Value), "b"(OutAddress)
: "memory");
}
@@ -95,7 +95,7 @@ int Local_Write(struct LocalLinkInterface *ll, unsigned int buffer_len,
LOG(logDEBUG1, ("LL Write - Len: %2d - If: %X - Data: ", buffer_len,
ll->ll_fifo_base));
for (int i = 0; i < buffer_len / 4; i++)
for (int i = 0; i < (int)buffer_len / 4; i++)
LOG(logDEBUG1, ("%.8X ", *(((unsigned *)buffer) + i)));
while (words_send <= last_word) {
@@ -10,7 +10,7 @@ script_dir = ../../etc/
BLACKFIN_CC = bfin-uclinux-gcc
CROSS = powerpc-4xx-softfloat-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DEIGERD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DEIGERD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = eigerDetectorServer
DESTDIR = bin
@@ -890,7 +890,7 @@ int getDefaultDac(enum DACINDEX index, enum detectorSettings sett,
if (sett != UNDEFINED) {
return FAIL;
}
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
*retval = defaultDacValues[index];
return OK;
@@ -900,7 +900,7 @@ int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) {
if (sett != UNDEFINED) {
return FAIL;
}
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
char *dac_names[] = {DAC_NAMES};
@@ -1441,7 +1441,7 @@ void setDAC(enum DACINDEX ind, int val, int mV) {
}
// validate index
if (ind < 0 || ind >= NDAC) {
if (ind >= NDAC) {
LOG(logERROR,
("\tDac index %d is out of bounds (0 to %d)\n", ind, NDAC - 1));
return;
@@ -9,7 +9,7 @@ script_dir = ../../etc/
CROSS = nios2-buildroot-linux-gnu-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
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
@@ -9,8 +9,10 @@ script_dir = ../../etc/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DJUNGFRAUD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DJUNGFRAUD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-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 = jungfrauDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
@@ -405,7 +405,7 @@ int setChipIndex(enum CHIPINDEX ind, char *mess) {
}
int validateChipIndex(enum CHIPINDEX ind, char *mess) {
if (ind < 0 || ind >= NUM_CHIP_INDICES) {
if (ind >= NUM_CHIP_INDICES) {
sprintf(mess, "Invalid chip index %d. Options: %s\n", (int)ind,
CHIP_VALS_HELP);
LOG(logERROR, (mess));
@@ -833,7 +833,7 @@ int getDefaultDac(enum DACINDEX index, enum detectorSettings sett,
return FAIL;
}
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
*retval = defaultDacValues[index];
return OK;
@@ -869,7 +869,7 @@ int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) {
// not a special dac
return FAIL;
}
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
LOG(logINFO, ("Setting Default Dac [%d - %s]: %d\n", (int)index,
dac_names[index], value));
@@ -9,8 +9,10 @@ script_dir = ../../etc/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-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 = moenchDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
@@ -546,7 +546,7 @@ int resetToDefaultDacs(int hardReset) {
int getDefaultDac(enum DACINDEX index, enum detectorSettings sett,
int *retval) {
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
*retval = defaultDacValues[index];
return OK;
@@ -554,7 +554,7 @@ int getDefaultDac(enum DACINDEX index, enum detectorSettings sett,
int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) {
char *dac_names[] = {DAC_NAMES};
if (index < 0 || index >= NDAC)
if (index >= NDAC)
return FAIL;
LOG(logINFO, ("Setting Default Dac [%d - %s]: %d\n", (int)index,
dac_names[index], value));
@@ -10,7 +10,7 @@ script_dir = ../../etc/
CROSS = nios2-buildroot-linux-gnu-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DMYTHEN3D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DMYTHEN3D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = mythen3DetectorServer
DESTDIR ?= bin
@@ -16,7 +16,7 @@ else
endif
CC = $(CROSS)gcc
#TODO: allow these warnings and fix code
CFLAGS += -Wall -std=gnu99 -Wno-format-overflow -Wno-format-truncation -DXILINX_CHIPTESTBOARDD -DARMPROCESSOR -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -Wno-format-overflow -Wno-format-truncation -DXILINX_CHIPTESTBOARDD -DARMPROCESSOR -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
#CFLAGS += -Wall -std=gnu99 -DXILINX_CHIPTESTBOARDD -DARMPROCESSOR -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = xilinx_ctbDetectorServer
@@ -143,7 +143,7 @@ void basictests() {
}
// check for API compatibility - old server
if (sw_fw_apiversion > requiredfwversion) {
if ((uint64_t)sw_fw_apiversion > requiredfwversion) {
sprintf(initErrorMessage,
"This firmware-software api version (0x%lx) is incompatible "
"with the software's minimum required firmware version "
@@ -156,7 +156,7 @@ void basictests() {
}
// check for firmware compatibility - old firmware
if (requiredfwversion > fwversion) {
if (requiredfwversion > (uint64_t)fwversion) {
sprintf(initErrorMessage,
"This firmware version (0x%lx) is incompatible.\n"
"Please update firmware (min. 0x%lx) to be compatible with "
+7 -7
View File
@@ -3,10 +3,10 @@
/** API versions */
#define APILIB "10.1.0 0x260806"
#define APIRECEIVER "10.1.0 0x260806"
#define APICTB "10.0.0 0x250828"
#define APIGOTTHARD2 "10.0.0 0x250828"
#define APIMOENCH "10.0.0 0x250828"
#define APIEIGER "10.1.0 0x260807"
#define APIXILINXCTB "10.0.0 0x250828"
#define APIJUNGFRAU "10.1.0 0x261002"
#define APIMYTHEN3 "10.1.0 0x261022"
#define APICTB "10.1.0 0x261028"
#define APIGOTTHARD2 "10.1.0 0x261028"
#define APIMOENCH "10.1.0 0x261028"
#define APIEIGER "10.1.0 0x261028"
#define APIXILINXCTB "10.1.0 0x261028"
#define APIJUNGFRAU "10.1.0 0x261028"
#define APIMYTHEN3 "10.1.0 0x261028"