Uds Bootloader
Uds Bootloader
The Simma Software CAN Bootloader provides a target-specific and compact solution for
reprogramming ECUs efficiently and securely. Our bootloaders have been used worldwide for over
fifteen years, beginning with J1939 and CAN based systems. Typically, the bootloader reserves a small
portion of the ECU’s internal memory for itself, leaving the remaining memory for the main application.
The average code size of the bootloader package ranges from 2-4 KB of memory, depending on the needs
of the customer and specifics of the ECU. If requested, our bootloaders can be secured via
HMAC_SHA256 encryption, as well as support certain types of compression and digital signing of
incoming hex and s-record files.
When the ECU comes out of reset, the bootloader code runs to determine if a valid application has been
loaded. If an application has been detected, the bootloader will wait for a short period (100ms-2 seconds)
and then jump to the application. The wait is implemented to allow for the user to overwrite an
unresponsive application, if necessary. If no application is detected, the bootloader will continuously
listen for the commands required to start the loading process.
1.2 FlashUDS:
The PC bootloader application, named flashUDS.exe, works with Simma Software VNA
232/USB/Bluetooth to send the new flash image across the UDS network. flashUDS allows the user to
specify the port number for the adapter and the s-record or hex file to be used.
Step 2: The second message sent to the ECU is the start of a seed-key procedure, to ensure that the PC
request is authorized to begin the bootloading process. Upon receiving the request, the target will send the
seed information, which the PC tool will use to generate a key.
Step 3: The next command involves an unlock procedure to ensure that information is being transmitted
correctly between the PC tool and the ECU. The tool sends a key to unlock the bootloader with the
version information received in the previous communication. The bootloader checks to ensure that it is
the expected resulting key; if it is, the bootloader will begin the new loading session proper.
Step 4: With the bootloader unlocked, the PC tool will instruct the bootloader to begin the process of
erasing the application space. Once complete, the bootloader will respond, indicating the success/failure
of the erase. If successful, the bootloader will prepare to receive the application data.
Step 5: (UDS) Next, the PC tool will send a data transfer request with the starting address and size of the
data to be sent. If successfully received, the ECU will provide a positive response to begin the
downloading process. The PC tool will then send the data as a “data transfer” service message type, as the
size specified in the request. Once complete, the PC tool repeats this step until the app to be written has
been fully transferred.
Step 6: The PC tool should now transmit a ‘check download’ message to ensure that the transmission was
fully received. The bootloader will perform a checksum to confirm the data, and send an
acknowledgement of the result.
Service Data
Service Requests:
Service ID equals 0x10: Diagnostic Session Control Request
Parm[1] equals 0x2: Programming Session
DLC: 2 bytes
Param[1] equals 0x1, Param [2] equals 0x0, Param[3] equals 0xA: Check Download
DLC: 4 bytes
Service Responses: