5 years, 4 months ago.

Can't see "Sourcery G++ Lite" not found

Hi,

As far as I can tell gcc4mbed installed OK (as in above questions I've interactively done make clean-all all successfully). Note - being Windows it didn't work first time when installed in a path that included spaces :-(

I manually added C:\Dev\gcc4mbed\gcc-arm-none-eabi\bin\ & C:\Dev\gcc4mbed\gcc-arm-none-eabi\bin\..\..\external\win32 to the PATH

Eclipse is installed (this is Luna) including CDT & many parts of GNU ARM (CodeRed etc...).

But on creating a project from makefile only the following tool-chains are listed: <none> Cross ARM GCC Cygwin GCC Linux GCC MasOSX GCC MinGW GCC Solaris GCC

I tried selecting Cross ARM GCC (at least it was ARM) but trying to do Clean project I get:

13:28:22 Clean-only build of configuration Debug for project FileTest clean Cannot run program "": Launching failed

Error: Program "" not found in PATH PATH=[C:/Program Files/Java/jdk1.7.0_55/bin/../jre/bin/server;...C:\Dev\gcc4mbed\samples\FileTest/../../gcc-arm-none-eabi/bin]

13:28:22 Build Finished (took 64ms)

so that doesn't look promising.

Any suggestions gratefully accepted.

Question relating to:

Hi Richard,

Can you please elaborate on your solution please? I'm facing a similar issue. I'm trying to setup Eclipse to be able to import mbed project and debug. I have followed the same process and installed sourcery code lite. I have manually added all the PATH variable to my environment. But, it does show up on Eclipse toolchain selection list. Thanks

Kind Regards, Richard

posted by Richard Lobo 20 Jan 2016

Hi Richard,

I haven't been aiming for debugging myself: just better code completion when editing, quicker build cycles and a way to do TDD outside the mbed h/w environment. FWIW it's worth I'm not doing mbed work at the moment so no doubt stuff has moved on since my notes below.

If you haven't already, read https://developer.mbed.org/cookbook/eclipse-for-building-and-debugging & https://developer.mbed.org/forum/mbed/topic/2701/ It's actively worked on and Adam Green's work is essential to what I've done. As is usual for me I find working through things two or three times helps as it's easy to miss something crucial and not realise.

Get the latest Adam Green installation and then try & build one of his examples (I used FileTest). At that stage I could build from the command line but not from Eclipse.

As I said in my October post I found that editing "Properties | C/C++ Build | Builder Settings | Build command:" to explicitly name the make program allowed me to build with GCC from within Eclipse however Eclipse didn't know about header files internally so Eclipse reported lots of errors.

Reading the Adam Green master makefile gcc4mbed.mk led me to add VERBOSE := 1 to the project makefile which increases the trace during make so you can see the include paths and you can "Add..." the ones you need (see "Properties | C/C++ General | Paths and Symbols | Includes") being careful to check both "Add to all configurations" & "Add to all languages". I've found that adding:

  • C:\Dev\adamgreen-gcc4mbed-3b4f8cb\gcc-arm-none-eabi\arm-none-eabi\include
  • C:\Dev\adamgreen-gcc4mbed-3b4f8cb\gcc-arm-none-eabi\lib\gcc\arm-none-eabi\4.9.3\include
  • C:\Dev\adamgreen-gcc4mbed-3b4f8cb\external\mbed\libraries\mbed\api
  • C:\Dev\adamgreen-gcc4mbed-3b4f8cb\external\mbed\libraries\mbed\targets\hal\TARGET_NXP\TARGET_LPC176X\TARGET_MBED_LPC1768

where "C:\Dev\adamgreen-gcc4mbed-3b4f8cb\" happens to be the location of the installed AdamGreen files gives a much cleaner Eclipse view - you may have to add different ones based on your code & target platform

Hope this helps, Richard

posted by Richard Care 22 Jan 2016

1 Answer

5 years, 4 months ago.

Given that you have NXP-based mbed platforms, why not use LPCXpresso instead? I have run it under Windows and OS X and it "works out of the box".

Spend your time on your project, not on fighting the toolchain!

Accepted Answer

Thanks for the suggestion (I only just spotted your comment). I'll download it and see how I get on.

posted by Richard Care 17 May 2015

Finally after working on other stuff, I've had a chance to come back to this. Unfortunately LPCXpresso didn't work 'out of the box' for me and I've had more success with the documented approach.

Environments change and the crucial thing for me was realising that make wasn't being found. Changing the value of "Properties | C/C++ Build | Builder Settings | Build command:" to make fixed this and gave me an mbed binary

posted by Richard Care 03 Oct 2015