V2.2.1 - #130
Open
RainerZ wants to merge 107 commits into
Open
Conversation
Replaced fragile definition of _GNU_SOURCE in platform.h with a guard
…API header files. Requires XCPLITE_CONFIGURATION and XCPLIB_CFG_OVERRIDE to be public in CMakeLists.txt.
…nd no_a2l_demo_cpp
xcpclient: Build warnings removed, README.md updated
- Improved variable registration for global and static variables
- Global variables and local static variables in functions without event trigger are registered, but not associated to any specific default DAQ event
- no_a2l_demo, no_a2l_demo_cpp: more demo cases
… scopes (ELF->A2L) - Struct/class types with the same DWARF name in different namespaces, classes or functions get scope qualified typedef names (motor_control.Input, valve_control.Input). Previously all variables of such types referenced the first registered typedef and were shown with the wrong type. - Typedefs with identical content are merged (same type in several compilation units), a name still used by different content gets a numeric suffix. A type used for measurement and for calibration variables gets separate typedefs. - Global variables with the same name in different namespaces get namespace qualified instance names instead of being dropped as duplicates. - GCC declaration/definition entry pairs of namespace scope variables are merged. - Symbol table address resolution: mangled names for namespace scope statics without DWARF location, only local symbols for function local variables (no more stack variables mapped onto same-named globals). - Metadata macros in the same namespace or function as the variable need no scope prefix (XCP_COMMENT(input, ...) in namespace motor_control annotates motor_control.input), explicit prefixes keep working. Metadata for typedef fields of namespace qualified instances. - Fixture cpp_namespaces.elf and unit tests, README, TECHNICAL.md and CHANGELOG updated. - no_a2l_demo_cpp: same-named types and variables in namespaces with XCP_COMMENT, volatile test_array, regenerated CANape A2L/ELF. - xcpclient version 3.0.10 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…fixtures and tests - DebugData::qualified_type_names is filled once after the types are loaded: it follows const/volatile qualifiers to the named type, finds the names used in more than one scope and stores the dotted name for those types only. DebugData::get_type_name returns it or the plain DWARF name; register_struct keeps only the content signature and the numeric suffix. No change in the generated A2L files. - cpp_namespaces.cpp: volatile and const qualified variables of the colliding Input types - c_local_types_a.c/_b.c: struct tags with the same name but different content in two compilation units, registered as state and state_1 - cpp_type_name_collisions.cpp: fixture contributed with pull request vectorgrp#126 - Unit tests for the three fixtures and for the qualified names at DWARF level Co-Authored-By: Pamir Mundt and Claude Fable 5.1
TECHNICAL.md restructured Different READMEs updated
xcpclient: Build warnings removed, README.md updated
- Improved variable registration for global and static variables
- Global variables and local static variables in functions without event trigger are registered, but not associated to any specific default DAQ event
- no_a2l_demo, no_a2l_demo_cpp: more demo cases
… scopes (ELF->A2L) - Struct/class types with the same DWARF name in different namespaces, classes or functions get scope qualified typedef names (motor_control.Input, valve_control.Input). Previously all variables of such types referenced the first registered typedef and were shown with the wrong type. - Typedefs with identical content are merged (same type in several compilation units), a name still used by different content gets a numeric suffix. A type used for measurement and for calibration variables gets separate typedefs. - Global variables with the same name in different namespaces get namespace qualified instance names instead of being dropped as duplicates. - GCC declaration/definition entry pairs of namespace scope variables are merged. - Symbol table address resolution: mangled names for namespace scope statics without DWARF location, only local symbols for function local variables (no more stack variables mapped onto same-named globals). - Metadata macros in the same namespace or function as the variable need no scope prefix (XCP_COMMENT(input, ...) in namespace motor_control annotates motor_control.input), explicit prefixes keep working. Metadata for typedef fields of namespace qualified instances. - Fixture cpp_namespaces.elf and unit tests, README, TECHNICAL.md and CHANGELOG updated. - no_a2l_demo_cpp: same-named types and variables in namespaces with XCP_COMMENT, volatile test_array, regenerated CANape A2L/ELF. - xcpclient version 3.0.10 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…fixtures and tests - DebugData::qualified_type_names is filled once after the types are loaded: it follows const/volatile qualifiers to the named type, finds the names used in more than one scope and stores the dotted name for those types only. DebugData::get_type_name returns it or the plain DWARF name; register_struct keeps only the content signature and the numeric suffix. No change in the generated A2L files. - cpp_namespaces.cpp: volatile and const qualified variables of the colliding Input types - c_local_types_a.c/_b.c: struct tags with the same name but different content in two compilation units, registered as state and state_1 - cpp_type_name_collisions.cpp: fixture contributed with pull request vectorgrp#126 - Unit tests for the three fixtures and for the qualified names at DWARF level Co-Authored-By: Pamir Mundt and Claude Fable 5.1
TECHNICAL.md restructured Different READMEs updated
# Conflicts: # CHANGELOG.md # src/platform.c
Fixed older protocol layer versions
Restore dropped the CMP CHANGELOG entries Changed several places still describing the old MTU convention Added MTU check to lwip sendto Version aligned to 2.2.1 in CMakeLists.txt and in OPTION_VERSION_MAJOR/_MINOR/_PATCH in xcplib_cfg.h
…ddress size of the ELF file - .debug_frame and .eh_frame were parsed with the 8 byte address size of the host, which produced unusable frame descriptions for ARM and Xtensa targets and a CFA offset of 0 by accident - Xtensa (ESP32): CFA offset 0 by design, the trigger macros pass the CFA itself (__builtin_dwarf_cfa()), verified on ESP32-S3 with freertos_esp32_demo - ARM Cortex-M: the stack frame relative addresses of local variables change, the frame pointer to CFA distance is added now, to be verified with freertos_stm32_demo - Location expressions which can not be evaluated (registers, entry values, optimized code in other compilation units) and variables without a name are logged at debug level - Frame address convention documented in TECHNICAL.md and OFFLINE_A2L.md
…cope pins enabled by default, ADS1115 optional
…iables in generated A2L files - register_variables takes the default event: global variables and static variables in functions without an event trigger get it as default event (DAQ_EVENT VARIABLE with DEFAULT_EVENT_LIST), stack variables and statics with a trigger keep their fixed event - The default event id is checked against the registry, an unknown id is reported - Unit test with the C++ fixture, README usage and example, CHANGELOG and OFFLINE_A2L.md - Verified on ESP32-S3: A2L created with --default-event 1, global_counter measured with it
…tos_esp32_demo remote A2L generator scripts Improved xcpclient error handling and exitcode
… event trigger - Location lists referenced by index (DW_FORM_loclistx, clang) are evaluated like the location lists of DWARF 4, they were reported as unexpected location attributes - A location list is accepted only if all its entries describe the same memory location, the trigger point of the event is not known. Previously the first memory location in the list was used, which may be valid only in a part of the function - A variable in a register or with changing locations is reported as not measurable, like a register location, and not looked up in the symbol table by name. Returning no location matched a local variable to the xcp_meta__unit__ marker symbol of the same name suffix and registered a bogus measurement - New attribute macro XCP_NOINLINE in xcplib.h for functions which trigger an event and measure their local variables, used by foo() in no_a2l_demo and no_a2l_demo_cpp. The xcpclient warning for inlined functions and docs/OFFLINE_A2L.md refer to it - Verified with no_a2l_demo (clang, aarch64) and freertos_emu_demo (GCC -O1, location lists): measurement names and addresses unchanged
… the numerical event id
…tions Function scope XCP_COMMENT/XCP_UNIT markers are static const variables without DWARF location, their address is resolved from the symbol table. The unique suffix search became ambiguous as soon as several functions defined a marker with the same name, all of them were dropped with address 0.
…A parser Clang emits DWARF 5 with DW_FORM_addrx for DW_AT_low_pc and DW_FORM_strx for names. The CFA parser only handled the direct forms, every function of such a build was skipped silently and all events got a stack frame offset of 0, the stack relative variable addresses were wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XCP on UDP - RAW ethernet and CMP HAL support