Skip to content

Commit 4d5bf06

Browse files
authored
V1.0.0 (#38)
* Experimental XCPlite specific A2L creator in xcp_client * Module structure refactored * Sync with XCPlite * Calibration segment management and access moved to xcplib * V1.0.0
1 parent 053919e commit 4d5bf06

Some content is hidden

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

88 files changed

+9868
-5163
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ mandelbrot.png
3636

3737

3838
/examples/heap_demo/*
39+
/no_a2l_demo.out
40+
/no_a2l_demo.log
41+
/compare_hex.py
42+
/compare_hex_detailed.py
43+
/tools/xcp_client/no_a2l_demo.a2l
44+
/tools/xcp_client/no_a2l_demo.log
45+
/tools/xcp_client/no_a2l_demo.out

.vscode/launch.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "lldb",
6+
"request": "launch",
7+
"name": "Debug xcp_client",
8+
"cargo": {
9+
"args": [
10+
"build",
11+
"--bin=xcp_client",
12+
"--package=xcp_client"
13+
],
14+
"filter": {
15+
"name": "xcp_client",
16+
"kind": "bin"
17+
}
18+
},
19+
"args": [
20+
"--log-level=3 --udp"
21+
],
22+
"cwd": "${workspaceFolder}",
23+
"sourceMap": {
24+
"/rustc/*": "${env:HOME}/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/*"
25+
}
26+
},
27+
{
28+
"type": "lldb",
29+
"request": "launch",
30+
"name": "Debug xcp_client (no args)",
31+
"cargo": {
32+
"args": [
33+
"build",
34+
"--bin=xcp_client",
35+
"--package=xcp_client"
36+
],
37+
"filter": {
38+
"name": "xcp_client",
39+
"kind": "bin"
40+
}
41+
},
42+
"args": [],
43+
"cwd": "${workspaceFolder}",
44+
"sourceMap": {
45+
"/rustc/*": "${env:HOME}/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/*"
46+
}
47+
}
48+
]
49+
}

.vscode/settings.json

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,11 @@
11
{
2-
"files.associations": {
3-
"stdatomic.h": "c",
4-
"malloc.h": "c",
5-
"xcpethserver.h": "c",
6-
"xcplite.h": "c",
7-
"xcpqueue.h": "c",
8-
"xcp_cfg.h": "c",
9-
"stdlib.h": "c",
10-
"xcpethtl.h": "c",
11-
"a2l.h": "c",
12-
"stdint.h": "c",
13-
"platform.h": "c",
14-
"stdbool.h": "c",
15-
"xcplib.h": "c",
16-
"istream": "c",
17-
"locale": "c",
18-
"tuple": "c",
19-
"variant": "c",
20-
"ios": "c",
21-
"limits": "c",
22-
"ratio": "c",
23-
"algorithm": "c"
24-
},
25-
"cSpell.words": [
26-
"ampl",
27-
"Appl",
28-
"bitflags",
29-
"CALPAGE",
30-
"calseg",
31-
"COMPU",
32-
"cycletime",
33-
"DNLOAD",
34-
"DONT",
35-
"Histogramm",
36-
"ifdata",
37-
"Informatik",
38-
"INSTS",
39-
"INTIALIZER",
40-
"Mainloop",
41-
"nonoverlapping",
42-
"Plite",
43-
"reinit",
44-
"SBYTE",
45-
"serv",
46-
"SLONG",
47-
"Slonglong",
48-
"thiserror",
49-
"UBYTE",
50-
"Watomic",
51-
"xcplib",
52-
"XCPTL"
53-
]
2+
"rust-analyzer.cargo.features": "all",
3+
"rust-analyzer.checkOnSave.command": "clippy",
4+
"rust-analyzer.debug.sourceFileMap": "auto",
5+
"lldb.displayFormat": "auto",
6+
"lldb.dereferencePointers": true,
7+
"lldb.consoleMode": "commands",
8+
"lldb.launch.sourceMap": {
9+
"/rustc/*": "${env:HOME}/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/*"
10+
}
5411
}

.vscode/tasks.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "cargo",
6+
"command": "build",
7+
"problemMatcher": [
8+
"$rustc"
9+
],
10+
"group": "build",
11+
"label": "rust: cargo build",
12+
"args": [
13+
"--package",
14+
"xcp_client",
15+
"--bin",
16+
"xcp_client"
17+
]
18+
},
19+
{
20+
"type": "cargo",
21+
"command": "build",
22+
"problemMatcher": [
23+
"$rustc"
24+
],
25+
"group": "build",
26+
"label": "cargo build xcp_client",
27+
"args": [
28+
"--package",
29+
"xcp_client",
30+
"--bin",
31+
"xcp_client"
32+
]
33+
},
34+
{
35+
"type": "cargo",
36+
"command": "run",
37+
"problemMatcher": [
38+
"$rustc"
39+
],
40+
"group": "build",
41+
"label": "rust: cargo run xcp_client",
42+
"args": [
43+
"--package",
44+
"xcp_client",
45+
"--bin",
46+
"xcp_client",
47+
"--",
48+
"-h"
49+
]
50+
}
51+
]
52+
}

Cargo.toml

Lines changed: 16 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "xcp_lite"
3-
version = "0.3.0"
3+
version = "1.0.0"
44
edition = "2024"
55
resolver = "2"
6-
rust-version = "1.85.0"
6+
rust-version = "1.90.0"
77
authors = ["RainerZ"]
88
description = "Measurement and Calibration for Rust with XCP, based on XCPlite"
99
readme = "README.md"
@@ -15,7 +15,9 @@ categories = ["MC"]
1515

1616
[workspace]
1717
members = [
18-
"xcp_client",
18+
"tools/xcp_client",
19+
"xcp_type_description",
20+
"xcp_idl_generator",
1921
"examples/hello_xcp",
2022
"examples/calibration_demo",
2123
"examples/struct_measurement_demo",
@@ -24,50 +26,10 @@ members = [
2426
"examples/point_cloud_demo",
2527
"examples/rayon_demo",
2628
"examples/tokio_demo",
27-
2829
]
2930

3031
[workspace.package]
31-
version = "0.3.0"
32-
33-
34-
#--------------------------------------------------------------------------------------
35-
36-
[[example]]
37-
name = "xcp_client"
38-
path = "xcp_client/src/main.rs"
39-
40-
[[example]]
41-
name = "hello_xcp"
42-
path = "examples/hello_xcp/src/main.rs"
43-
44-
[[example]]
45-
name = "calibration_demo"
46-
path = "examples/calibration_demo/src/main.rs"
47-
48-
[[example]]
49-
name = "struct_measurement_demo"
50-
path = "examples/struct_measurement_demo/src/main.rs"
51-
52-
[[example]]
53-
name = "single_thread_demo"
54-
path = "examples/single_thread_demo/src/main.rs"
55-
56-
[[example]]
57-
name = "multi_thread_demo"
58-
path = "examples/multi_thread_demo/src/main.rs"
59-
60-
[[example]]
61-
name = "rayon_demo"
62-
path = "examples/rayon_demo/src/main.rs"
63-
64-
[[example]]
65-
name = "tokio_demo"
66-
path = "examples/tokio_demo/src/main.rs"
67-
68-
[[example]]
69-
name = "point_cloud_demo"
70-
path = "examples/point_cloud_demo/src/main.rs"
32+
version = "1.0.0"
7133

7234

7335

@@ -76,7 +38,11 @@ path = "examples/point_cloud_demo/src/main.rs"
7638
[features]
7739

7840

79-
#default = ["a2l_reader"]
41+
default = ["c_cal"]
42+
43+
# Feature: Use XCPlite calibration segment management and lock/unlock
44+
c_cal = []
45+
8046

8147
# Feature a2l_reader using a2lfile
8248
# Automatic check of the generated A2L file
@@ -134,59 +100,27 @@ xcp_idl_generator = { path = "./xcp_idl_generator/"}
134100
xcp_idl_generator_derive = { path = "./xcp_idl_generator/xcp_idl_generator_derive/"}
135101

136102
# A2L checker (optional)
137-
a2lfile = { version="3.0.0", optional = true}
138-
139-
#--------------------------------------------------------------------------------------
140-
141-
[dev-dependencies]
103+
a2lfile = { version="3.3.0", optional = true}
142104

143105
anyhow = "1.0"
144-
rand = "0.9"
145-
146-
# Alloc stats
147-
stats_alloc = "0.1.10"
148106

149-
150-
# XCP test client
151-
bytes = "1.6.0"
152-
byteorder = "1.5.0"
153-
regex = "1.11.1"
107+
[dev-dependencies]
108+
xcp_client = { path = "./tools/xcp_client" }
154109
tokio = { version = "1.37.0", features = ["full"] }
155-
xcp_client = { path = "xcp_client" }
156-
157-
#goblin = "0.8"
158-
#gimli = "0.28"
159-
160-
161-
# A2L checker (optional)
162-
a2lfile = { version="3.0.0", optional = false}
163-
164-
# dependencies for point_cloud demo example
165-
cdr = "0.2.4"
166-
167-
# dependencies for rayon demo example
168-
rayon = "1.10.0"
169-
num = "0.4.3"
170-
image = "0.25.2"
171-
num_cpus = "1.16.0"
172-
173-
174110

175111
[build-dependencies]
176112
cc = "1.0"
177113
build-info-build = "0.0.40"
178114
bindgen = "0.71.1"
179115

180-
181116
[profile.dev.package."*"]
182117
debug = false
183118
opt-level = 3
184119

185120
[profile.dev]
186-
# panic = 'abort'
187-
# lto = true
188121
debug = true
189-
opt-level = 2
122+
opt-level = 0
123+
debug-assertions = true
190124

191125
[profile.release]
192126
panic = 'abort'

0 commit comments

Comments
 (0)