So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By dniekowal
#68410 This is duplicate of:
viewtopic.php?f=160&t=15536
----
Hello,

I am using esp-open-sdk (I had built it as STANDALONE=y)

1)

Each time I flash ESP with my own programs, they work fine, but ESP stops responding to AT commands.
It does respond to AT commands only after flashing with bin files from Espressif (/ESP_SDK_v2.0.0/ESP8266_NONOS_SDK/bin).

My first question is, what has to be done to "activate" AT commands in your own program (is it calling at_init()) ?

I do not want to define any custom AT commands, I just want to use "standard" AT commands as supported by Esp.

2)

I've tried to check it on my own, if at_init() is the right way to go, but I have the following compilation problems (not present with other libraries, as gpio etc).

I am using the same Makefile for each "project".

It looks to me like the problem is while linking libat.a library...

Code: Select allxtensa-lx106-elf-gcc -I. -DICACHE_FLASH -mlongcalls   -c -o user_main.o user_main.c
xtensa-lx106-elf-gcc -Teagle.app.v6.ld  user_main.o  -nostdlib -Wl,--gc-sections -Wl,--start-group -lgcc -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -lat -lairkiss -lwps -lsmartconfig -lespnow -lssl -Wl,--end-group -o user_main
/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: user_main section `.text' will not fit in region `iram1_0_seg'
/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 3641 bytes
collect2: error: ld returned 1 exit status


The code:
Code: Select all#include <osapi.h>
#include <eagle_soc.h>
#include <at_custom.h>

void ICACHE_FLASH_ATTR user_init(void)
{
        uart_div_modify(0, UART_CLK_FREQ / 115200);
        os_delay_us(1000);

        at_init();
        at_port_print("\r\nAT module initialized\r\n");
}


Thank you in advance.