RTOS_SDK V1.3 do not fit my code any more

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

RTOS_SDK V1.3 do not fit my code any more

Postby ivanroberto » Thu Nov 05, 2015 5:10 am

Hi guys,

I have a code working very well on SDK RTOS V1.2.
When a try to update my enviroment to V1.3 I got that my code do not fit anymore.

I just add on my makefile -crypto (for new WPA library)

On SDK RTOS V1.2 was...
------------------------------------------------------------------------------
Section| Description| Start (hex)| End (hex)|Used space
------------------------------------------------------------------------------
data| Initialized Data (RAM)| 3FFE8000| 3FFE8C34| 3124
rodata| ReadOnly Data (RAM)| 3FFE8C40| 3FFE93F0| 1968
bss| Uninitialized Data (RAM)| 3FFE93F0| 3FFF0458| 28776
text| Uncached Code (IRAM)| 40100000| 401062B0| 25264
irom0_text| Cached Code (SPI)| 40240000| 4027A8D8| 239832
------------------------------------------------------------------------------
Entry Point : 40100004 call_user_start()
Total Used RAM : 33868
Free RAM : 48052
Free IRam : 7504 or 23888 if 48k IRam
------------------------------------------------------------------------------
Generate 0x00000.bin and 0x40000.bin successully in folder firmware.
0x00000.bin-------->0x00000
0x40000.bin-------->0x40000
Done


Now with SDK RTOS V1.3 is...

AR build/app_app.a
LD build/app.out
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: build/app.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2.exe: error: ld returned 1 exit status
X:/ESP8266/workspace/Terminal_Wifi_TFT_RTOS/Makefile:228: recipe for target 'build/app.out' failed
mingw32-make.exe: *** [build/app.out] Error 1



I already tried modify the #define ICACHE_FLASH_ATTR on c_types.h to
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))

But... still no luck.

If some one can help me...

Thanks

baoshi
Posts: 23
Joined: Tue Dec 02, 2014 8:35 pm

Re: RTOS_SDK V1.3 do not fit my code any more

Postby baoshi » Sat Nov 07, 2015 11:55 pm

Exact same thing happens to me.

I have some code compile successfully under V1.2 RTOS SDK. Here is the layout result:

Code: Select all

   Section|                   Description| Start (hex)|   End (hex)|Used space
------------------------------------------------------------------------------
      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8484|    1156
    rodata|           ReadOnly Data (RAM)|    3FFE8490|    3FFE88F8|    1128
       bss|      Uninitialized Data (RAM)|    3FFE88F8|    3FFEF7D8|   28384
      text|            Cached Code (IRAM)|    40100000|    40105EB4|   24244
irom0_text|           Uncached Code (SPI)|    40240000|    40272C4E|  207950
Total Used RAM : 30668
Free RAM : 51252
Free IRam : 8542

Now after upgrade to 1.3, I receive "section `.irom0.text' will not fit in region `irom0_0_seg'" error, either in Windows gcc, or Espressif linux VM image.

Please help.

masacate
Posts: 13
Joined: Tue Mar 31, 2015 2:41 am
Location: SPAIN

Re: RTOS_SDK V1.3 do not fit my code any more

Postby masacate » Sun Nov 08, 2015 6:10 pm

some problem.

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: RTOS_SDK V1.3 do not fit my code any more

Postby kolban » Mon Nov 09, 2015 9:57 am

How much flash memory do you have on your ESP8266 board? Assuming your either have 512K or else are configured to use 512K, you may also be configured to use an "Over the air" (OTA) mode of linking. In OTA, the 512K gets split into two units of 256K. One for the program already loaded and one for the replacement program that can be loaded via OTA. If an OTA load succeeds, then the two banks of memory switch places. However, the OTA story seems to result in your executables being constrained to 256K or less.

If you are willing to forgo OTA on a 512K board, then you can use all of the 512K of flash for your program. It may be that this is what you are running into. If you switch your configuration to use the whole set of 512K to store a single flash program, you may no longer have the linker error.

baoshi
Posts: 23
Joined: Tue Dec 02, 2014 8:35 pm

Re: RTOS_SDK V1.3 do not fit my code any more

Postby baoshi » Mon Nov 09, 2015 11:46 am

flash config doesn't help here. I tried select 4M byte still no go. You may see in both cases the code compiled under 250K with V1.2, but in RTOS 1.3 it cannot fit

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: RTOS_SDK V1.3 do not fit my code any more

Postby kolban » Mon Nov 09, 2015 11:52 am

Howdy, have you tried modifying the eagle.app.v6.ld linker control configuration file and lowering the start location of irom0_0_seg and increasing its length. The default on an Espressif SDK system is only 245,000 bytes out of the possible 512,000.

How much flash does your ESP8266 actually have? What are your current values of irom0_0seg origin and length?

baoshi
Posts: 23
Joined: Tue Dec 02, 2014 8:35 pm

Re: RTOS_SDK V1.3 do not fit my code any more

Postby baoshi » Mon Nov 09, 2015 2:02 pm

Yes that works. I didn't notice the remarks in the link script.
Thanks

masacate
Posts: 13
Joined: Tue Mar 31, 2015 2:41 am
Location: SPAIN

Re: RTOS_SDK V1.3 do not fit my code any more

Postby masacate » Mon Nov 09, 2015 3:36 pm

It works also for me. A new thing to learn.
Thanks Kolban

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

Re: RTOS_SDK V1.3 do not fit my code any more

Postby ivanroberto » Tue Nov 10, 2015 12:12 am

Hi friends,

I tried to modify eagle.app.v6.ld, it link now, but my code doesn't works.

MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x18000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40240000, len = 0x4C000
}

Could you provide yours?

Thanks

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: RTOS_SDK V1.3 do not fit my code any more

Postby kolban » Tue Nov 10, 2015 12:32 am

Here is what I use in my app:

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 = 0x7C000
}


Of course, this means that I have to load my code into 0x10000 in flash as opposed to 0x40000.

Who is online

Users browsing this forum: No registered users and 140 guests