ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby davdav » Fri Dec 01, 2017 3:44 pm

Hi everybody,

I'm porting a "quite big" project to esp32. I'm including step by step the .c file in the new project. At a point I got from the linker

Code: Select all

LD build/esp32_avior.elf
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/es                                               p/esp32_avior/build/esp32_avior.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: regio                                               n `dram0_0_seg' overflowed by 9088 bytes
collect2.exe: error: ld returned 1 exit status
I checked on forum that could be a problem of unitialized variables, so I put some initizialitation to some big array (for example I have variable "char foo[100];" and i modified as "char foo[100]= {0};").
Doing this the linker doesn't complain anymore and the .bin file is created successfully.

However, when esp32 start it cannot boot (see title of the post).

Code: Select all

I (10) boot: ESP-IDF v3.0-dev-1363-gaf63ca15-dirty 2nd stage bootloader
I (10) boot: compile time 15:06:24
I (10) boot: Enabling RNG early entropy source...
I (12) boot: SPI Speed      : 40MHz
I (16) boot: SPI Mode       : DIO
I (19) boot: SPI Flash Size : 4MB
I (22) boot: Partition Table:
I (24) boot: ## Label            Usage          Type ST Offset   Length
I (31) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (37) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (44) boot:  2 factory          factory app      00 00 00010000 0007d000
I (50) boot:  3 ota_0            OTA app          00 10 00090000 0007d000
I (57) boot:  4 ota_1            OTA app          00 11 00110000 0007d000
I (63) boot:  5 storage          Unknown data     01 82 0018d000 000f0000
I (70) boot: End of partition table
I (73) boot: Defaulting to factory image
I (77) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0c26c ( 49772) map
I (102) esp_image: segment 1: paddr=0x0001c294 vaddr=0x3ffb0000 size=0x02270 (  8816) load
I (106) esp_image: segment 2: paddr=0x0001e50c vaddr=0x40080000 size=0x00400 (  1024) load
I (107) esp_image: segment 3: paddr=0x0001e914 vaddr=0x40080400 size=0x016fc (  5884) load
I (117) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x2c798 (182168) map
I (186) esp_image: segment 5: paddr=0x0004c7b8 vaddr=0x40081afc size=0x077f8 ( 30712) load
I (199) esp_image: segment 6: paddr=0x00053fb8 vaddr=0x400c0000 size=0x00000 (     0) load
I (205) boot: Loaded app from partition at offset 0x10000
I (205) boot: Disabling RNG early entropy source...
ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.
abort() was called at PC 0x40080fed on core 0

Backtrace: 0x400877d0:0x3ffe3be0 0x4008789b:0x3ffe3c00 0x40080fed:0x3ffe3c20 0x40078ce6:0x3ffe3c40 0x40078d99:0x3ffe3c70 0x4007900a:0x3ffe3cb0 0x40079152:0x3ffe3e70 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20

Entering gdb stub now.
$T0b#e6
My question is: what is the maximum .bss section size and how much is the RAM available of the device?

Thank you.

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby loboris » Fri Dec 01, 2017 5:21 pm

You can run make size to get total, used and free sizes of your application.
For more detailed report run make size-components or make size-files

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby davdav » Mon Dec 04, 2017 9:21 am

Thank you @Loboris,

Your hint helped me to figure out what files consume the RAM memory.

Just a lateral question: is there a way to know how much RAM is used by a task in order to tailoring its stack when I create it (using xTaskCreate)? Having a tool or command which can give this information, I don't "waste" memory.

Thanks


davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby davdav » Mon Dec 04, 2017 10:56 am

Thank you WiFive for reply.

I need to disturb again because I still do not understand what is going on. This is the result from "make size-files"

Code: Select all

Total sizes:
 DRAM .data size:    8816 bytes
 DRAM .bss  size:  264776 bytes
Used static DRAM:  273592 bytes (  54088 available, 83.5% used)
Used static IRAM:   37440 bytes (  93632 available, 28.6% used)
      Flash code:  173108 bytes
    Flash rodata:   46924 bytes
Total image size:~ 266288 bytes (.bin may be padded larger)
Per-file contributions to ELF file:
             Object File DRAM .data & .bss   IRAM Flash code & rodata   Total
libapp_update.a
           esp_ota_ops.o          0      4      0        484      767    1255
libbootloader_support.a
      bootloader_flash.o          0      0      0          0        0       0
        bootloader_sha.o          0      0      0          0        0       0
      esp_image_format.o          0      0      0          0        0       0
libc.a
          lib_a-assert.o          0      0      0         68       60     128
            lib_a-dtoa.o          0      0      0       3334       13    3347
           lib_a-errno.o          0      0      0         10        0      10
           lib_a-fgets.o          0      0      0        290        0     290
        lib_a-fiprintf.o          0      0      0         84        0      84
           lib_a-flags.o          0      0      0        127        0     127
           lib_a-fopen.o          0      0      0        228        0     228
           lib_a-fputs.o          0      0      0          0        0       0
           lib_a-fread.o          0      0      0        296        0     296
           lib_a-fseek.o          0      0      0         45        0      45
          lib_a-fseeko.o          0      0      0        842        0     842
          lib_a-fwrite.o          0      0      0        220        0     220
           lib_a-mprec.o          0      0      0       2134      296    2430
          lib_a-printf.o          0      0      0        116        0     116
            lib_a-putc.o          0      0      0          0        0       0
         lib_a-putchar.o          0      0      0          0        0       0
            lib_a-puts.o          0      0      0          0        0       0
           lib_a-reent.o          0      0      0        232        0     232
         lib_a-s_frexp.o          0      0      0        110        0     110
        lib_a-snprintf.o          0      0      0        214        0     214
         lib_a-sprintf.o          0      0      0        167        0     167
      lib_a-svfiprintf.o          0      0      0       9638     1210   10848
       lib_a-svfprintf.o          0      0      0      13754      756   14510
       lib_a-sysgettod.o          0      0      0          0        0       0
         lib_a-sysstat.o          0      0      0         24        0      24
       lib_a-vfiprintf.o          0      0      0       9933      738   10671
        lib_a-vfprintf.o          0      0      0      14161      756   14917
         lib_a-vprintf.o          0      0      0         94        0      94
       lib_a-vsnprintf.o          0      0      0          0        0       0
libcoexist.a
               coexist.o          0      0      0          0        0       0
libcore.a
              misc_nvs.o          0      0      0          0        0       0
libcxx.a
   cxx_exception_stubs.o          0      0      0          6        0       6
            cxx_guards.o          0      0      0          5        0       5
libdriver.a
                  gpio.o          8      8    154       3382     3967    7519
           periph_ctrl.o          8      0      0        606      240     854
            rtc_module.o         16      8      0       1155     4397    5576
                 timer.o         16      0      0        112      269     397
                  uart.o         36     12      0       7154     6963   14165
libesp32.a
              brownout.o          0      0      0        145      181     326
         cache_err_int.o          0      0     70        106        0     176
                   clk.o          0      0     67        574      211     852
             cpu_start.o          0      1   1036        386      585    2008
         crosscore_int.o          8      8    212        134      136     498
          dport_access.o          8     40    447        189      117     801
dport_panic_highint_hdl.          8      0    254          0        0     262
             esp_timer.o          8     12    543        353      150    1066
       esp_timer_esp32.o          8     25    847        249      371    1500
      ets_timer_legacy.o          0      0      0          0        0       0
event_default_handlers.o          0      0      0          0        0       0
            event_loop.o          0      0      0          0        0       0
        freertos_hooks.o          8    128     43        216        0     395
               gdbstub.o          0    933      0       1221       33    2187
             hw_random.o          0      4     74          0        0      78
               int_wdt.o          0      1     91        270        0     362
            intr_alloc.o          8     22    594       1990      776    3390
                   ipc.o          0     36    159        294       96     585
            lib_printf.o          0      0      0          0        0       0
                 panic.o       1859      1   1628          0        0    3488
              phy_init.o          0      0      0          0        0       0
            system_api.o          0      8    597        287     1184    2076
              task_wdt.o         58      4      0       1141      396    1599
         wifi_internal.o          0      0      0          0        0       0
libethernet.a
              emac_dev.o          0      0      0          0        0       0
             emac_main.o          0      0      0          0        0       0
libfreertos.a
      FreeRTOS-openocd.o          4      0      0          0        0       4
                  list.o          0      0    142          0        0     142
                  port.o          0     16    498          0      108     622
               portasm.o       3084      0    476          0        0    3560
                 queue.o          0      0   2355          0      328    2683
               ringbuf.o          0      0   2062          0      364    2426
                 tasks.o         20    700   5565          0      761    7046
                timers.o          8     56   1010          0      213    1287
        xtensa_context.o          0      0    299          0        0     299
           xtensa_init.o          0      4     36          0        0      40
           xtensa_intr.o          0      0    104          0       35     139
       xtensa_intr_asm.o       1024      0     51          0        0    1075
xtensa_vector_defaults.o          0      0     46          0        0      46
        xtensa_vectors.o          8      0   1697          0       36    1741
libgcc.a
            _addsubdf3.o          0      0      0        762        0     762
               _cmpdf2.o          0      0      0        374        0     374
               _divdf3.o          0      0      0        523        0     523
               _divsf3.o          0      0      0          0        0       0
          _extendsfdf2.o          0      0      0          0        0       0
              _fixdfsi.o          0      0      0         76        0      76
            _floatdidf.o          0      0      0          0        0       0
            _floatsidf.o          0      0      0         61        0      61
               _muldf3.o          0      0      0        511        0     511
          _popcountsi2.o          0      0      0          0        0       0
              _udivdi3.o          0      0      0        641       40     681
              _umoddi3.o          0      0      0        622       40     662
             lib2funcs.o          0      0    104          0        0     104
        unwind-dw2-fde.o          4     20      0       3312      404    3740
     unwind-dw2-xtensa.o          0      0      0       2172      324    2496
libhal.a
                 clock.o          0      0     72          0        0      72
 int_asm--set_intclear.o          0      0      8          0        0       8
  interrupts--intlevel.o          0      0      0          0       32      32
state_asm--restore_extra          0      0     62          0        0      62
state_asm--save_extra_nw          0      0     62          0        0      62
       windowspill_asm.o          0      0    311          0        0     311
libheap.a
             heap_caps.o          4      0   1093         52      581    1730
        heap_caps_init.o          0      4      0       1054      379    1437
            multi_heap.o        788      0   2178          0        0    2966
liblog.a
                   log.o          8    268    438        388      122    1224
liblwip.a
               api_lib.o          0      0      0          0        0       0
               api_msg.o          0      0      0          0        0       0
                   def.o          0      0      0          0        0       0
                  dhcp.o          0      0      0          0        0       0
            dhcpserver.o          0      0      0          0        0       0
                   dns.o          0      0      0          0        0       0
                etharp.o          0      0      0          0        0       0
              ethernet.o          0      0      0          0        0       0
            ethernetif.o          0      0      0          0        0       0
                ethip6.o          0      0      0          0        0       0
                  icmp.o          0      0      0          0        0       0
                 icmp6.o          0      0      0          0        0       0
                  igmp.o          0      0      0          0        0       0
           inet_chksum.o          0      0      0          0        0       0
                  init.o          0      0      0          0        0       0
                    ip.o          0      0      0          0        0       0
                   ip4.o          0      0      0          0        0       0
              ip4_addr.o          0      0      0          0        0       0
                   ip6.o          0      0      0          0        0       0
              ip6_addr.o          0      0      0          0        0       0
              ip6_frag.o          0      0      0          0        0       0
                  memp.o          0      0      0          0        0       0
                  mld6.o          0      0      0          0        0       0
                   nd6.o          0      0      0          0        0       0
                netbuf.o          0      0      0          0        0       0
                 netif.o          0      0      0          0        0       0
                  pbuf.o          0      0      0          0        0       0
                   raw.o          0      0      0          0        0       0
               sockets.o          0      0      0          0        0       0
              sys_arch.o          0      0      0          0        0       0
                   tcp.o          0      0      0          0        0       0
                tcp_in.o          0      0      0          0        0       0
               tcp_out.o          0      0      0          0        0       0
                 tcpip.o          0      0      0          0        0       0
                timers.o          0      0      0          0        0       0
                   udp.o          0      0      0          0        0       0
              vfs_lwip.o          0      0      0          0        0       0
                wlanif.o          0      0      0          0        0       0
libm.a
    lib_a-s_fpclassify.o          0      0     92          0        0      92
libmain.a
                agenda.o          0    436      0        116        0     552
            avior_main.o          1   3948      0       3913     2155   10017
                  call.o          0   2613      0        285        0    2898
               command.o          0  15993      0      12270      174   28437
       console_command.o          4   3690      0      11458     1007   16159
              diag_mng.o          0    203      0        551        6     760
                 error.o        336      0      0          0     3032    3368
              inputmng.o          0   5913      0        761      215    6889
                  mail.o          0  24412      0         85        0   24497
              mobi_ctl.o          0    180      0         72        0     252
           nvs_utility.o          0      0      0        545      161     706
                output.o          0     96      0        824       93    1013
                 parse.o          1    374      0       9337      896   10608
               phonebk.o          0   1926      0       2829      139    4894
                reqget.o          2  16838      0        552      145   17537
                 reset.o          0    192      0         52        0     244
                 rules.o          0 156597      0        217        0  156814
                   sms.o          0  13767      0        561       32   14360
             tcpclient.o          2    118      0        320       15     455
              tracefcn.o          0  14377      0        301      669   15347
               utility.o          0      0      0       1091       13    1104
libmbedtls.a
                sha256.o          0      0      0          0        0       0
libnet80211.a
             ieee80211.o          0      0      0          0        0       0
      ieee80211_action.o          0      0      0          0        0       0
ieee80211_action_vendor.          0      0      0          0        0       0
         ieee80211_api.o          0      0      0          0        0       0
      ieee80211_crypto.o          0      0      0          0        0       0
 ieee80211_crypto_ccmp.o          0      0      0          0        0       0
 ieee80211_crypto_tkip.o          0      0      0          0        0       0
  ieee80211_crypto_wep.o          0      0      0          0        0       0
       ieee80211_debug.o          0      0      0          0        0       0
         ieee80211_ets.o          0      0      0          0        0       0
      ieee80211_hostap.o          0      0      0          0        0       0
          ieee80211_ht.o          0      0      0          0        0       0
   ieee80211_ie_vendor.o          0      0      0          0        0       0
       ieee80211_input.o          0      0      0          0        0       0
       ieee80211_ioctl.o          0      0      0          0        0       0
  ieee80211_mesh_quick.o          0      0      0          0        0       0
        ieee80211_misc.o          0      0      0          0        0       0
         ieee80211_nvs.o          0      0      0          0        0       0
      ieee80211_output.o          0      0      0          0        0       0
         ieee80211_phy.o          0      0      0          0        0       0
       ieee80211_power.o          0      0      0          0        0       0
       ieee80211_proto.o          0      0      0          0        0       0
   ieee80211_regdomain.o          0      0      0          0        0       0
        ieee80211_rfid.o          0      0      0          0        0       0
        ieee80211_scan.o          0      0      0          0        0       0
         ieee80211_sta.o          0      0      0          0        0       0
       ieee80211_timer.o          0      0      0          0        0       0
                wl_chm.o          0      0      0          0        0       0
                wl_cnx.o          0      0      0          0        0       0
libnewlib.a
                 locks.o          8      0    480          0       74     562
            reent_init.o          0      0     68          0        2      70
         syscall_table.o        144    240      0         67        0     451
              syscalls.o          0      0     74         45        0     119
                  time.o          0     12    128        351        0     491
libnvs_flash.a
               nvs_api.o          0     32      0       3632      524    4188
    nvs_item_hash_list.o          0      0      0        415      149     564
              nvs_page.o          0      0      0       4310     1683    5993
       nvs_pagemanager.o          0      0      0       1127      243    1370
           nvs_storage.o          0      0      0       1146      438    1584
             nvs_types.o          0      0      0         94        0      94
libphy.a
                   phy.o          0      0      0          0        0       0
           phy_chip_v7.o          0      0      0          0        0       0
       phy_chip_v7_ana.o          0      0      0          0        0       0
       phy_chip_v7_cal.o          0      0      0          0        0       0
libpp.a
               esf_buf.o          0      0      0          0        0       0
             if_hwctrl.o          0      0      0          0        0       0
                  lmac.o          0      0      0          0        0       0
                    pm.o          0      0      0          0        0       0
  pm_for_bcn_only_mode.o          0      0      0          0        0       0
                    pp.o          0      0      0          0        0       0
              pp_debug.o          0      0      0          0        0       0
          rate_control.o          0      0      0          0        0       0
                   trc.o          0      0      0          0        0       0
                  wdev.o          0      0      0          0        0       0
libpthread.a
               pthread.o          8      4    178        250      539     979
 pthread_local_storage.o          8      4      0        234        0     246
librtc.a
                 bt_bb.o          0      0      0          0        0       0
                    pm.o          0      0      0          0        0       0
                   rtc.o          0      0      0          0        0       0
            rtc_analog.o          0      0      0          0        0       0
              rtc_wrap.o          0      0      0          0        0       0
libsoc.a
              cpu_util.o          0      0    310          0        0     310
               rtc_clk.o       1184      8   1680          0        0    2872
              rtc_init.o          0      0   1020          0        0    1020
             rtc_sleep.o          0      0      0          0        0       0
              rtc_time.o          0      0    676          0        0     676
     soc_memory_layout.o          0      0      0          0     1239    1239
libspi_flash.a
           cache_utils.o          4     14    936         81      382    1417
            flash_mmap.o          0    296   1184        118      355    1953
             flash_ops.o         32      5   1874         62        0    1973
             partition.o          0      8      0        918      211    1137
   spi_flash_rom_patch.o          0      0   2381          0      758    3139
libspiffs.a
            esp_spiffs.o          0     12      0       3333     1223    4568
          spiffs_cache.o          0      0      0       1124        0    1124
          spiffs_check.o          0      0      0          0        0       0
             spiffs_gc.o          0      0      0       2697        0    2697
       spiffs_hydrogen.o          0      0      0       3814        0    3814
        spiffs_nucleus.o          0      0      0      10242        0   10242
libstdc++.a
             bad_alloc.o          0      0      0         48       35      83
       class_type_info.o          0      0      0        268      156     424
                del_op.o          0      0      0         14        0      14
               del_opv.o          0      0      0         10        0      10
          eh_exception.o          0      0      0          5        0       5
            eh_globals.o          0     16      0        149      193     358
        eh_personality.o          0      0      0       1561      384    1945
       eh_term_handler.o          4      0      0          0        0       4
          eh_terminate.o          0      0      0        117      141     258
       eh_unex_handler.o          4      0      0          0        0       4
           new_handler.o          0      4      0         20        0      24
                new_op.o          0      0      0         68       40     108
               new_opv.o          0      0      0         38      124     162
                  pure.o          0      0      0          0        0       0
    si_class_type_info.o          0      0      0        303      180     483
                 tinfo.o          0      0      0         12        0      12
libtcpip_adapter.a
    tcpip_adapter_lwip.o          0      0      0          0        0       0
libvfs.a
                   vfs.o          0     32      0       1299      115    1446
              vfs_uart.o         40     31      0        862      263    1196
libwpa.a
             ap_config.o          0      0      0          0        0       0
                common.o          0      0      0          0        0       0
                   wpa.o          0      0      0          0        0       0
              wpa_auth.o          0      0      0          0        0       0
           wpa_auth_ie.o          0      0      0          0        0       0
            wpa_common.o          0      0      0          0        0       0
             wpa_debug.o          0      0      0          0        0       0
                wpa_ie.o          0      0      0          0        0       0
              wpa_main.o          0      0      0          0        0       0
                wpabuf.o          0      0      0          0        0       0
             wpas_glue.o          0      0      0          0        0       0
libwpa2.a
                  asn1.o          0      0      0          0        0       0
                base64.o          0      0      0          0        0       0
                bignum.o          0      0      0          0        0       0
                   eap.o          0      0      0          0        0       0
          eap_mschapv2.o          0      0      0          0        0       0
              eap_peap.o          0      0      0          0        0       0
       eap_peap_common.o          0      0      0          0        0       0
               eap_tls.o          0      0      0          0        0       0
        eap_tls_common.o          0      0      0          0        0       0
              eap_ttls.o          0      0      0          0        0       0
              mschapv2.o          0      0      0          0        0       0
                 pkcs1.o          0      0      0          0        0       0
                 pkcs5.o          0      0      0          0        0       0
                 pkcs8.o          0      0      0          0        0       0
                   rsa.o          0      0      0          0        0       0
          tls_internal.o          0      0      0          0        0       0
          tlsv1_client.o          0      0      0          0        0       0
     tlsv1_client_read.o          0      0      0          0        0       0
    tlsv1_client_write.o          0      0      0          0        0       0
          tlsv1_common.o          0      0      0          0        0       0
            tlsv1_cred.o          0      0      0          0        0       0
          tlsv1_record.o          0      0      0          0        0       0
                x509v3.o          0      0      0          0        0       0
libwpa_supplicant.a
   crypto_internal-rsa.o          0      0      0          0        0       0
       crypto_internal.o          0      0      0          0        0       0
          des-internal.o          0      0      0          0        0       0
             dh_group5.o          0      0      0          0        0       0
             dh_groups.o          0      0      0          0        0       0
          md4-internal.o          0      0      0          0        0       0
          md5-internal.o          0      0      0          0        0       0
                   md5.o          0      0      0          0        0       0
              ms_funcs.o          0      0      0          0        0       0
             os_xtensa.o          0      0      0          0        0       0
                   rc4.o          0      0      0          0        0       0
         sha1-internal.o          0      0      0          0        0       0
           sha1-pbkdf2.o          0      0      0          0        0       0
                  sha1.o          0      0      0          0        0       0
libwps.a
            eap_common.o          0      0      0          0        0       0
                  uuid.o          0      0      0          0        0       0
                   wps.o          0      0      0          0        0       0
        wps_attr_build.o          0      0      0          0        0       0
        wps_attr_parse.o          0      0      0          0        0       0
      wps_attr_process.o          0      0      0          0        0       0
            wps_common.o          0      0      0          0        0       0
          wps_dev_attr.o          0      0      0          0        0       0
          wps_enrollee.o          0      0      0          0        0       0
         wps_registrar.o          0      0      0          0        0       0
          wps_validate.o          0      0      0          0        0       0
As you can see the total RAM seems below its maximum limit. DRAM is 83.5% used and IRAM is 28.6%.

However, if I execute the code, it stop again with error

Code: Select all

ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.
abort() was called at PC 0x40080fe9 on core 0
For sure I miss some information. I wonder why compiler&linker works while the module can't execute the program..

Thanks in advance for help.


davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby davdav » Mon Dec 04, 2017 1:53 pm

OK WiFive. Does it means that .bss is limited to 192KB?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby WiFive » Mon Dec 04, 2017 9:02 pm

Yes at this time

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby ESP_Angus » Tue Dec 05, 2017 4:36 am

.bss+.data is limited to 192KB at the moment. I'm working on the fix for this right now, it is planned for IDF v3.1.

It would be better if we caught it at linker time and failed the build, but at the time I put that check in I assumed this would be a quicker fix. :/

In the meantime, anything you can move from statically allocated to heap allocated will ease up on this. ie if you have

Code: Select all

uint8_t my_big_array[65536]
and you can change it to:

Code: Select all

uint8_t *my_big_array;

void app_main() {
   my_big_array = calloc(1, 65536);
   ...
}
Then this moves it from statically allocated to heap allocated (even if the data is never freed), and you'll find IDF can boot again.

Similarly, if there's any static data you can mark as "const" this will move it from static RAM to flash, which also shrinks .data.


Angus

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.

Postby davdav » Fri Dec 15, 2017 9:12 am

OK Angus, thank you. I will look forward for v3.1. Thanks

Who is online

Users browsing this forum: No registered users and 59 guests