Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
51a1c486
Commit
51a1c486
authored
Oct 19, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrpc.c: optionnaly disable ertm support
to simplify static link
parent
c8b6b77c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
15 deletions
+28
-15
wrpc.c
tools/wrpc.c
+28
-15
No files found.
tools/wrpc.c
View file @
51a1c486
...
...
@@ -33,7 +33,11 @@
#include <libvmebus.h>
#endif
#define SUPPORT_ERTM
#ifdef SUPPORT_ERTM
#include "libertm.h"
#endif
#include "spll_debug.h"
#include "hw/wrc_cpu_csr.h"
...
...
@@ -231,6 +235,7 @@ static int board_pci_init(struct board *board_base,
return
0
;
}
#ifdef SUPPORT_ERTM
static
void
board_ertm14_help
(
void
)
{
printf
(
"eRTM14/15 board
\n
"
);
...
...
@@ -281,6 +286,21 @@ static int board_ertm14_init(struct board *board_base,
return
0
;
}
static
struct
board_ertm14
board_ertm14
=
{
{
"ertm14"
,
board_ertm14_init
,
board_ertm14_fini
,
board_ertm14_help
,
NULL
,
NULL
},
NULL
,
NULL
};
#endif
/* SUPPORT_ERTM */
static
int
board_pci_fini
(
struct
board
*
base_board
)
{
struct
board_pci
*
board
=
(
struct
board_pci
*
)
base_board
;
...
...
@@ -340,20 +360,6 @@ static struct board_pci board_pci =
0
};
static
struct
board_ertm14
board_ertm14
=
{
{
"ertm14"
,
board_ertm14_init
,
board_ertm14_fini
,
board_ertm14_help
,
NULL
,
NULL
},
NULL
,
NULL
};
static
int
board_spec_init
(
struct
board
*
board_base
,
int
*
argc
,
char
*
argv
[])
...
...
@@ -643,7 +649,9 @@ static struct board_cernvme board_wr2rf =
static
struct
board
*
boards
[]
=
{
&
board_pci
.
parent
.
parent
,
&
board_spec
.
parent
.
parent
,
#ifdef SUPPORT_ERTM
&
board_ertm14
.
parent
,
#endif
#ifdef SUPPORT_CERN_VMEBRIDGE
&
board_cernvme
.
parent
.
parent
,
&
board_wr2rf
.
parent
.
parent
,
...
...
@@ -1551,6 +1559,7 @@ void spll_dump_debug_data(const uint32_t *buf, size_t size)
}
}
#ifdef SUPPORT_ERTM
void
spll_readout_ertm14
(
struct
board_ertm14
*
board
,
int
undersample
)
{
...
...
@@ -1578,6 +1587,7 @@ void spll_readout_ertm14(struct board_ertm14* board, int undersample )
fprintf
(
stderr
,
"ertm14: stopping SPLL logging...
\n
"
);
}
#endif
void
spll_readout_direct
(
struct
board
*
board
)
{
...
...
@@ -1624,7 +1634,8 @@ static int do_spll_recorder(int argc, char *argv[])
{
int
is_ertm
=
0
;
int
c
;
int
undersample
=
20
;
int
undersample
__attribute__
((
unused
))
=
20
;
if
(
board_open
(
&
argc
,
argv
)
<
0
)
return
1
;
...
...
@@ -1648,10 +1659,12 @@ static int do_spll_recorder(int argc, char *argv[])
is_ertm
=
!
strcmp
(
board
->
name
,
"ertm14"
);
if
(
is_ertm
)
{
#ifdef SUPPORT_ERTM
signal
(
SIGINT
,
spll_sighandler
);
signal
(
SIGTERM
,
spll_sighandler
);
spll_readout_ertm14
(
(
struct
board_ertm14
*
)
board
,
undersample
);
#endif
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment