ESP8266 Developer Zone The Official ESP8266 Forum 2017-05-01T14:12:49+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=4033 2017-05-01T14:12:49+08:00 2017-05-01T14:12:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=4033&p=12707#p12707 <![CDATA[Re: undefined reference to `gpio_intr_deattach']]>

Code:

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?

Statistics: Posted by AgentSmithers — Mon May 01, 2017 2:12 pm


]]>
2017-04-24T23:46:00+08:00 2017-04-24T23:46:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=4033&p=12554#p12554 <![CDATA[Re: undefined reference to `gpio_intr_deattach']]>
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.*

Statistics: Posted by AgentSmithers — Mon Apr 24, 2017 11:46 pm


]]>
2017-04-22T18:31:32+08:00 2017-04-22T18:31:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=4033&p=12497#p12497 <![CDATA[Re: undefined reference to `gpio_intr_deattach']]> You do not have to include the whole path. just add #include "driver/gpio16.h", similarly the other header files

Statistics: Posted by ESP_Kewal — Sat Apr 22, 2017 6:31 pm


]]>
2017-04-22T07:26:06+08:00 2017-04-22T07:26:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=4033&p=12482#p12482 <![CDATA[undefined reference to `gpio_intr_deattach']]>

#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:

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!!

Statistics: Posted by AgentSmithers — Sat Apr 22, 2017 7:26 am


]]>