Development IDE suggestions

Hi,

I’m not sure if this is the correct forum category.

I’ve downloaded the elkpi-sdk and installed it in a Linux VM.

2 questions (maybe this should be 2 separate forum topics)

(1) I would like to try compiling and running a simple command line “Hello World” command line program.

I’ve run the “source” command shown at https://github.com/elk-audio/elkpi-sdk. Then I tried compiling a simply C++ HelloWorld type program (with #include <iostream>). FIrst I tried using “$ g++”, which seemed to generate an i386 image, then I tried “$ arm-elk-linux-gnueabi-g++”, which gave a compiler error about missing <iostream>.

(2) I’d like to use an IDE such as Eclipse 2019-09 to edit and remotely debug it.

I’ve previously set up Eclipse to do this, with other ARM toolchains, but not with a Yocto toolchain.

Any hints, such as setting up Include and library paths, or which Eclipse project type to use, etc?

Thanks in advance.

  • Rick

Hi Rick,

The toolchain is meant to be used together with some sort of build system like make or better CMake. In your case, you got the compiler right by explicitly referring to it ($CXX was also an option) but you’re still missing a proper definition of system libraries, archiver, linker, and all the other tools.

I’d suggest trying to use a simple CMake hello world example. I just tried it with the first result of “hello world cmake” on Google:

and it just worked fine, CMake + toolchain take care of setting up all of those things for you.

I’m the worst person to ask since I only use tools that can run on my terminal :frowning:
But others here are using CLion, which integrates nicely with the toolchain thanks again to CMake (and you can use gdbserver + CLion debugger in combo).

Eclipse seems to be usable with an additional plugin but we never tried it:

Generally speaking, most of the development workflow actually happens on a “normal PC”. So, another possibility is to just use your IDE as editor+debugger and rely on command-line builds (or CI server etc.) when you need to deploy to the target Raspberry Pi board.

@Stefano,

Thanks very much.

cmake fixed everything with (1). I was able to build the executable in my Linux VM, transfer to the RPi, and run.

The Yocto plugin seems to be built for a very old Eclipse (2017?). I might try to install it anyway, if I can figure it out :wink: I can look into CLion too, if that is the tested and recommended solution. Otherwise, its back to Emacs and makefiles I guess.

Again, thanks!

  • Rick
1 Like