Presentation is loading. Please wait.

Presentation is loading. Please wait.

C-Usercode on FRC-EP1x0 From zero to own usercode in 10 steps

Similar presentations


Presentation on theme: "C-Usercode on FRC-EP1x0 From zero to own usercode in 10 steps"— Presentation transcript:

1 C-Usercode on FRC-EP1x0 From zero to own usercode in 10 steps
Heiko Krautter, PM Automotive , V1.0

2 C-Usercode on FRC-EP1x0 Introduction
FRC-EP1x0 based configurations can be extend by own C-Code The C-Code is not hosted directly on the operating system In the HMS case, C-Code is hosted on top of a gateway application The gateway controls the fieldbusses (ID1x), i.e. CAN, CAN-FD, LIN, … The C-Code is connected to the gateway by means of a “virtual” bus (ID2x in the picture) The data relevant for the C-Code is routed by the gateway via this “virtual” bus The calculation results are also sent back to the gateway via this bus The data is then forwarded to the field bus or to the Residual Bus Simulation (RBS) C- Usercode

3 C-Usercode on FRC-EP1x0 Benefits
Not hosting the model directly on the OS has the following benefits: Fieldbus setup/control needs not to be done by the C-Code Cyclic message transmitting needs not to be controlled by the C-Code All data which doesn’t need the help of the module bypasses the C-Code The module is unloaded from RBS functions (CRC calculation, Message Counters, …) Signal extraction out of the messages is done by the gateway In fact the… … gateway/RBS concentrates on the communication simulation … the C-Code concentrates on the functional simulation/signal manipulation The gateway/RBS functionality is very easily configured by a PC based tool (ACT)

4 C-Usercode on FRC-EP1x0 What is needed ?
To create own C-Code extended configurations the following topics are needed A Windows PC needed for the configuration FRC-EP170/190 Embedded platform device Automotive Configuration Tool (ACT) Bus description files for the fieldbusses The HMS ACT-Tool SDK (software development kit) extension The PC provided by HMS The SDK comes with a Eclipse based debugging environment

5 C-Usercode on FRC-EP1x0 How to ?
The following charts shall visualize how own C-Code is created To show this, the following “virtual” use case shall implemented: A electronic control unit (ECU) shall be connected to a vehicle Most Frames and signals do fit for the vehicle, but… … the vehicle uses 500kBit/s whereas the ECU runs at 250kBit/s … the message ID’s don’t fit … the ECU needs the speed of the car in miles/h and not in km/h The ECU shall be operated in the moving vehicle without the aid of a PC (standalone) So … … the signals “fitting” shall be provided by means of a CAN2CAN Gateway … the signals which need to be calculated shall be routed via the C-Code module This is only a easy example, in reality much more can be done by GW and C-Code

6 C-Usercode on FRC-EP1x0 Bus description files CANdB 1 (of Vehicle)
CANdB 2 (of ECU)

7 C-Usercode on FRC-EP1x0 Step 1
Start ACT on the PC and create a new configuration File → new Project Select the desired platform device

8 C-Usercode on FRC-EP1x0 Step 2
Add the bus description files to CAN1 and CAN2 and adjust CAN1 bitrate Click to add bus descriptions Click to modify bus settings

9 C-Usercode on FRC-EP1x0 Step 3
Add the “virtual” C-Usercode bus to the configuration Click to add the bus Select from drop-down list

10 C-Usercode on FRC-EP1x0 Step 4
Route all fitting signals from CAN1 to CAN2 and vice versa Use drag & drop to create the message/signal mappings from source to destination

11 C-Usercode on FRC-EP1x0 Step 5
Route all the signals to be calculated to the MATLAB-Bus via drag & drop

12 C-Usercode on FRC-EP1x0 Step 6 Execute Build Configuration
Use Build → Build Configuration

13 C-Usercode on FRC-EP1x0 Step 7
Add the desired functionality to the automatically created Eclipse base module Eclipse is automatically started and the base module created Only the manipulation needs to be added

14 C-Usercode on FRC-EP1x0 Step 8
Close Eclipse and finalize the configuration build ACT did wait for terminating Eclipse and is then compiling/linking the generated C-Files

15 C-Usercode on FRC-EP1x0 Step 9
Download and start the created configuration to the FRC-Device Build → Download configuration to target device Use to store the config persistent Select to immediately start the model

16 C-Usercode on FRC-EP1x0 Optional step 10 Debug your code (if needed)
Define breakpoints and step through your code Project → Bus Configuration Use to start the remote debugger After fixing potential problems, rebuild the configuration and download to the FRC

17 C-Usercode on FRC-EP1x0 Ready !

18 Thanks for listening!


Download ppt "C-Usercode on FRC-EP1x0 From zero to own usercode in 10 steps"

Similar presentations


Ads by Google