Skip to content

Commit 1a2531f

Browse files
authored
xcplib: singlethreaded lock-free calibration segments (#15)
xcplib improvements: * Single thread RCU lock-free calibration segments * Register measurements in local scope only once * CMakeLists.txt added * Pedantic warnings * epk memory segment * CANape projects updated
1 parent c1ab95d commit 1a2531f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+13040
-1512
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
target
3-
3+
/Cargo.lock
44

55
# Misc
66
.DS_Store
@@ -29,10 +29,9 @@ CANapeTmpMea.ini
2929
# Artefacts generated by examples and tests
3030
test*.json
3131
test*.a2l
32-
3332
/*.a2l
3433
/*.json
35-
3634
mandelbrot.png
3735

3836

37+
/examples/heap_demo/*

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ categories = ["MC"]
1717
members = [
1818
"xcp_client",
1919
"examples/hello_xcp",
20-
"examples/xcplib_demo",
2120
"examples/calibration_demo",
2221
"examples/struct_measurement_demo",
2322
"examples/single_thread_demo",
@@ -42,10 +41,6 @@ path = "xcp_client/src/main.rs"
4241
name = "hello_xcp"
4342
path = "examples/hello_xcp/src/main.rs"
4443

45-
[[example]]
46-
name = "xcplib_demo"
47-
path = "examples/xcplib_demo/src/main.rs"
48-
4944
[[example]]
5045
name = "calibration_demo"
5146
path = "examples/calibration_demo/src/main.rs"

build.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,14 @@ fn main() {
4242
.allowlist_function("XcpEventExt")
4343
// Misc
4444
.allowlist_function("XcpPrint")
45+
.allowlist_function("XcpSetEpk")
4546
.allowlist_function("XcpSendTerminateSessionEvent")
4647
.allowlist_function("ApplXcpSetLogLevel")
4748
.allowlist_function("ApplXcpSetA2lName")
48-
.allowlist_function("ApplXcpSetEpk")
4949
.allowlist_function("ApplXcpGetAddr")
5050
.allowlist_function("ApplXcpRegisterCallbacks")
5151
.allowlist_function("ApplXcpGetClock64")
5252
//
53-
.allowlist_function("c_demo")
54-
//
5553
.generate()
5654
.expect("Unable to generate bindings");
5755
bindings.write_to_file("src/xcp/xcplib.rs").expect("Couldn't write bindings!");
@@ -64,10 +62,6 @@ fn main() {
6462
.include("xcplib/src/")
6563
.include("xcplib/")
6664
//
67-
// @@@@ TODO temporary file for testing XCPlite compatibility
68-
.file("xcplib/c_demo.c")
69-
.file("xcplib/src/a2l.c")
70-
//
7165
// xcplib source files
7266
.file("xcplib/src/xcpAppl.c")
7367
.file("xcplib/src/platform.c")

examples/calibration_demo/CANape/xcp_demo_autodetect.a2l

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
ASAP2_VERSION 1 71
33
/begin PROJECT cal_demo ""
44

5-
/begin HEADER "Written by Vector xcp_lite A2L registry" VERSION "0.2.0" PROJECT_NO VECTOR /end HEADER
5+
/begin HEADER
6+
"Written by Vector xcp_lite A2L registry"
7+
VERSION "0.2.0"
8+
PROJECT_NO
9+
VECTOR
10+
/end HEADER
611

712
/begin MODULE cal_demo ""
813

examples/hello_xcp/CANape.png

245 KB
Loading

0 commit comments

Comments
 (0)