PCAN-Router – User Manual
20
Do the following to create your own firmware:
1.
Create a folder on your local PC. We recommend using a
local drive.
2.
Copy the complete unzipped
PEAK-DevPack
directories into
your folder, incl. all subs.
No installation is required at all.
3.
Run the script
SetPath_for_VSCode.vbs
. This script will
modify the example directories for the Visual Studio Code
IDE (https://code.visualstudio.com/).
After that every example directory has a folder called
.vscode
containing the needed files with your local path
information.
4.
Now you can start Visual Studio Code which is available for
free from Microsoft.
5.
Select the folder of your project and open it.
For example:
d:\PEAK-DevPack\Hardware\PCAN-
Router\Examples\01_ROUTING
6.
You can edit the C code and call
make clean
,
make all
, or
compile single file via the menu
Terminal > Run Task
.
7.
Create your firmware with
Make All
.
The firmware is the
*.bin
in the sub directory
out
of your project
folder.
5.1
Library
The development of applications for the PCAN-Router is supported by
the library
libPCAN-RouterGNU*ys.a
(
*
stands for version number),
a binary file. You can access all resources of the PCAN-Router by
means of this library. Die library is documented in the header files
(
*.h
) which are located in the
inc
subdirectory of each example
directory.