ISOBUS Development

I wonder how you build this in VS?

The library is built with CMake, so assuming you have the CMake build system installed with the VS installer, you should be able to right click the library, “Open with Visual Studio” (or use File->Open Folder), and Visual Studio will configure and build the library from there without needing a .sln file or other “project” file. Likewise, if you want to consume it in your own project, you just need to add add_subdirectory("AgIsoStack-plus-plus") (or whatever you named the directory) in your CMakeLists.txt file and build it the exact same way. It even builds in WSL from VS if you want using SocketCAN as the CAN backend.

image

Using VS Code is also quite easy as long as you have MSVC (or your favorite compiler) and CMake installed. You just need the C/C++ Extension Pack from the marketplace, then when you open the folder in VS Code, it will ask if you want to configure the project (which runs CMake). From there you can select a build target and build from the command palette.

1 Like

Hi, I can not find C/C++ Extension Pack in VS. there is no extension with that name.

Any idea?

It’s called “CMake Tools”

Wierd i can find only this.

And some errors… :slight_smile:

Oh, what I said was for VS Code! Not regular visual studio!

For regular Visual Studio, open the Visual Studio Installer and make sure you have installed “Desktop development with C++” workload and “CMake tools for Windows”

image

image

On the other hand, in VS Code, the C/C++ extension pack includes CMake Tools and some nice other things.

But choice of which to use is up to you. I actually prefer the full Visual Studio due to how robust the debugger is.

1 Like

Also, make sure you have Git installed :slight_smile:

image

VS installer can do this too I believe
image

1 Like

Do you have PC CAN interface?

On Windows PCs we support Peak devices, as well as the Rusoku Toucan. Other PC CAN interfaces are pretty easy to add as long as there is a C++ or C API for them. We have some brief instructions on how to add support for any such third party interfaces on our tutorial site.

On MacOS, we also support Peak devices via a port of their API called MacCAN.

1 Like

Thanks for reply, I see in code Innomaker usb to can api call but not Rusoku Toucan or am I wrong?

Oh, I always forget we support Innomaker. We do support the Innomaker USB2CAN, though their driver is both closed source and less reliable than some of the others, which is out of our control, so keep that in mind… use of their driver changes the license of the final excutable you generate which may not be ideal for everyone.

Rusoku Toucan is supported!

The full list of supported drivers is in this CMake file

  • Socket CAN (Linux only, supports hundreds of adapters)
  • WindowsPCANBasic (PEAK)
  • VirtualCAN (This a loopback device for testing)
  • ESP32 Two wire automotive interface (TWAI)
  • MCP2515 SPI Controller (Though only on ESP32 I think. On other platforms such as Raspberry Pi, Socket CAN would be better for using an MCP2515)
  • TouCAN (On Windows)
  • MacCAN PCAN (Mac os)
  • InnoMaker USB2CAN (Windows)
  • FlexCAN on Teensy 4.0/4.1 (though this is not in the CMake since it’s only available with Arduino IDE)

If you’re compiling with CMake, you just need to set a variable called CAN_DRIVER to be whatever one you want to use.

1 Like

Hi Elyon
Im developing an isobus application. You maybe able to assist. Can you shoot me an email at graeme.cox@optisurface.com ?

Just happened across this article…