Max_ Also, when running gdb locally on Bela I get an Error: unable to initialise audio)
Running gdb
locally on the board should work just fine. What else does the error message say? It may be that you have another Bela program (or the same program in a different process) already running and only one process can run at a time. In order to make debugging more effective, I tend to also modify the Makefile
replacing -O3
with -O0
. Note that make
won't rebuild any files purely as a consequence of this change, so you need to manually touch/rebuild the files you want to step through while debugging. Conversely, when you go back to -O3
you will want to make sure you rebuild all files that had been built with -O0
. I normally take advantage of this process to only rebuild files I want to debug, without affecting the performance of the rest of the project and/or core files.
Max_ - ssh Remote developing and remote debugging (build, run & debug on Bela with remote access)
you can also start gdbserver
on Bela and connect it from your favourite IDE. I have done this from Eclipse ages ago but most IDEs should allow this as a possibility. You will need to install gdbserver
on Bela for this to work, which may require internet access on the board at least while installing.
Max_ - Cross compiling it (develop, build, run & debug on my Ubuntu machine)
As you have a Ubuntu machine, cross-compiling shouldn't be too hard, as cross compilers are readily available. You may want to consider using xcBela, which is the only one I have tried. Docker is also an option but perhaps it's better suited for macos/Windows where sometimes it's hard to get a cross compiler. I never used the Docker option and only briefly the xcbela one, so I may not be best placed to comment on the specifics of each.
Max_ - Use on-the-fly code analysis
What is this? A syntax-checker? If you have cross compilation enabled in VSCode, this should come for free?
Max_ - Use static code analysis
Never used this in any context, so I cannot be of much help.