New 2.0 NONOS SDK not working

berkutta
Posts: 15
Joined: Tue Mar 15, 2016 6:30 pm

New 2.0 NONOS SDK not working

Postby berkutta » Thu Jul 21, 2016 10:04 pm

Hi,

Can't compile. Added the "user_rf_cal_sector_set" as it is in IoTDemo but can't compile the solution. With the 1.5.2 SDK everything worked. What can I do?

Code: Select all

make[2]: Entering directory `/home/espbuilder/esp8266-minimal/app/user'
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/dht.o -c dht.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/ds18b20.o -c ds18b20.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/float.o -c float.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/pwm.o -c pwm.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/softap.o -c softap.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/station.o -c station.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/urlcode.o -c urlcode.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/user_main.o -c user_main.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/webclient.o -c webclient.c
xtensa-lx106-elf-gcc -O0 -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/webserver.o -c webserver.c
xtensa-lx106-elf-ar ru .output/eagle/debug/lib/libuser.a .output/eagle/debug/obj/dht.o .output/eagle/debug/obj/ds18b20.o .output/eagle/debug/obj/float.o .output/eagle/debug/obj/pwm.o .output/eagle/debug/obj/softap.o .output/eagle/debug/obj/station.o .output/eagle/debug/obj/urlcode.o .output/eagle/debug/obj/user_main.o .output/eagle/debug/obj/webclient.o .output/eagle/debug/obj/webserver.o
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/libuser.a
make[2]: Leaving directory `/home/espbuilder/esp8266-minimal/app/user'
xtensa-lx106-elf-gcc  -L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -ljson -lupgrade -lssl -lsmartconfig user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
../lib/libmain.a(spi_flash.o): In function `flash_gd25q32c_write_status':
(.text+0x6d0): undefined reference to `Enable_QMode'
../lib/libmain.a(spi_flash.o): In function `flash_gd25q32c_write_status':
(.text+0x6e1): undefined reference to `Enable_QMode'
collect2: error: ld returned 1 exit status
make[1]: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1
make[1]: Leaving directory `/home/espbuilder/esp8266-minimal/app'
make: *** [.subdirs] Error 2

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: New 2.0 NONOS SDK not working

Postby pratik » Mon Jul 25, 2016 6:26 pm

Hello,

Where did your spi_flash.c file come from? Is it a custom one or from the SDK 2.0? Or an older one?
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

stupiid
Posts: 6
Joined: Tue Feb 02, 2016 5:29 pm

Re: New 2.0 NONOS SDK not working

Postby stupiid » Wed Jul 27, 2016 5:07 pm

pratik wrote:Hello,

Where did your spi_flash.c file come from? Is it a custom one or from the SDK 2.0? Or an older one?


Hello,

We encountered the same issue after updated to NONOS SDK 2.0.

And we DON'T have any "spi_flash.c" or "spi_flash.o" in the project.

你好.

我们测试NONOS SDK 2.0时遇到了同样问题;

我们确认工程里没有任何名叫"spi_flash.c"或"spi_flash.o"的东西;

另外,请问贵司是否能够减小自带库占用的iram1_0空间? 我们的代码99.9%都加上了ICACHE_FLASH_ATTR标志, 但更新到2.0后报告"section `.text' will not fit in region `iram1_0_seg' "

fpalha
Posts: 4
Joined: Tue Jul 12, 2016 10:48 pm

Re: New 2.0 NONOS SDK not working

Postby fpalha » Wed Jul 27, 2016 10:16 pm

Hi.

I have the same problem.

Code: Select all

/opt/esp-open-sdk/sdk/lib/libmain.a(spi_flash.o): In function `flash_gd25q32c_write_status':
(.text+0x6d0): undefined reference to `Enable_QMode'
/opt/esp-open-sdk/sdk/lib/libmain.a(spi_flash.o): In function `flash_gd25q32c_write_status':
(.text+0x6e1): undefined reference to `Enable_QMode'
collect2: error: ld returned 1 exit status
make: *** [build/rom0.elf] Error 1
Makefile:156: recipe for target 'build/rom0.elf' failed


