When we compile the SDK 2.0.0 with AT support additionally with some our customised AT commands, we encountered a problem saying that output/eagle/debug/image/eagle.app.v6.out section section .text will not fit into region iram1_0 seg. collect2: error: ld return 1 exit statusKindly noticed that, it is not a problem that not fit into region "irom0_0_seg", but "iram1_0 seg".

A space of total max 32KB(0x8000) bytes from 0x4010 0000 is used as iRam by bootload to load code from spi flash. Therefore it seem that we CAN NOT increase the size here since it is already defined as max 0x8000 bytes in the ld file as such for iRom segs.

Meanwhile, we add ICACHE_FLASH_ATTR to all the functions we customised, but it does not make much difference. The only way we find so far is to remove the cutomised AT functions. However, this issue is not present with SDK 1.4.0 etc.

Any suggestions here? Sure, we don't expect to remove some of our customised AT functions for previous conpatibility.

You may actually try to relocate the PWM library to flash by modifying the LD files. I'm sure it will compile then, but not sure if the PWM functions will work reliably (did not test it out yet). You may try this if you want to:

In the ld folder of nonOS SDK v.2.0.0, open all ld files and find this line: *libmbedtls.a:(.literal .text .literal.* .text.*)

Add this line below it: *libpwm.a:(.literal .text .literal.* .text.*)

This will specify that the pwm library should be placed in the iCache. Let me know if this causes crashes (internal SDK code is not known to me). If this fails, I will request a firmware developer to assist you.

Documentation

About Us

Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.