Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By chandan2002x
#4748 @Bananis,
Its my minimal effort, you did the great part actually.
The AT+THINGSPEAK is really an interesting command I have added. What is actually does :
to communicate and send data to thingspeak IOT portal, the following commands need to send sequentially
1. AT+CIPSTART="TCP","184.106.153.149",80 [184.106.153.149" is the THINGSPEAK IP and 80 is the port]]
2. AT+CIPSEND=XX [XX is the length of data that to be sent in next statement as data]
3. after getting ">", we need to send the data as
GET /update?key=[THINGSPEAK_KEY]&field1=Y\r\n [where Y is a variable size or length of data]

The command will all job sequentially and internally without failure (almost!!)
There is the data I am transferring from my office space
https://thingspeak.com/channels/19285
And this is the link thorough which I am transfering data from my home [Data may be interrupted as my WLAN may needed to login periodically]:
https://thingspeak.com/channels/18190
However, as a core controller, I am using a PIC controller (which may not require after some weeks :))

@alonewolfx2,
I wish, I could. But it is really in very dirty shape as I have many many extra functions. I shall try to trim it as per needed. But you may please ask your quarries, I shall try to answer if I can with my limited knowledge [Please follow below why I am saying the present code condition is very dirty]

However, I am working with a new functionality. I feel, IOT SDK is slightly over-informed, and tremendously strong which may not be easy to digest. Hence, trying to grab it by parts. I am implementing a feature on AT SDK and something like:
1. ESP will start and start the server itself with predefined configuration [ AT+CWMODE=1;AT+CIPMUX=1;AT+CIPSERVER=1,9999; AT+CIPSTO=300)
2. Any client will just connect to it and send the custom command (AT+GPIOC=13,1) to switch ON the GPIO-13 or (AT+GPIOC=13,0) to switch OFF GPIO-13.
It will be just AT command through Client (instead of UART). And the server (ESP module) will reply back the result also over network.
3. The Server (ESP module) should be configured through network.

It is working fine as of now (a complex sequence of commands). But I am in dilemma of getting the Server (ESP module) IP [which was assigned by WiFi router if DHCP ON] from the client which is just another client in the WLAN.
As of now, I have following options to find the Server:
1. An ARP command and to map with MAC of the required or known server (ESP module)
2. Fix the Server-IP (ESP module) which is eventually just a client (in WLAN infrastructure view point) by disabling DHCP. But this may not work as the network may not be same and if the firmware is used in different place with different IP-addressing structure.

Lets see. I am behind this wild chip.
User avatar
By Bananis
#4751 @Chandan, many thanks, but all credits should go to mamalala, molyfab and other great people on this forum for the makefile and the toolchain. I just added a few features to the makefile and did the server update part.

The attached files are my working directory with a basic cloud update AT code based on SDK 0.9.3 set to pick user1.bin and user2.bin from my local ip (192.168.0.178). See my previous post on how to modify the code to use your server IP, or even better, use Chandans code above to make it generic.

Also attached is the wwwroot with the relevant aspx file serving out the files. The local copies of user1.bin and user2.bin in inetpub\wwwroot\v1\device\rom need to be replaced with soft links to the files generated in the /firmware directory by make.

I use the custom toolchain under MinGW64/Msys and a modified version of the smart makefile from this forum. The makefile paths need to be updated ofcause to correspond to your directory structure. The folder "xtensa-lx106-elf" is empty in the attached archieve and need to be replaced with the toolchain by Molyfab graciously made available here https://drive.google.com/folderview?id=0BzWyTGWIwcYQendHbWlsNUZpX0E&usp=drive_web

/Bananis
You do not have the required permissions to view the files attached to this post.
User avatar
By Bananis
#4819 Here is the cloud update makefile to use with Cherts Eclipse IDE DevKit recently posted on this forum.

I also changed it to copy the user1.bin and user2.bin files to inetpub\wwwroot\v1\device\rom to avoid the dodgy link issue and to enable multiple projects to post bin files for downloading. The flash target can be used for first time download via the serial protocol. After that the AT+CIUPDATE command will fetch the code from the local web server specicfied in the code.

Also including an Eclipse version of AT v0.20 based on SDK 0.9.3 that will update code from 192.168.0.178.

/Bananis
You do not have the required permissions to view the files attached to this post.
User avatar
By MarekB
#5180 Hi Bananis,
Can you please confirm these steps because I am not completely sure about them:

1. update firmware to v0.9.2.2 AT Firmware.bin (from https://drive.google.com/folderview?id=0B3dUKfqzZnlwR2pVWjg3NXRVdW8&usp=drive_web&tid=0B3dUKfqzZnlwRjFaNTUzZFptbzg#list - ESP8266_AT_V00180902_02_baudrate watchdog added.zip, this should have the the cloud update included)

2. Do the changes you outlined in your first post to AT source code

3. set up your local web server

4. use makefile from one of your last posts and run make, it should generate 8 files (0x00000.bin, 0x010000.bin, 0x11000.bin, 0x40000.bin, 0x41000.bin, 0x51000.bin, User1.bin, User2.bin) in the firmware folder

5. upload firmware via UART with esptool-py.py -p COM4 write_flash 0x00000 c:\Espressif\esp_iot_sdk_v0.9.3\bin\boot_v1.1.bin 0x01000 firmware/user1.bin 0x7e000 c:\Espressif\esp_iot_sdk_v0.9.3\bin\blank.bin (that's the flash command I found in the makefile, not sure if that is correct)

6. unplug GPIO0, reset, connect to AP (AT+CWJAP), send AT+CIUPDATE

Thanks