Recent

Author Topic: CAN Port on Raspi Linux  (Read 616 times)

HolzDübel12

  • Newbie
  • Posts: 1
CAN Port on Raspi Linux
« on: September 08, 2023, 11:01:32 pm »
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

  • Hero Member
  • *****
  • Posts: 1844
Re: CAN Port on Raspi Linux
« Reply #1 on: September 09, 2023, 12:42:32 am »
You might perhaps want to have a look at this thread.

 

TinyPortal © 2005-2018