Vector Informatik offers a free implementation of XCP for MCUs that allows for DAQ (data acquisition) and STIM (data stimulation) here. My understanding from the technical reference manual is:
I have so far tried to integrate the driver code but I cannot get the code to compile. I had to initially redefine some typedefs because the driver does not use the same semantics as in the C99 standard (so 'vuint32' instead of 'volatile uint32_t' or 'vuint32_t' for 'volatile unsigned long int').
After all of the corretions, I get the error 'make: *** [makefile:68: Executable.elf] Error 1', which does not point to any specifc C error, making it extremely hard to trace.
In the makefile itself, line 68 contains the GCC compile command 'powerpc-eabivle-gcc -o "Executable.elf" "@Executable.args" ...' so I doubt the error is in there. In addition, the makefile is autogenerated on compilation, which, I suppose, should not be edited manually.
I have tried cleaning and rebuilding the project to see if the error goes away but it does not.
Since I am not using XCP Professional or related configuration software, the code integration is done manually and there does not seem to be a lot of support on Vector's side for the free version hence I am wondering if someone has successfully integrated these libraries and if they had to overcome the above bolded error.
Thanks.
Hello there,
Is there XCPonCAN sample basic project available for mpc5744p DevKit board?
Thanks for your help in advance.
I have managed to implement the XCP Driver (with linker suppression of multiple definitions) and DAQ mode is working, to an extent. I was able to connect to the MPC5744P-DEVKIT using MATLAB as XCP Master, however, the data is wrongly scaled. For testing, a basic model is implemented:
uint32_t model(uint32_t res) {
if (res < 2000)
return res * 2 + modelOffset; // modelOffset set to 2.
else
return 0;
}
This model is once each iteration in the main while(1) loop. However, on reading the results in MATLAB via XCP, the data range is scaled:
I provide the code as well as the MATLAB script used to talk to the DEVKIT. The A2L file was generated using Vector CANape 15.
Hello im using also xcp basic driver but i found some limitations i can just read one daq and one odt with totale size 8 byte, i want to increase the size to measure more variables, i ve located the issue on max dto/cto i ve changed the value in the code and in the master tool(CANape but in canape it's always 8 byte i cannot changed ), i need some help
Hi,
I'm afraid that this question is out of scope for this community subspace. You can try ask on https://community.nxp.com/community/mbdt
Anyway - it may be caused by big-endian architecture of PowerPC (you are using multi byte numbers). But it is just guess.
Jiri
Yes, I have attached the project. The main function however contains only dummy calls, some of which are commented out. I have just been trying to see if the project could even compile without me performing the necessary driver hooks such as actually reading from the FlexCAN drivers.
Hi,
you have bunch of multiple definitions in your project (I didn't look for reason). With -z multdefs linker option your project can be build, but I didn't test the functionality:
Hope it helps.
Jiri
Thanks for this. The linker command -z muldefs does indeed remedy the problem.
I have tried surrounding all my definitions with #ifndef ... #endif guards without the band-aid linker command and the above error still appears suggesting that multiple definitions are to be found within the supplied XCP driver code.
Hi,
can you please share your project?
Jiri