clarification on software

Andrea
Posts: 2
Joined: Sat Nov 26, 2016 9:14 pm

clarification on software

Postby Andrea » Sat Nov 26, 2016 9:40 pm

Hi,
I' m Andrea and I'm new on this forum.
I've got a question:
Could someone give me some clarification on SDK and it's build?
I've tried AIThinker, NodeMCU, Mongoose, all with success about flash, now I want try to build my fw but I find more than one system for build and flash.
I find some difference between where to compile, how to compile, where flash, how flash, few indication on how to build user_main and which library and how to use it.
I know that someone could say: google, or study! , but a lot of tutorial take for granted some Information.
I've read all Espressif PDF tutorial, starting , ecc, but it's not always clear,above all how to write first script with a uart response.
Probably it's my fault or I've not understand all, but if someone could give me some link or some indication to understand better I will be truly grateful.
Thanks in advance
Andrea

pratik

Re: clarification on software

Postby pratik » Sun Nov 27, 2016 1:20 pm

Hi!
It would be nice if you could state your experience with embedded systems. That will help explain better.

I will explain a little in simple terms about how to get started. :)
Firstly, use the Espressif nonOS SDK if you are not comfortable with FreeRTOS. If you like FreeRTOS, you can use the RTOS SDK.
In nonOS SDK... as the name suggests, there is no operating system involved. This means that your programming will be simply as you would code in classical C code with your main routine, "int main (void)".

The execution process for nonOS SDK is like this, in extremely simple terms:
1. ESP8266 powers on... it boots from flash memory if it is not set to programming mode.
2. On booting, the ESP8266 executes some internal SDK code to initialize WiFi, etc.
3. Now the function user_init is executed from user_main.c. This is equivalent to "main" routine of any simple C program.
4. You can call other functions, etc from user_init

If you write
os_printf("Testing!\n");
in user_init() and compile... it will print this once! So it is simple to code applications. Let me know if you have any specific queries.
Here is how you can start by compiling an example program:
http://iot-bits.com/articles/building-e ... dk-v-2-0-0

Once you compile this successfully... 50% problems solved! All you need to do after that is... modify the example program (don't create a new one). And use the Lubuntu image provided by Espressif. :)

Andrea
Posts: 2
Joined: Sat Nov 26, 2016 9:14 pm

Re: clarification on software

Postby Andrea » Thu Dec 08, 2016 1:54 am

Hi Pratik , thank you for your answer and sorry for my late!

My experience with esp8266 started with ESP-01 with AI-Thinker sw when the module entered in IoT scene .
After that ,I had work for a long with lua sw and at the same time with smart.js( now mongoose iot).
AT the end I have choose the last one as it is more supported and for the use of JavaScript .
Now it's time to develop my system (!) and I want to try to build from 0.
I had have some result with RTOS_SDK and I never tried the NON-RTOS .
I work with ubuntu and I flash with python esptool.

My specific problem was understand the difference between the different sdk compiling mode ( esp-open-sdk, RTOS, ecc).
I have read your link and I clarified some things about error ( thanks) .
Now it's time to work on!
Thanks!!
Andrea

pratik

Re: clarification on software

Postby pratik » Sun Dec 11, 2016 12:20 pm

The nonOS SDK does not use an RTOS. And RTOS SDK does, that is the major difference.
And for compiling modes, you have to select things based on what parameters your system is based on. For example, the SPI speed you want, SPI flash mode, or which version of boot file you are using will determine the boot setting during compilation.

Also, there will be a FOTA mode and a non-FOTA mode.
The FOTA mode uses user1.bin and user2.bin (optional) files. This allows updates over Wi-Fi (You can read more on ESP8266 page of Espressif.com). The other non-FOTA version does not allow updates over Wi-Fi.

Tom83
Posts: 3
Joined: Fri Jan 13, 2023 1:08 am

Re: clarification on software

Postby Tom83 » Fri Jan 13, 2023 1:13 am

You can also see try this Mongoose tutorial which runs through on how to implement a very simple http-server and an http-client running on an ESP8266 board: https://mongoose.ws/tutorials/esp8266/http-client-server/

Who is online

Users browsing this forum: No registered users and 186 guests