esp8266rawpackets icon indicating copy to clipboard operation
esp8266rawpackets copied to clipboard

undefined reference to `wifi_set_raw_recv_cb'- In function myTimer

Open sarwadenj opened this issue 8 years ago • 10 comments

esp8266@esp8266-VirtualBox:~/vishal/esp82XX-basic$ make burn

/home/esp8266/vishal/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -mlongcalls -Os -I/home/esp8266/vishal/esp-open-sdk/sdk/include -Iesp82xx/include -I. -Iesp82xx/fwsrc -Iuser -DICACHE_FLASH -DWEB_PORT=80 -DCOM_PORT=7777 -DBACKEND_PORT=7878 -DSLOWTICK_MS=50 -DVERSSTR='"Version: v0.1-7-g06742-dev - Build 2017年 01月 03日 星期二 02:49:57 CST with -DICACHE_FLASH -DWEB_PORT=80 -DCOM_PORT=7777 -DBACKEND_PORT=7878 -DSLOWTICK_MS=50"' esp82xx/fwsrc/uart.c esp82xx/fwsrc/esp82xxutil.c esp82xx/fwsrc/flash_rewriter.c esp82xx/fwsrc/http.c esp82xx/fwsrc/commonservices.c esp82xx/fwsrc/http_custom.c esp82xx/fwsrc/mdns.c esp82xx/fwsrc/mfs.c user/custom_commands.c user/user_main.c -flto -Wl,--relax -Wl,--gc-sections -nostdlib -L/home/esp8266/vishal/esp-open-sdk/sdk/lib -L/home/esp8266/vishal/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/libgcc.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libmain.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/liblwip.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libssl.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libupgrade.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libnet80211.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libwpa.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libphy.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/liblwip.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libcrypto.a /home/esp8266/vishal/esp-open-sdk/sdk/lib/libpp.a /home/esp8266/vishal/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/libgcc.a -T /home/esp8266/vishal/esp-open-sdk/sdk/ld/eagle.app.v6.ld -B/home/esp8266/vishal/esp-open-sdk/sdk/lib -o image.elf /tmp/cctpsX1W.ltrans1.ltrans.o:(.irom0.literal+0x34): undefined reference to wifi_set_raw_recv_cb' /tmp/cctpsX1W.ltrans1.ltrans.o: In function myTimer$2546': :(.irom0.text+0x45): undefined reference to `wifi_set_raw_recv_cb' collect2: error: ld returned 1 exit status make: *** [image.elf] Error 1


wifi_set_raw_recv_cb( rx_func ); //function call

void attribute ((noinline)) rx_func( struct RxPacket * r, void ** v ) //defination

sarwadenj avatar Jan 02 '17 18:01 sarwadenj

We may release more information about this eventually. It right now only works with 1.5.4. I am hoping Espressif builds this functionality into their SDK.

cnlohr avatar Jan 03 '17 05:01 cnlohr

@cnlohr Thanks, but if i used 1.5.4 then following type of error will come, as i used 1.5.4 previously

/home/karol/git/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: image.elf section.irom0.text' will not fit in region irom0_0_seg' /home/karol/git/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: regionirom0_0_seg' overflowed by 6576 bytes`

what should i do...

sarwadenj avatar Jan 03 '17 07:01 sarwadenj

That is far far larger than I would expect.

Good news, though! After this weekend, I will probably be able to release something that will make this compatible with 2.0. We'll have to see though. If so, will happen this weekend or early next week.

cnlohr avatar Jan 04 '17 08:01 cnlohr

@sarwadenj Try it now, see #7 - you will probably need the SDK provided in that thread.

cnlohr avatar Jan 04 '17 18:01 cnlohr

@cnlohr while using "REDUCED_ESP8266_NONOS_SDK_2.0.0_20160810_with_angus_patch.zip" and i'm getting-->

esp8266@esp8266-VirtualBox:~/ESP8266_NONOS_SDK$ make make[1]: Entering directory /home/esp8266/ESP8266_NONOS_SDK/driver_lib' make: Entering an unknown directory make: *** user: No such file or directory. Stop. make: Leaving an unknown directory make[1]: *** [.subdirs] Error 2 make[1]: Leaving directory /home/esp8266/ESP8266_NONOS_SDK/driver_lib' make: *** [.subdirs] Error 2

Also i'm looking at your whole code. You called void PreEmpt_NMI_Vector(); function in user_main.c and it is defined IN #define NMI_OVERRIDE but you commented NMI_OVERRIDE define part..

sarwadenj avatar Jan 09 '17 19:01 sarwadenj

No NMI_OVERRIDE is needed that I remember since in this SDK the user interrupt is what handles wifi (I think). You don't build the esp nonSDK. Unzip it to ~/esp8266/ESP8266_NONOS_SDK.

cnlohr avatar Jan 09 '17 19:01 cnlohr

@cnlohr Sorry i didn't get your point..i taken ESP8266 NONOS SDK V2.0.0 20160810 from https://espressif.com/en/support/download/sdks-demos. If I unzip it to ~/esp8266/ESP8266_NONOS_SDK files will overwrite. can you please elaborate it.

Thanks.

sarwadenj avatar Jan 10 '17 11:01 sarwadenj

The way the folders are currently set up, it's assuming the https://github.com/cnlohr/esp8266rawpackets/issues/7 "with angus patch" is what is in ~/esp8266/ESP8266_NONOS_SDK - this will require overwriting of all those files. Though the new SDK is compatible with everything as far as I know.

cnlohr avatar Jan 10 '17 18:01 cnlohr

Hi @cnlohr , Leaving directory same issue coming. So currently i installed new lubuntu on my system. Currently no SDK is build on system. So please let me know which sdk should i use and How to setup SDK to run your raw packet experiment. I'm looking at your whole code so when the sdk setup completed i'll see result's. Thanks.

sarwadenj avatar Jan 12 '17 12:01 sarwadenj

esp open sdk. All the way. https://github.com/pfalcon/esp-open-sdk

The included .zip is just the ESP NONOS SDK.

cnlohr avatar Jan 12 '17 21:01 cnlohr