The 'spi_flash.h' is from ESP8266_NONOS_SDK_V2.0.0_16_07_19.

ShaoPU
Posts: 10
Joined: Mon Aug 24, 2015 3:01 pm

Re: New 2.0 NONOS SDK not working

Postby ShaoPU » Mon Aug 08, 2016 3:23 pm

我这边也是,用SDK1.5.4.1版本编译是没问题的,用V2.0.0编译时就出现"section `.text' will not fit in region `iram1_0_seg' "基本上99%都用上ICACHE_FLASH_ATTR的。

binary
Posts: 13
Joined: Tue Jun 14, 2016 2:58 pm

Re: New 2.0 NONOS SDK not working

Postby binary » Wed Aug 10, 2016 11:06 am

Hi,All
I have been met this too.
If i make all function(even interrupt function) with ICACHE_FLASH_ATTR,it can be compiled and get the .bin document.
As we know the interrupt function can't be with ICACHE_FLASH_ATTR.
when flashed the .bin and works,it crashed,

This what i tried and found.
Hope it will be helpful.

thanks.

binary
Posts: 13
Joined: Tue Jun 14, 2016 2:58 pm

Re: New 2.0 NONOS SDK not working

Postby binary » Wed Aug 10, 2016 3:51 pm

sorry
some function still without ICACHE_FLASH_ATTR,but i didn't know.
So i changed those to ICACHE_FLASH_ATTR,V2.0 can be works well.

sorry for my mistake.

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: New 2.0 NONOS SDK not working

Postby pratik » Thu Aug 11, 2016 2:06 pm

Hello,

http://iot-bits.com/articles/building-e ... k-v-2-0-0/
The example applications seem to build just fine. If you are unable to compile something specific, please post that part of your code below so that I can check what might be happening. For me, things seem fine so far!
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

RomanG
Posts: 1
Joined: Wed Sep 14, 2016 11:53 am

Re: New 2.0 NONOS SDK not working

Postby RomanG » Wed Sep 14, 2016 12:18 pm

Hi,

I also have an issue with the new SDK. Patirk is (almost!) right it compiles, but it still doesn't work...
In my case, the generated .bin instead of being named (and I am guessing mapped to flash at) 0x40000.bin is 0x10000.bin, despite 32Mb flash size, and other options in the make file being set as they used to be before. Problem can be avoided (but not solved) by using the eagle.app.v6.ld from 1.54 SDK. All goes well when I use that one.
So... Patrik could you please shed some light on what has changed in the new eagle.app.v6.ld? I'd rather use the new one, but for now it doesn't seem to work. I would like to use the new file, simply to be in line with the latest, but for now I (and others) don's seem to be able to do so.

Your help will be most appreciated...

Cheers,

Roman

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: New 2.0 NONOS SDK not working

Postby pratik » Sun Sep 18, 2016 3:48 am

Hello Roman,

The nonOS SDK 2.0.0 binary (BIN) may not work when burned to the location 0x40000. The defaults have changed in this version. That is why it seems to work when you use the linker file from the older SDK.
However, instead of doing that, always refer to the eagle.app.v6.ld file contents. For example, the default content of the file on SDK 2.0.0 contains this at the beginning:

Code: Select all

MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40210000, len = 0x5C000
}


If you replace the irom region specification above with

Code: Select all

  irom0_0_seg :                         org = 0x40240000, len = 0x5C000

Then you will have the irom0.text located to 0x40000.
While you can change this, note that the compiler has no idea where the "user application" stores data during run-time, or where the system parameters, etc are stored. Therefore, to prevent overlapping of content on flash, we highly recommend not modifying the flash map unless you absolutely need to.

As a side note: I will notify the internal team to update the Getting Started Guide with this information.
And I do work on some programming and documentation stuff by the way. :)
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: No registered users and 8 guests