Setting up cross compiler for raspberry pi

I’m having trouble setting up the cross compiler that comes with the multi-camera examples from the first vision image specifically the one for the C++ example has anyone figured it out and if so could they provide guidance one how to do it?

What OS? It essentially consists of downloading the compiler zip file, extracting it somewhere, and editing your PATH environment variable to point to its “bin” directory.

windows 10

Okay. So download the Windows .zip from here. Unzip it somewhere (e.g. C:\raspbian10). Go to the start menu and search for “environment variables” and there should be an option to Edit the system environment variables (in Control Panel). Edit the PATH variable and add C:\raspbian10\bin to it (it’s a semicolon-delimited list).

thank you i will try that now

i compiled the c++ example without any modifications made to it and its not allowing me to view the camera stream the console output says “Exec format Error” is there anything that needs to be done to the c++ example code before it can run and allow me to view the streams?

I just tested it locally and it works fine with no modifications. Let’s walk through the steps.

  1. download FRCVision 2020.1.1 image and write it to an SD card
  2. boot the SD card and browse to frcvision.local
  3. download the C++ example from the Application tab (gives you a file called cpp-MultiCameraServer.zip)
  4. extract the C++ example to a folder (e.g. documents)
  5. download the raspbian compiler toolchain (version 2.1.0)
  6. extract the toolchain zip file to e.g. C:\raspbian10
  7. edit system path variable and add C:\raspbian10\bin to it
  8. open a command prompt, go to the cpp-multiCameraServer directory extracted in step 4
  9. run “make”; this should succeed (with some warning messages)
  10. go to frcvision.local, click on “writable”, go to application tab, select “Uploaded C++ executable”, click “Browse…” and select the “multiCameraServerExample” file in the cpp-multiCameraServer directory, then click “Upload and Save”
  11. Go to the Vision Status tab, enable console output, and see if it’s running successfully.

thank you for all the help i had been uploading the main.o file and never would have realized my mistake thank you so much and i hope that is the last time i must reach out to you for assistance

Glad you figured out the issue and it’s working for you now! Feel free to reach out with questions, but it can sometimes take me a day to respond (this is a volunteer activity and I have a day job that pays the bills).

1 Like