How to enable AT interface in your programs ?
Posted: Sat Jul 22, 2017 3:39 am
Hello,
I am using esp-open-sdk.
AT commands work for default esp software (or after flashing esp with Espressif bin files).
Each time I overwrite default software with my own programs, the esp does not react to AT commands.
Do You know how to enable AT module in Your own programs ?
Is it possible ?
The Espressif SDK NONOS SDK API documentation says about at_custom.h and at_init(), but it looks like this is for developing custom AT commands.
I do not want to implement any custom AT commands, I just want expose standard functionality via AT commands (connecting to access point etc) in my own programs.
Is calling at_init() the right way to go ?
I tried to verify it on my own, but I am facing following problem.
This is my sketch:
And this is error I get while building:
I am using the same makefile for all my "projects", and it looks for me like I get this problem only when libat.a is used.
Thanks in advance.
I am using esp-open-sdk.
AT commands work for default esp software (or after flashing esp with Espressif bin files).
Each time I overwrite default software with my own programs, the esp does not react to AT commands.
Do You know how to enable AT module in Your own programs ?
Is it possible ?
The Espressif SDK NONOS SDK API documentation says about at_custom.h and at_init(), but it looks like this is for developing custom AT commands.
I do not want to implement any custom AT commands, I just want expose standard functionality via AT commands (connecting to access point etc) in my own programs.
Is calling at_init() the right way to go ?
I tried to verify it on my own, but I am facing following problem.
This is my sketch:
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");
}
And this is error I get while building:
Code: Select all
xtensa-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
<builtin>: recipe for target 'user_main' failed
make: *** [user_main] Error 1
I am using the same makefile for all my "projects", and it looks for me like I get this problem only when libat.a is used.
Thanks in advance.