# MangOH red GPIO access with legatoDeveloper studio wp77xx

**URL:** <https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [January 9, 2019, 7:57am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007 "2019-01-09T07:57:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalgore](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishalgore](https://forum.legato.io/u/vishalgore)\
**Post date:** [January 9, 2019, 7:57am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/1 "2019-01-09T07:57:33Z")

</div>

Hi, I am beginner to legato developer studio , i want to access GPIO on WP7702 device.  
I am trying to create a legato application with gpio i stuck with following error  
\*\* ERROR:  
/home/user/legato/workspace/gpio/gpioComponent/Component.cdef:5:2: error: Couldn’t find file ‘le\_sensorGpio=le\_gpio.api.’  
make: \*\*\* [target] Error 1  
Makefile:37: recipe for target ‘target’ failed  
make: Leaving directory ‘/home/user/legato/workspace/gpio/Target\_Legato\_Debug’

anyone know why these is happening?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 9, 2019, 8:53am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/2 "2019-01-09T08:53:50Z")

</div>

you can refer to my sample application attached and see if it can be compiled.  
[GPIO\_CF3\_Demo.rar](https://forum.legato.io/uploads/short-url/vYy2uCYuKCB0A52s0ykVIYdQYry.rar) (230.3 KB)

---

<div class="post-metadata">

**Author:** ![vishalgore](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishalgore](https://forum.legato.io/u/vishalgore)\
**Post date:** [January 9, 2019, 9:37am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/3 "2019-01-09T09:37:32Z")

</div>

Hi,  
Thanks for quick response not able to build the GPIO\_CF3\_Demo application.  
getting error  
/GPIO\_CF3\_Demo/gpioCf3PinComponent\_GPIO\_CF3\_Demo/gpioCf3Pin.c:65:42: error: unused variable ‘ref’ [-Werror=unused-variable]  
le\_gpioPin22\_ChangeEventHandlerRef\_t ref = le\_gpioPin22\_AddChangeEventHandler(LE\_GPIOPIN22\_EDGE\_FALLING, Pin22ChangeCallback, &Pin22, 0);  
^~~  
At top level:  
/home/user/Downloads/GPIO\_CF3\_Demo/gpioCf3PinComponent\_GPIO\_CF3\_Demo/gpioCf3Pin.c:126:13: error: ‘SecondCallbackTest’ defined but not used [-Werror=unused-function]  
static void SecondCallbackTest()  
^ ~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors  
ninja: build stopped: subcommand failed.  
Makefile:37: recipe for target ‘target’ failed

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 9, 2019, 10:14am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/4 "2019-01-09T10:14:32Z")

</div>

put “-Wno-error=unused-variable” and “-Wno-error=unused-function” in Project Properties \> C/C++ Build \> Settings-\> mkapp Tool → C build option → Additional compiler option

---

<div class="post-metadata">

**Author:** ![vishalgore](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishalgore](https://forum.legato.io/u/vishalgore)\
**Post date:** [January 9, 2019, 1:53pm UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/5 "2019-01-09T13:53:28Z")

</div>

Hi,  
Thanks its working 👍  
But the only thing is every time i start developer studio i need to make respective change or add that line, Why its so??

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 10, 2019, 1:20am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/6 "2019-01-10T01:20:16Z")

</div>

The default compiler will regard warning as error. That is why you cannot compile the program.  
In case in the future, your application has similar warning problem, you need to add those flag in the properties for your application.

---

<div class="post-metadata">

**Author:** ![vishalgore](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishalgore](https://forum.legato.io/u/vishalgore)\
**Post date:** [January 10, 2019, 6:48am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/7 "2019-01-10T06:48:26Z")

</div>

Hi,  
trying to blink led with GPIO (HIGH/LOW) .cdef file  
\*\* ERROR:  
/home/user/legato/workspace/test\_gpio/test\_gpioComponent/Component.cdef:5:2: error: Couldn’t find file ‘le\_gpioPin35=le\_gpio.api.’

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 10, 2019, 9:45am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/8 "2019-01-10T09:45:28Z")

</div>

why are you still using your own application?  
Why don’t you modify my application as it can be compiled?

---

<div class="post-metadata">

**Author:** ![vishalgore](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishalgore](https://forum.legato.io/u/vishalgore)\
**Post date:** [January 10, 2019, 11:10am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/9 "2019-01-10T11:10:31Z")

</div>

Trying to implement own application which include GPIO functionality (on/off) in case error, so need to understand what it is? and why it is?? in terms of error

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 10, 2019, 11:36am UTC](https://forum.legato.io/t/mangoh-red-gpio-access-with-legatodeveloper-studio-wp77xx/4007/10 "2019-01-10T11:36:59Z")

</div>

You can port your code to my application, then you will know which line in the code is making the problem as my application can already be compiled.

Or you can put your project here and let us reproduce the issue.
