Sysprogs forums › Forums › VisualGDB › ESP8266 projects Release edition build error
- This topic has 4 replies, 2 voices, and was last updated 8 years, 5 months ago by support.
-
AuthorPosts
-
May 31, 2016 at 16:24 #8328wsptrParticipant
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 region
iram1_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.May 31, 2016 at 16:32 #8329wsptrParticipantIt 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?
June 1, 2016 at 23:17 #8344supportKeymasterHi,
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.
June 2, 2016 at 13:26 #8348wsptrParticipantHi,
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.
- 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?
- How can I use UART with VisualGDB? I need to use UART…
Thank you!
June 3, 2016 at 00:29 #8350supportKeymasterHi,
Most of the ESP8266 memory is used by the library code from Espressif, so this is to be expected.
Regarding other problems:
- 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.
- 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?
-
AuthorPosts
- You must be logged in to reply to this topic.