Skip to content

huangdong332/bootloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Bootloader Test CAPL DLL

Status GitHub Issues GitHub Pull Requests License


A CAPL DLL supporting bootloader test.

📝 Table of Contents

🧐 About

This is a CAPL DLL project. This CAPL dll can be add to the CAPL environment to extend its functionalty.

There are two functions exported in ths dll.

blOpenFlashFile: Prase the Intel Hex file or Motorola SREC file and calculate checksum of each segment in it. Also extract the start address and size of each segment.

blBuffer: Extract data from specific segment in a HEX or SREC file and compose it to a complete UDS download service PDU.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

MinGW and Make.

This CAPL dll is built with a MinGW gcc tools for 32bit Windows target. The 64bit CAPL dll can't be recognized by the CAPL browser any way. The compile process is managed by a Makefile.

I use msys64 to install MinGW and Make.

🎈 Usage

To use this CAPL dll in CAPL code, include it in your code first. The path should be either the absolute or related to the CAPL code.

includes
{
  #pragma library("capl.dll")
}

After this, APIs in this dll are listed in CAPL Funtions window.

File crcspec

To specify CRC parameters in crcspec, below content should be added in file crcspec and this file should be located in CANoe project's root.

Width 32
Polynomial 04C11DB7
InitialValue FFFFFFFF
InputReflected 1
ResultReflected 1
FinalXORvalue FFFFFFFF

⛏️ Built Using

After change to this project's root directory, run follow command to build this CAPL dll.

make

To test this build, run

make test