pavel-demin / red-pitaya-notes

Notes on the Red Pitaya Open Source Instrument
http://pavel-demin.github.io/red-pitaya-notes/
MIT License
337 stars 209 forks source link

Embedded SDR out of tree blocks #470

Closed ghost closed 7 years ago

ghost commented 7 years ago

I have some out of tree blocks in C++ that I would like to use on the Red Pitaya. Is there a way to move them over without having to compile them on the Red Pitaya?

pavel-demin commented 7 years ago

You can cross-compile them on a PC.

ghost commented 7 years ago

Thanks, that makes good sense. I am trying to follow this from the wiki: https://wiki.gnuradio.org/index.php/Cross_compile_an_OOT_and_install_on_target (is that correct?) and am getting an error from cmake saying "The C++ compiler "/usr/bin/c++" is not able to compile a simple test program"

pavel-demin commented 7 years ago

The wiki page looks like a good starting point. I never used cmake for armhf cross-compilation. Only used it once for win32 cross-compilation. Correct CMAKE_TOOLCHAIN_FILE was essential.

I've just found a toolchain file for armhf cross-compilation that looks reasonable: https://github.com/zyga/cmake-toolchains/blob/master/Toolchain-Ubuntu-gnueabihf.cmake

ghost commented 7 years ago

I get the same problem with that toolchain file. I will go ask more generally on the mailing list

What method would you suggest for cross compiling if you don't use cmake?

pavel-demin commented 7 years ago

What method would you suggest for cross compiling if you don't use cmake?

I never cross-compiled GNU Radio blocks. Can't suggest anything.