Having trouble with Makefiles


#1

Hi, I am very new to mangOH and legato based development, I have started off just a week ago.

Existing system:

  1. I have installed legato17-08.1 on my host (linux - ubuntu16.04 LTS) computer, used a zip, did not clone.
  2. I have installed latest toolchain (Release 14) from here
  3. I have installed legato application developer studio version 5.2.
  4. I have a mangOH Green board with me, it has a WP8548 chip on it and I have tested it with helloWorld program that I built and deployed on the device using legato application developer studio version 5.2.
  5. I am aware of the process of running ‘bin/legs’ everytime I open a terminal for supporting commands related to legato.
  6. I have set the environment variable LEGATO_ROOT to the directory where I have installed legato-17.08.1

Problem statement:
I have tried many examples (Latest being: https://github.com/startwithsierra/utils-legato-mqtt). But I can not build them.

The error that I see in bash is:

Makefile:7: recipe for target 'wp85' failed
make: *** [wp85] Error 1

Can anyone help me understand what the issue is?


Config toolchain wp85
#2

Can you follow the Getting Started instructions for mangOH Red:
http://mangoh.io/mangoh-red-resources-getting-started
the only difference is, you need to run:
make green_wp85 instead of make red_wp85

Let us know if you see the same problem.


#3

Hi, thanks for responding. The solution that you suggested does make sense, but I have already built the legato using ‘make clean’ and ‘make wp85’ commands when I installed legato.
After I posted this question, I tried putting the example apps (received as .zip from git and then unzipped) in $LEGATO_ROOT/bin/apps/sample/ and then make command (make wp85) worked as it should.

Is that a constraint (Possibly due to some error I made while installation of legato) I am dealing with that I have to put the projects into the LEGATO_ROOT/apps/sample/ or it has always been the way to do it?

Thank you.


#4

It’s a bit confusing, but you have to run make wp85 from the legato folder first. Then you do source bin/configlegatoenv to put the legato build tools into your $PATH. Once you have done that, you either run make red_wp85 or make green_wp85 from the mangOH folder. This builds a legato system that includes the mangOH apps and drivers.


#5

Thank you @asyal and @dfrey.