Comments (7)
Hello,
this error message means, the requested number of bytes to upload, was larger than the available space in the XCP response message. That should be impossible to happen with an int32 variable, while the parameter XCPTL_MAX_CTO_SIZE is set to 252.
I can not reproduce this with latest CANape version. Which version did you try?
What was the actual value of the size parameter (should be 4) and which of the calibration parameters have you tried?
To look deeper into this, it might help us to look at the generated A2L file from your machine.
Thanks!
from xcplite.
Hi @RainerZ ,
Thanks for the reply!
Sorry for the wrong error code(above image error). Actually it will not showing above error while executing the code. When i trying to calibrating global parameter(uint32_t par_uint32 = 32), it will not executing XcpCommand() switch case. only executing XcpPrintCmd() SHORT_UPLOAD case then terminating the execution.
Note: I am trying to executing this code on QNX OS(aarch64). When i tested on linux OS it is working fine.
Do I need to add logic for A2l address creation for qnx os?
Please find details for your reference.
Which version did you try? --> CANape 21
What was the actual value of the size parameter (should be 4) --> Yes it is 4
which of the calibration parameters have you tried? --> All global parameters [uint8_t par_uint8 = 8; uint16_t par_uint16 = 16; uint32_t par_uint32 = 32; uint64_t par_uint64 = 64; int8_t par_int8 = -8; int16_t par_int16 = -16; int32_t par_int32 = -32; int64_t par_int64 = -64; float par_float = 0.32f; double par_double = 0.64;]
Please find generated A2l code for QNX
/begin CHARACTERISTIC gDebugLevel "" VALUE 0x7A0CA018 R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end CHARACTERISTIC /begin CHARACTERISTIC par_uint8 "" VALUE 0xF1216008 R_SBYTE 0 NO_COMPU_METHOD -128 127 /end CHARACTERISTIC /begin CHARACTERISTIC par_uint16 "" VALUE 0xF121600A R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end CHARACTERISTIC /begin CHARACTERISTIC par_uint32 "" VALUE 0xF121600C R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end CHARACTERISTIC /begin CHARACTERISTIC par_uint64 "" VALUE 0xF1216010 R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end CHARACTERISTIC /begin CHARACTERISTIC par_int8 "" VALUE 0xF1216018 R_SBYTE 0 NO_COMPU_METHOD -128 127 /end CHARACTERISTIC /begin CHARACTERISTIC par_int16 "" VALUE 0xF121601A R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end CHARACTERISTIC /begin CHARACTERISTIC par_int32 "" VALUE 0xF121601C R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end CHARACTERISTIC /begin CHARACTERISTIC par_int64 "" VALUE 0xF1216020 R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end CHARACTERISTIC /begin CHARACTERISTIC par_float "" VALUE 0xF1216028 R_FLOAT32_IEEE 0 NO_COMPU_METHOD 0 1E12 /end CHARACTERISTIC /begin CHARACTERISTIC par_double "" VALUE 0xF1216030 R_FLOAT64_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end CHARACTERISTIC /begin GROUP TestParameters "" /begin REF_CHARACTERISTIC gDebugLevel par_int8 par_int16 par_int32 par_int64 par_uint8 par_uint16 par_uint32 par_uint64 par_float par_double /end REF_CHARACTERISTIC /end GROUP
Thanks!
from xcplite.
Ok
Sorry, the code has never been testet on QNX.
We would be happy to add support for QNX and get it running with your help. I am not familiar with QNX, but lets see how far we can get..
Most important thing to make sure is, that ApplXcpGetPointer(gXcp.MtaExt, gXcp.MtaAddr) creates a correct pointer to your calibration variable on QNX.
But another thing should be checked first:
You don't get a response to SHORT_UPLOAD.
My guess is, it goes into dynamic addressing mode and the SHORT_UPLOAD is just pending.
I understood your variable is just a global, not a member variable, which would need dynamic addressing.
The mode check happens a bit hidden in the macro below:
#define check_result(e) { err=(e); if (err!=0) { if (err==CRC_CMD_PENDING) { XcpPushCommand(); goto no_response;} else goto negative_response; } }
It goes in dynamic address mode, when address extension is 1. This happens in XcpWriteMta:
// Ext=0x01 Relativ addressing
#ifdef XCP_ENABLE_DYN_ADDRESSING
if (gXcp.MtaExt == 0x01) {
return CRC_CMD_PENDING; // Async command
}
#endif
So please check first, if XcpWriteMta returns CRC_CMD_PENDING and if yes, why the address extension is set to dynamic addressing mode (=1).
Regards
Rainer
1.)
from xcplite.
Hello @RainerZ,
Thanks for reply!
Most important thing to make sure is, that ApplXcpGetPointer(gXcp.MtaExt, gXcp.MtaAddr) creates a correct pointer to your calibration variable on QNX.
As I said program control does not go into switch case of XcpCommand(). The above function(ApplXcpGetPointer(gXcp.MtaExt, gXcp.MtaAddr) is calling from XcpCommand() switchcases like CC_SET_MTA, CC_SHORT_DOWNLOAD and CC_SHORT_UPLOAD.
And XcpWriteMta() it is calling from XcpCommand() switch cases.
But in XcpPrintCommand() SHORT_UPLOAD returning address ext 0h as given above image.
My question is do we need to add any logic for address creation for a2l file. Because I see in xcpAppl.c their is some platform specific code is given for ApplXcpGetAddr() function. As shown in above image.
I have one more doubt, we can create A2l file using linker map file right? It is not necessary to use a2l.cpp class in application.
If we don't want to call a2l.cpp APIs then we need call only Xcp APIs only right? For that do we have any demo example. It will be very helpful.
Thanks!
from xcplite.
from xcplite.
Hi @RainerZ,
Thanks for the updates. But still I am facing same error.
It was failing inside XcpReadMta() function. It doesn't allow to assign value to *data from *gXcp.MtaPtr pointer.
Even if, It contains value. As shown in above image, gXcp.MtaPtr = 3089928206 It goes into while loop of XcpReadMta() function then terminate the code.
Note: Calibration and measurement is working for instance variable for aarch64.
Can you please help me to resolve this issue.
Thanks!
from xcplite.
Hello,
maybe I misunderstood, what you mean when you say "terminate the code",
Do you get an access violation ?
Please make sure the piece of code below works without terminating or assert:
// Test address conversion functions
uint32_t a = ApplXcpGetAddr((uint8_t*)&par_double);
uint8_t* p = ApplXcpGetPointer(0 /*addr_ext*/, a);
double val = *(double*)p; // read
assert(par_double== val);
*(double*)p = 100.0; // write
assert(par_double== 100.0);
XCPlite uses direct memory access for static variables. The ApplXxx functions above, provide platform specific address translations from A2L representation (uint8_t,uint32_t) to code in XCPlite using (uint8_t*) (like in XcpReadMta). Note that XCPlite uses address extension 0, to access static memory in the main modules address space. Shared module support is not implemented.
XCPlite is not a Vector product. But if you are a CANape user, I suggest you to contact Vector CANape support to clarify this individually. Please ask for a second level support contact and refer to XCPlite for QNX on ARM architecture.
Regards
Rainer
from xcplite.
Related Issues (20)
- running XCPlite on a headless system HOT 1
- Incorrect IP address in the A2L file(XCPLite V5) HOT 12
- XCPsim: Invalid counter in XCP transport layer header HOT 9
- Segmentation Fault using local variables.. HOT 1
- Memory leak pthread_create HOT 1
- New release version
- Multiple instances for c++ application
- CPP_Demo memory dump
- New Release Version
- No function to create physical calibration parameter
- Help HOT 3
- New Release Version
- The functionality corresponding to XCP_ENABLE_SO has not been implemented HOT 1
- Can XCPlite and CANape be run on the same machine? HOT 2
- Why does XcpSetDaqListMode overwrites flags to be mode? HOT 1
- Possibility using virtual address HOT 3
- Heap-use-after-free in socketGetLocalAddr
- XcpCreateEvent cycleTimeNs parameter mismatch in C_Demo HOT 1
- git markings in the source files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcplite.