Forum > FPC development

CAN Port on Raspi Linux

(1/1)

HolzD├╝bel12:
Hello,
I need to port a very old project written in Borland Turbo Pascal to FreePascal.
It is clear to me almost everything I have to do, only with one topic I am very unsure. The old project used a CAN interface which has to be supported again.

In the first step I use a Raspberry Pi with a CAN shield. The drivers are available under Linux and there are a lot of *.h files because CAN works over SocketCAN.

I could now start to translate file by file into Pascal to access the interface from FreePascal. This will be a lot of work and I can't foresee how much there is.
 
The way I imagine to do it is to write a small program in C++ that does the communication with the CAN interface.
Then I only have to address a few functions (InitCan, SendCan, ReceiveCan) in FreePascal.

Do you think this is a good solution or do you know a better one? E.g. a CAN driver under Linux which was written directly in Pascal.

TRon:
You might perhaps want to have a look at this thread.

Navigation

[0] Message Index

Go to full version