mbed compile error Ubuntu 14.04

11 Oct 2014

I am trying to setup a development platform for FRDM K64F in Ubuntu 14.04, but compilation fails every time.

compile command: python workspace_tools/build.py -m K64F -t GCC_ARM

I am getting the below error: In file included from /home/tushar/mbed_dev/mbed/build/mbed/BusIn.h:19:0, from /home/tushar/mbed_dev/mbed/libraries/mbed/common/BusIn.cpp:16: /home/tushar/mbed_dev/mbed/build/mbed/platform.h:25:19: fatal error: cstddef: No such file or directory

  1. include <cstddef> ^ compilation terminated.

Completed in: (24.61)s

Build failures:

  • GCC_ARM::K64F

plz help.

25 Nov 2014

Hello Tushar,

That's an odd error to get from a recent version of GCC. What version of GCC are you running? You could try running arm-none-eabi-gcc --version from your Terminal window to verify the version information for you GNU toolchain. I take it that you also setup your private_settings.py to set the GCC_ARM_PATH to your GNU toolchain install path?

-Adam

25 Nov 2014

Hi tushar panda,

can you share your enviroment? As Adam suggested above, share the version of GCC with us, the python if possible.

Regards,
0xc0170

22 Dec 2014

same problem with 14.04 LTS here's my output

arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

22 Dec 2014

any help please

22 Dec 2014

kevin amadiva wrote:

arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Did you install the GNU Tools for ARM Embedded toolchain? The version information you show above doesn't match what I see from that toolchain on my Ubuntu VM:

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20140228 (release) [ARM/embedded-4_8-branch revision 208322]


I would try installing that toolchain and update private_settings.py to point to your install location.

23 Dec 2014

thanks... everything is okay now, had to take the tools for trusty.

07 Mar 2015

Hi,

I'm having a similar problem with Mac OS X 10.9. I verified that the arm-none-eabi-gcc tool chain is the same as what was mentioned in the posts. Could someone help me here?

23 Apr 2015

Forgot to mention that I'm building for the KL25Z.

EDIT: I was able to solve this problem by compiling the files that had an mbed include as a C++ file and not a C file.

16 May 2015

Hi. I have the same problem here. Ubuntu 14.04 and ST Nucleo F411. I am getting a "No such file" error for lines:

  1. include <cstddef>
  2. include <cstdlib>
  3. include <cstdio>
  4. include <cstring>

in platform.h.

My toolchain version is:

arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2

28 May 2015

Install the arm-none-eabi toolchain from here instead of the default PPA

14 Dec 2015

I am having the same error, and can't fix it by using the Terry Guo PPA because there is no armhf build there (I am trying to get it to work on a Raspberry Pi 2). Does anyone know what actually causes this error? Thanks!

14 Dec 2015

By the way, I am running arm-none-eabi-gcc (15:4.9.3+svn227297-1), and there is no private_settings.py anywhere on my system. I've never done any python programming, so know next to nothing about how it is supposed to be setup.

15 Dec 2015

@josh, private_settings.py in the workspace_tools folder, where you can add this line

// I am pasting a setup from windows machine, change the path to your arm gcc location
GCC_ARM_PATH = "C:/gcc_arm4.9 2015q3/bin"
15 Dec 2015

Martin,

Thanks so much. I searched my whole system and there is no private_settings.py or even workspace_tools folder anywhere on the system. Yotta seemed to install fine and looks like it is running properly. I am on ubuntu mate 15.10. Does anyone know where these are supposed to be?

15 Dec 2015

@josh, for mbed 2 SDK , you need to create that file and put that there line. I am talking about mbed SDK repository https://github.com/mbedmicro/mbed

I found your question also on mbed OS, but not talking here at all about yotta, jsut about mbed 2 ;)

16 Dec 2015

I'm sorry, I didn't realize there was an mbed 2 SDK. I was trying to setup yotta and mbed 3. That makes sense.