JUCE for ARM Linux

Hi, All.
I am a new engineer for LINUX, i develop JUCE applications on windows.
this time, i want to porting my windows application to arm linux.
There were problems at the beginning:
step 1: install projucer and generated one GUI application for codeblock IDE, then build it, it was ok, and i can see the classical “Hello world” dialog;
step 2: install yocto SDK;
step 3: add the gcc toolchain and change the paths to yocto tools directory on codeblock;
step 4: select arm gcc for current application, then re-build,
but it is fail, can not find the nomally head files, memory.h, cmath.h …, anybody can tell me, what is happend, miss any install? here is my build log:

include -c ../../JuceLibraryCode/include_juce_audio_basics.cpp -o obj/Debug/app/NP7CMD/JuceLibraryCode/include_juce_audio_basics.o
In file included from /home/db/work/JUCE/modules/juce_core/juce_core.h:178:0,
                 from /home/db/work/JUCE/modules/juce_audio_basics/juce_audio_basics.h:52,
                 from /home/db/work/JUCE/modules/juce_audio_basics/juce_audio_basics.cpp:32,
                 from ../../JuceLibraryCode/include_juce_audio_basics.cpp:9:
/home/db/work/JUCE/modules/juce_core/system/juce_StandardHeader.h:46:18: fatal error: memory: No such file or directory
 #include <memory>
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I have found the reason.
add toolchain head files path to the project, and modify
#include <memory>
#include <memory.h>
it is ok now. But i dont know, why the
#include <memory>
can’t be recognized in arm g++ toolchain? Did i miss something?

1 Like

OK, I have found the reason.

GroverZhang, I am in my first stages of doing CLion IDE for Ubuntu 18.04.

From there I’d like to use CLion for Embedded Development for ARM M0 and M4+

Do you have a github gist or notes on making the issue you had to go through above easier from others?

I’d greatly appreciate the help and update you on the progress.

Robert Thompson

I add myself to the petition. Are you crosscompiling from Windows/Linux with ARM toolchain to your ARM board?

Tried it some months ago but gave up, always having problems with some missing packages that couldn’t install or just not being able to compile it. The only thing I could achieve was compiling a little “hello world” JUCE GUI app in the RPi3 itself, but couldn’t crosscompile or compile more complex JUCE apps.

I’m about to do the same now tho, so any insight or detailed walkthrough/tutorial would be great, since the vast majority of people here develop for macOS/windows/iOS/Android not for Linux, and even less people do it for ARM Linux (with the added headaches it gives)

1 Like

I was just trying it in Ubuntu 18.04 Linux.
However, I’m trying get into ARM development, and if that means doing it with another method I will for embedded devices.
I love JUCE but am wondering about a few things.
Let’s stick with this, I will email yous something in reply to this or via direct if you you want to provide email.
I see no reason not to collect sensory data and create sonification with JUCE.

John, which ARM board are you using and which IDE?
The only boards I"m finding use C not C++ based development. Here’s a list, let me know which you’re using and if it’s on here,

STM32F407xx based Discovery board

STM32 Nucleo-64 development board

FRDM-K64F: Freedom Development Platform


If not one of these which are you using?

Hi Robert. For JUCE I think as long as you can run a full blown desktop OS (i.e Ubuntu Mate, Armbian, Debian…) in your board you should be fine since (IIRC) JUCE needs OS system calls. I don’t know if Cortex-Ms can, but for sure Cortex-As do.

For now I’m playing with a Raspberry Pi 3B+ (it’s 64 bit but the 3B version that is 32 bit should work aswell) and then I’ll move to my definitive board once I manage to compile/crosscompile my projects. Using RPi3 for now because of 2 reasons:

  1. It’s the most supported board by community and you can find almost any problem already solved by others in forums. You don’t wanna enter to this as a newcommer and find yourself alone or in a dead forum when you have problems with your board/distro.
  2. This

Right now I have 3 options in my mind:

  1. Compile in Code::Blocks using the aarch64 cross compilers (already trying it but I don’t see any executable after building).
  2. Compile with Make and gcc, using the aarch64 g++ (with all the verbose) in the CXX parameter. (gives me some errors, but I think I’m close).
  3. Use Cmake to setup the config file with the crosscompiler. Honestly I still have to look at it

If I manage to get it working I will do a detailed guide so it helps others and people can improve it since I’m probably doing many redundant steps trying to figure out how to make it work.

Maybe @fabian can help us, afaik he could crosscompile with gcc:

I always got strange random errors on the raspberry pi with gcc. I’m really not sure why. I could only ever get clang++ to work (or cross-compile from my Linux desktop to raspberry pi with gcc).

Sounds good. Up to now I’ve just been using VirtualBox with Ubuntu. 18.04 My plan however is to use,

  • Raspberry PI Zero W
  • balenaOS which allows pushing C++ projects via balenal

Well just a little update, after spending hours trying stuff I’m ditching the Code::Blocks cross compile option. It won’t recognize the ARM toolchain, and as other users in Codeblocks forum stated the GNU GCC for ARM setup doesn’t work and couldn’t set it up.

I’m hoping that Projucer with CLion (beta) setup is fully supported soon for Embedded Linux. Since Embedded Linux is officially supported by ROLI. See Felipe Tonello talk from ADC 2016. He is at Apple now so I’m not sure who’s rep. Embedded Linux efforts for ROLI. I see no reason why there should not be CLion support with proper setup to build Production and SDK.