undefined reference to `gpio_intr_deattach'

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

undefined reference to `gpio_intr_deattach'

Postby AgentSmithers » Sat Apr 22, 2017 7:26 am

Hi Everyone, I am using the NONOS-SDK, I wanted to include GPIO interrupt's and I had to explicitly add the header files by using the full path or it would not locate the .H files


#include "/esp-open-sdk/ESP8266_NONOS_SDK_V2.0.0_16_08_10/driver_lib/include/driver/uart.h"
#include "/esp-open-sdk/ESP8266_NONOS_SDK_V2.0.0_16_08_10/driver_lib/include/driver/gpio16.h"

Once added It started to returned this

Code: Select all

xtensa-lx106-elf-gcc -Teagle.app.v6.ld  blinky.o  -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -o blinky
blinky.o:(.irom0.literal+0x47c): undefined reference to `gpio_intr_deattach'
blinky.o:(.irom0.literal+0x498): undefined reference to `set_gpio_mode'
blinky.o:(.irom0.literal+0x49c): undefined reference to `gpio_intr_init'
blinky.o:(.irom0.literal+0x4a0): undefined reference to `gpio_intr_attach'
blinky.o: In function `network_check_ip_send_therm':
blinky.c:(.irom0.text+0x2bf3): undefined reference to `gpio_intr_deattach'
blinky.o: In function `LoadStationAndSendData':
blinky.c:(.irom0.text+0x2c36): undefined reference to `set_gpio_mode'
blinky.c:(.irom0.text+0x2c5a): undefined reference to `gpio_intr_init'
blinky.o: In function `SetAllGPIOPinsAsOutput':
blinky.c:(.irom0.text+0x2c87): undefined reference to `gpio_intr_attach'
collect2: error: ld returned 1 exit status
make: *** [blinky] Error 1


Anyone know why its not finding the GPIO references? Do I need to add another Library to the Xtena linking?

Thank you everyone!!

ESP_Kewal
Posts: 2
Joined: Mon Jul 25, 2016 2:23 pm

Re: undefined reference to `gpio_intr_deattach'

Postby ESP_Kewal » Sat Apr 22, 2017 6:31 pm

Hi,
You do not have to include the whole path. just add #include "driver/gpio16.h", similarly the other header files
Regards,
Kewal Shah

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: undefined reference to `gpio_intr_deattach'

Postby AgentSmithers » Mon Apr 24, 2017 11:46 pm

ESP_Kewal wrote:Hi,
You do not have to include the whole path. just add #include "driver/gpio16.h", similarly the other header files

Thank you for your Input ESP_Kewal, I have also tried that and it appears it is unable to locate that file path in my build when trying to compile. Is this an issue with possibly my MakeFile or my build?
Also when I copy the GPIO16.h to my local directory where my .C is located I am able to include it this way #include "gpio16.h" and it works, However using the driver/gpio16.h and driver/uart.h does not.

*I will post my Makefile here shortly.*

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: undefined reference to `gpio_intr_deattach'

Postby AgentSmithers » Mon May 01, 2017 2:12 pm

Here a copy of my MakeFile

Code: Select all

CC = xtensa-lx106-elf-gcc
CFLAGS = -I. -DICACHE_FLASH -mlongcalls
LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc
LDFLAGS = -Teagle.app.v6.ld
INCLUDES = -Iinclude -I../driver_lib/include

blinky-0x00000.bin: blinky
   esptool.py elf2image --version 1 $^

blinky: blinky.o

blinky.o: blinky.c

dhonewire: dhonewire.o

dhonewire.o: dhonewire.c

fresh: blinky-0x00000.bin
   #kill $(ps aux | grep '[S]CREEN' | awk '{print $2}')
   esptool.py write_flash 0 blinky-0x00000.bin 0x10000 blinky-0x10000.bin 0x7e000 blank.bin 0x3fc000 esp_init_data_default.bin 0x3fe000 blank.bin 0x60000 index.html 0x80000 config.html
   #screen /dev/ttyUSB0 74880
   screen /dev/ttyUSB0 115200

flash: blinky-0x00000.bin
   esptool.py write_flash 0 blinky-0x00000.bin 0x10000 blinky-0x10000.bin 0x60000 index.html 0x80000 config.html
   screen /dev/ttyUSB0 115200

quick: blinky-0x00000.bin
   esptool.py write_flash 0 blinky-0x00000.bin 0x10000 blinky-0x10000.bin
   screen /dev/ttyUSB0 115200

build: blinky-0x00000.bin
   screen /dev/ttyUSB0 115200

ota: blinky
   esptool.py elf2image --version 2 $^
   esptool.py write_flash 0x10000 blinky-0x10000.bin
   screen /dev/ttyUSB0 115200

clean:
   rm -f blinky blinky.o blinky-0x00000.bin blinky-0x10000.bin
   


Any Tip's? I am using the Blinky.c to start and I just grew on that. Is there another makefile I should be using?

Who is online

Users browsing this forum: No registered users and 319 guests