Skip to content

Commit 1b92a66

Browse files
authored
Less strict memory ordering and bugfixes (#23)
1 parent 584c1da commit 1b92a66

File tree

3 files changed

+81
-173
lines changed

3 files changed

+81
-173
lines changed

xcplib/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# XCPlite V1.x.x
2+
# XCPlite V1.0.0
33

44
XCPlite is a lightweight pure C implementation of the ASAM XCP V1.4 standard protocol for measurement and calibration of electronic control units.
55
It supports XCP on TCP or UDP with jumboframes.
@@ -19,17 +19,27 @@ Checkout the Vector XCP Book:
1919
Visit the Virtual VectorAcedemy for an E-Learning on XCP:
2020
<https://elearning.vector.com/>
2121

22+
## Whats new in V1.0.0
23+
24+
- Breaking changes to V6.
25+
- Lockless transmit queue. Works on x86-64 strong and ARM-64 weak memory model.
26+
- Measurement of and write access to variables on stack.
27+
- Supports multiple calibration segments with working and reference page with independent page switching
28+
- Lock free and thread safe calibration parameter access, consistent calibration changes and page switches.
29+
- Build as a library.
30+
- Used (as FFI library) for the rust xcp-lite version.
31+
2232
## Features
2333

2434
- Supports XCP on TCP or UDP with jumbo frames.
25-
- Thread safe, minimal thread lock and single copy event driven, timestamped high performance consistent data acquisition.
35+
- Thread safe, minimal thread lock and single copy event driven, timestamped high performance and consistent data acquisition.
2636
- Runtime A2L database file generation and upload.
37+
- Prepared for PTP synchronized timestamps.
38+
- Supports calibration and measurement of structures
2739
- User friendly code instrumentation to create calibration parameter segments, measurement variables and A2L metadata descriptions.
2840
- Measurement of global or local stack variables.
2941
- Thread safe, lock-free and wait-free ECU access to calibration data.
3042
- Calibration page switching and consistent calibration.
31-
- Can be build as a library.
32-
- Used (as FFI library) in the rust xcp-lite version.
3343

3444
A list of restrictions compared to Vectors free XCPbasic or commercial XCPprof may be found in the source file xcpLite.c.
3545
XCPbasic is an optimized implementation for smaller Microcontrollers and with CAN as Transport-Layer.

xcplib/src/xcpEthTl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,10 @@ void XcpEthTlGetInfo(bool *isTcp, uint8_t *mac, uint8_t *addr, uint16_t *port) {
569569
int32_t XcpTlHandleTransmitQueue(void) {
570570

571571
// Simply polling transmit queue
572-
// @@@@ TODO Optimize efficiency, use a convdar or something like that to wakeup/sleep the transmit thread
572+
// @@@@ TODO Optimize efficiency, use a condvar or something like that to wakeup/sleep the transmit thread
573573
// @@@@ TODO Optimize the mutex
574574
// This is needed to assure XCP transport layer header counter consistency among response and DAQ packets
575-
// In fact this is a XCP design flaw, CANape supports independand DAQ and response packet counters, but other tools don't
575+
// In fact this is a XCP design flaw, CANape supports independent DAQ and response packet counters, but other tools don't
576576

577577
// Timeout to give the caller a chance to do other heath checking or shutdown the server gracefully
578578
const uint32_t max_outer_loops = 100; // Number of outer loops before return
@@ -581,8 +581,8 @@ int32_t XcpTlHandleTransmitQueue(void) {
581581
// Sleep time in ms after burst or queue empty
582582
const uint32_t outer_loop_sleep_ms = 1; // Sleep time in ms for each outer loop
583583

584-
int32_t n = 0; // Numer of bytes sent
585-
bool flush = false; // Flush queue in regular intervalls
584+
int32_t n = 0; // Number of bytes sent
585+
bool flush = false; // Flush queue in regular intervals
586586

587587
for (uint32_t j = 0; j < max_outer_loops; j++) {
588588
for (uint32_t i = 0; i < max_inner_loops; i++) {

0 commit comments

Comments
 (0)