02-18-2014 04:29 PM
At the moment we flash ECUs using CANalyzer providing an S19 file. The file structure is very standard and layed out here.
I was wondering if there is an NI tool or a tool someone has written that allows me to flash modules over CAN using an S19 file, with NI hardware? I've used the ECU Measurement toolkit and I don't think it has that functionality. The Automotive Diagnostic Command Set mentions in the description that it can be used for "flashing ECU firmware". But none of the functions mentioned in the manual looks like it can do what I want. Looking at the file structure I feel like I can get the majority of it working without a problem but would rather just use an NI tool if one exists.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
02-19-2014 02:34 AM
Well, it pretty much depends on the protocol you are using to flash your ECUs.
In the ECU MC toolkit, there is even an example that can program an S-record file (or Intel Hex file) to a CCP or XCP target... provided you are using CCP or XCP as the programming protocol. This example should be a good starting point for these types of applications.
The Automotive Diagnostic Command Set has the UDS Request Upload/Download services as 'templates'... if you are using the UDS Diagnostic Protocol on any of the supported transport protocols (usually ISO TP (ISO 15765-2)). Unfortunately, these services are not fully standardized in the UDS standard; they might need tweaking for a special application, but the service VIs are unprotected in the command set... you may change them for your needs.
This covers the main protocols used for flashing ECUs. If you are using a protocol different from the ones mentioned above, there is no direct support for it, sorry.
Have a great day!
Christian
02-19-2014 08:54 AM
Turns out we use CCP, and a Motarola S19 to flash our modules which is awesome because of the shipped example. Unforntunaly we don't use an A2L file. We use some kind of CAPAL script within CANalyzer and it uses a config file that defines which ArbIDs to use for the transfer. This means I can't use the shipped example as it is. But I can use the part of the code that parses the S19 file into the chunks. And I can look at a CAN trace when a module is being flashed, and with those two pieces of information I believe I can perfrom the same operations we are doing now with LabVIEW.
BTW for those interested in this, the part of the example in the ECU MC toolkit that does the S19 parsing is unprotected and doesn't require a toolkit. The part of the code that requries the toolkit is the part that actually talks over CAN to do the work.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord