ESP8266 projects Release edition build error

Sysprogs forums Forums VisualGDB ESP8266 projects Release edition build error

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8328
    wsptr
    Participant

    Hi,

    I’m learning to use VisuaGDB to debug ESP8266. Everything is OK in Debug mode, but every time I choose Release mode, build process fails. The messages are shown as below. Can any one help me to solve this problem? THX very much!

    1> VisualGDB: Run “cmd.exe /c “C:\SysGCC\esp8266\bin\make.exe” CONFIG=Release” in directory “E:\Walson\Documents\VisualGDB\ESP8266\EmbeddedProject3\EmbeddedProject3” on local computer
    1> C:\SysGCC\esp8266/bin/xtensa-lx106-elf-g++.exe -o Release/EmbeddedProject3.elf -Wl,-gc-sections -TC:\SysGCC\esp8266\esp8266-bsp/IoT-SDK/ld/eagle.app.v6.new.1024.app1.ld -nostdlib -mlongcalls -mtext-section-literals -nostdlib -mlongcalls -mtext-section-literals -LC:\SysGCC\esp8266/hal -LC:\SysGCC\esp8266\esp8266-bsp/IoT-SDK/lib -LC:\SysGCC\esp8266\esp8266-bsp/IoT-SDK/ld -Wl,–start-group Release/gdbstub.o Release/stubs.o Release/HTTPDemo.o Release/gdbstub-entry.o -lc -lgcc -lphy -lpp -lnet80211 -llwip -lwpa -lmain -ljson -lupgrade -lssl -lpwm -lsmartconfig -lcrypto -Wl,–end-group
    1> c:/sysgcc/esp8266/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: Release/EmbeddedProject3.elf section .text' will not fit in regioniram1_0_seg’
    1> c:/sysgcc/esp8266/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: region `iram1_0_seg’ overflowed by 7698 bytes
    1>collect2.exe : error : ld returned 1 exit status
    1> make: *** [Release/EmbeddedProject3.elf] Error 1
    1> ————————————————————-
    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:\SysGCC\esp8266\bin\make.exe” CONFIG=Release
    1> Directory: E:\Walson\Documents\VisualGDB\ESP8266\EmbeddedProject3\EmbeddedProject3
    1>VisualGDB : error : Command-line action failed
    1>EXEC : error : Build has failed. See the Output window for more details.

     

    #8329
    wsptr
    Participant

    It seems that optimization params caused this problem… When I change optimize options to “optimize level 2”, the problem solved. Can’t it be optimized to level 3 or fast?

    #8344
    support
    Keymaster

    Hi,

    The error simply means that your program’s code did not fit into the instruction RAM. Most likely enabling optimization has inlined some of the functions or unrolled some loops resulting in the size increase. You can try optimizing the code for minimal size with -Os instead of -O3. Alternatively you can use the Embedded Memory Explorer to see which exact functions contribute the most to RAM utilization.

    #8348
    wsptr
    Participant

    Hi,

    Thank you for your reply! I just create and build a default project with no codes added. Is it that large?

    By the way, I meet other problems.

    1. When I entered the debug mode, all things seems right, but when I reset the device, it seems that the device halted. How to solve this problem?
    2. How can I use UART with VisualGDB? I need to use UART…

    Thank you!

    #8350
    support
    Keymaster

    Hi,

    Most of the ESP8266 memory is used by the library code from Espressif, so this is to be expected.

    Regarding other problems:

    1. Resetting the device will clear the breakpoints in the RAM. To re-enable them, simply click the “Break all” button in Visual Studio and then resume debugging as usual. If this does not help, please try adding forced breakpoints (asm(“break 1,1”)) in your initialization functions and checking that they get invoked after a reset.
    2. What do you mean by “use UART with VisualGDB”? Connect to a COM port from VisualGDB so that you can see what your device is printing or are you taking about the UART functions of the ESP8266 SDK?
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.