ESP8266 Developer Zone The Official ESP8266 Forum 2016-01-05T11:14:42+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1339 2016-01-05T11:14:42+08:00 2016-01-05T11:14:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=5241#p5241 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
baoshi wrote:
Exact same thing happens to me.

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

Code:

   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.


Hi , 哥们,你怎么实现,那个 used space 显示的,挺方便的,能共享下思路不?

Statistics: Posted by fuzi2008 — Tue Jan 05, 2016 11:14 am


]]>
2015-11-15T01:09:04+08:00 2015-11-15T01:09:04+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4592#p4592 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
kolban wrote:

Code:

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
}


You should change the length of irom0_0_seg to 0x6c000. As it is, the linker script would allow the irom0 section to overlap the system parameters area at 0x7c000. If irom0 begins at 0x10000 the length of 0x6c000 will have it ending just before 0x7c000.

It should be made clear, also, that this layout is for a 512KB Flash chip. The system parameter area is always at 16KB from the end of the Flash chip for all Flash chip sizes.

Statistics: Posted by dkinzer — Sun Nov 15, 2015 1:09 am


]]>
2015-11-14T23:33:29+08:00 2015-11-14T23:33:29+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4591#p4591 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> Statistics: Posted by kolban — Sat Nov 14, 2015 11:33 pm


]]>
2015-11-14T15:23:08+08:00 2015-11-14T15:23:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4585#p4585 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
kolban wrote:
Here is what I use in my app:

Code:

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.





hi kolban!

when i change irom0_0_seg address, it also could solved the problem
region `irom0_0_seg' overflowed by 18659 bytes


although there is not any error happens when complies。
but actually it does not worked anymore。


when ESP8266 device power on ,it was put out some strange code , and do not working any more!
~~~~

Statistics: Posted by marhc_seven — Sat Nov 14, 2015 3:23 pm


]]>
2015-11-10T02:57:02+08:00 2015-11-10T02:57:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4519#p4519 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> It worked!

Kolban, another question:
Do you realized that code optimization almost doesn't make difference (just few bytes) from -O0 to -Os or -O3???

For me it's sound strange...

Statistics: Posted by ivanroberto — Tue Nov 10, 2015 2:57 am


]]>
2015-11-10T00:32:24+08:00 2015-11-10T00:32:24+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4518#p4518 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>

Code:

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.

Statistics: Posted by kolban — Tue Nov 10, 2015 12:32 am


]]>
2015-11-10T00:12:08+08:00 2015-11-10T00:12:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4517#p4517 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
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

Statistics: Posted by ivanroberto — Tue Nov 10, 2015 12:12 am


]]>
2015-11-09T15:36:09+08:00 2015-11-09T15:36:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4510#p4510 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> Thanks Kolban

Statistics: Posted by masacate — Mon Nov 09, 2015 3:36 pm


]]>
2015-11-09T14:02:53+08:00 2015-11-09T14:02:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4501#p4501 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> Thanks

Statistics: Posted by baoshi — Mon Nov 09, 2015 2:02 pm


]]>
2015-11-09T11:52:46+08:00 2015-11-09T11:52:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4493#p4493 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
How much flash does your ESP8266 actually have? What are your current values of irom0_0seg origin and length?

Statistics: Posted by kolban — Mon Nov 09, 2015 11:52 am


]]>
2015-11-09T11:46:40+08:00 2015-11-09T11:46:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4492#p4492 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> Statistics: Posted by baoshi — Mon Nov 09, 2015 11:46 am


]]>
2015-11-09T09:57:55+08:00 2015-11-09T09:57:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4491#p4491 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
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.

Statistics: Posted by kolban — Mon Nov 09, 2015 9:57 am


]]>
2015-11-08T18:10:35+08:00 2015-11-08T18:10:35+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4484#p4484 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]> Statistics: Posted by masacate — Sun Nov 08, 2015 6:10 pm


]]>
2015-11-07T23:55:07+08:00 2015-11-07T23:55:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4476#p4476 <![CDATA[Re: RTOS_SDK V1.3 do not fit my code any more]]>
I have some code compile successfully under V1.2 RTOS SDK. Here is the layout result:

Code:

   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.

Statistics: Posted by baoshi — Sat Nov 07, 2015 11:55 pm


]]>
2015-11-05T05:10:16+08:00 2015-11-05T05:10:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1339&p=4455#p4455 <![CDATA[RTOS_SDK V1.3 do not fit my code any more]]>
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

Statistics: Posted by ivanroberto — Thu Nov 05, 2015 5:10 am


]]>