-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to nonos SDK 3.10 #212
Comments
I'm using RBOOT, too. The project esp_nano_httpd_fota can be an alternative to RBOOT. |
I haven't seen a v3.1 in the wild yet. Pointer? |
Github- it’s there and updated today.
From: Marcel Stör [mailto:[email protected]]
Sent: 21 February 2019 15:58
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Author <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
I haven't seen a v3.1 in the wild yet. Pointer?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgzYgqG00n3n8PLz-pGL-1CaHJqxqks5vPsIVgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUg_W8gdnl6j0WZa_0CcYmK86Legx6ks5vPsIVgaJpZM4bHaSu.gif>
|
Never mind, I thought you were referring to an official release. Seems you just mean the latest commit on master - which was first labeled as v3.1 on Jan 2nd. |
I don’t know the difference, I assumed if it’s on GIT it is official.
From: Marcel Stör [mailto:[email protected]]
Sent: 21 February 2019 16:20
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Author <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
Never mind, I thought you were referring to an official release. Seems you just mean the latest commit on master - which was first labeled as v3.1 on Jan 2nd.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUg3u1SpvwfcVFVNLMap9EMV3beryPks5vPsdDgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUgz8FsD29HC2cZPFBrGNT9DFczf0oks5vPsdDgaJpZM4bHaSu.gif>
|
I've been using latest since it came out - for me moving to the partition table model was only a minor hassle in terms of updating my code and my Makefile, but there are several things I have noticed that are quite cool:
Truth be told, these things were explicit before, but they were all defined solely in my makefile, and I had separate definitions for the various flash sizes I had to deal with. It's now laid out in my code, and automatically calculated from a single flash size define passed in during the build. I use additional macro directives in the code to output information about where to flash the various items, but these are also in my makefile My code is now pretty much independent of the makefile settings |
That’s nice, Davy but in all this time I still have little clue how the make file works, never mind partition tables. What I have works all the way up to SDK 2.1 – I’m not a Linux programmer so some of that remains beyond me. I don’t know where to start changing the make file.
From: davydnorris [mailto:[email protected]]
Sent: 21 February 2019 22:34
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Author <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
I've been using latest since it came out - for me moving to the partition table model was only a minor hassle in terms of updating my code and my Makefile, but there are several things I have noticed that are quite cool:
* my flash map is now explicit. I can say exactly how much room my user flash is allowed and can check at build and OTA update time
* my SSL certificate locations are also explicit and I now use the partition table functions to locate them when needed
* my user data partition is explicitly defined as well
Truth be told, these things were explicit before, but they were all defined solely in my makefile, and I had separate definitions for the various flash sizes I had to deal with. It's now laid out in my code, and automatically calculated from a single flash size define passed in during the build. I use additional macro directives in the code to output information about where to flash the various items, but these are also in my makefile
My code is now pretty much independent of the makefile settings
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgyUnjw1I8k6HaTO9NWgpGV0ky5xTks5vPx7mgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUg4PvA8-jiSTToIWJBwyk3ayfiqJ2ks5vPx7mgaJpZM4bHaSu.gif>
|
While I think it's important to actually understand the partition table, which is really very simple- it's just a short list mapping addresses to various sectors of flash needed by the SDK- I can see it being a little confusing if you don't already have these locations defined in your project. For a 4MB ESP8266 (eg ESP-12E) and rBoot with 512KB roms, all you have to do is, in #define SDK_RF_CAL_ADDR 0x3FB000
#define SDK_PHY_DATA_ADDR 0x3FC000
#define SDK_PARAM_ADDR 0x3FD000
#define SPI_FLASH_SIZE_MAP FLASH_SIZE_32M_MAP_512_512 // 4
#define SDK_PRIV_PARAM_ADDR 0x7C000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM SYSTEM_PARTITION_CUSTOMER_BEGIN
static const partition_item_t p_table[] = {
{ SYSTEM_PARTITION_BOOTLOADER, 0x0, 0x1000 },
{ SYSTEM_PARTITION_RF_CAL, SDK_RF_CAL_ADDR, 0x1000 },
{ SYSTEM_PARTITION_PHY_DATA, SDK_PHY_DATA_ADDR, 0x1000 },
{ SYSTEM_PARTITION_SYSTEM_PARAMETER, SDK_PARAM_ADDR, 0x3000 },
{ SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM, SDK_PRIV_PARAM_ADDR, 0x1000 },
};
void user_pre_init(void)
{
if(!system_partition_table_regist(p_table, sizeof(p_table)/sizeof(p_table[0]), SPI_FLASH_SIZE_MAP)) {
os_printf("system_partition_table_regist fail\r\n");
while(1);
}
} |
Actually @someburner, there are a few things you would need to change:
and you also need to include the actual code partitions in this list, which for an OTA enabled 4MB 512k system would start at 0x002000 an 0x082000 (0x2000 higher than the base OTA due to rBoot), and would be 512k in size, minus 2k for rBoot and minus whatever size needed for your system or your own parameters, whichever is larger. In this case let's assume the system parameters are largest size at 1+1+3=5k, so our max OTA partition size is 0x80000 - 0x002000 - 0x005000 = 0x079000
|
Good catch re: rBoot size. Although technically the rboot binary only takes a single sector, the 2nd sector stores configuration. Regarding |
I think you may be right there regarding the rBoot OTA approach. I don't know if there's any way you can specify that info for rBoot (I seem to remember seeing something similar though). I've found having the explicit OTA partition size has saved me once already when I accidentally set up an OTA flash built for a 1M partition for a set of devices that were configured as 512k |
Ok, now take it easy with me…. can I use that as below- assuming again 4MB ESP8266 and my code is somewhat OVER 512k…
From: Jeff Hufford [mailto:[email protected]]
Sent: 22 February 2019 00:20
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Author <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
While I think it's important to actually understand the partition table, which is really very simple- it's just a short list mapping addresses to various sectors of flash needed by the SDK- I can see it being a little confusing if you don't already have these locations defined in your project.
For a 4MB ESP8266 (eg ESP-12E) and rBoot with 512KB roms, all you have to do is, in user_main.c, make it look like this:
#define SDK_RF_CAL_ADDR 0x3FB000
#define SDK_PHY_DATA_ADDR 0x3FC000
#define SDK_PARAM_ADDR 0x3FD000
#define SPI_FLASH_SIZE_MAP FLASH_SIZE_32M_MAP_512_512 // 4
#define SDK_PRIV_PARAM_ADDR 0x7C000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM SYSTEM_PARTITION_CUSTOMER_BEGIN
static const partition_item_t p_table[] = {
{ SYSTEM_PARTITION_BOOTLOADER, 0x0, 0x1000 },
{ SYSTEM_PARTITION_RF_CAL, SDK_RF_CAL_ADDR, 0x1000 },
{ SYSTEM_PARTITION_PHY_DATA, SDK_PHY_DATA_ADDR, 0x1000 },
{ SYSTEM_PARTITION_SYSTEM_PARAMETER, SDK_PARAM_ADDR, 0x3000 },
{ SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM, SDK_PRIV_PARAM_ADDR, 0x1000 },
};
void user_pre_init(void)
{
if(!system_partition_table_regist(p_table, sizeof(p_table)/sizeof(p_table[0]), SPI_FLASH_SIZE_MAP)) {
os_printf("system_partition_table_regist fail\r\n");
while(1);
}
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgzGQcnSVCXnlB2o_CxXilRWB_8Qaks5vPzfJgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUg3xfqIs1cpEZxKtmB_xQjuOcNRTIks5vPzfJgaJpZM4bHaSu.gif>
|
Which is the correct version - assuming 4MB ESP12 and roms that are in between 512k and 1 meg each... I think I'm up to 700k.??? Your feedback, guys, is MOST appreciated... so that's it? a change to user_main.c? I can feel success is almost within my grasp... |
If you look in the SDK's #define SPI_FLASH_SIZE_MAP FLASH_SIZE_32M_MAP_1024_1024 and you'd also want to change the #define SDK_PRIV_PARAM_ADDR 0xFC000 |
NICE - but I had a feeling it would not be THAT simple - so - I added the code above, adjusted for 1 meg roms - and upgraded to the SDK here in GIT. NOPE. In SDK 2.1 I get Sections: As you can see above compilation works in 2.1 and I still have .text room to go. Using the new SDK 3.1 - with the additional info as advised above, I get all the way to the end of the compilation then the dreaded error - c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: build/app_0.out section Just as I've had with previous attempts to upgrade the SDK. Ideas, anyone??? |
One more change to the above - I changed the bootloader size to 0x2000 as davydnorris pointed out... made no difference - same ".text will nor fit into region iram1_0_seg" error. |
I am happy to take a look at your project @scargill and see if I can get it to fit? |
Here it is: https://bitbucket.org/scargill/esp-go/src/master/ - this one is up to date -- works with SDK 2.1 - the new info in user_main.c is commented out as it prevents compiling for 2.1 - the main make file is in the outer directory - simply called MAKEFILE - th emain file which calls others is /user/petes_code.c The project is written in C, not using Arduino.... and originally emanated from an MQTT demo and now conrtols a range of peripherals by serial of MQTT. I'm in the process of adding more fonts. Pete |
OK I've pulled the code and had a bit of a go - had to fiddle a lot with the Makefile, and pull down esptool2 and make that as well, and play with your python script to make Python 3.7 like it, and then I started building... By default I turn on all warnings and there's a lot to fix - lots of implicit function declarations, which can make the code not optimise very well, and a bunch of other dodgy assignments to and from int32 and pointers. I'll have a bit more of a play but it's taken a chunk of my time already. |
Thank you so much for your efforts… sorry about esptool2. I use Python 2.7 – never thought about someone not having that.
The idea here is not to worry too much about making my code more efficient – but finding out why it fits into sdk 2.1 and nor 3.1 – Espressif are supposed to have done some optimisations, putting more of their library in FLASH. If I end up with less, not more room then there is no point in upgrading the SDK – I was hoping to get past the IRAM issue and get more space for expansion.
Regards
Pete
From: davydnorris [mailto:[email protected]]
Sent: 24 February 2019 14:22
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Mention <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
OK I've pulled the code and had a bit of a go - had to fiddle a lot with the Makefile, and pull down esptool2 and make that as well, and play with your python script to make Python 3.7 like it, and then I started building...
By default I turn on all warnings and there's a lot to fix - lots of implicit function declarations, which can make the code not optimise very well, and a bunch of other dodgy assignments to and from int32 and pointers. I'll have a bit more of a play but it's taken a chunk of my time already.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgzEOiLiO6FvJ2WcDucdV6PrPxeyAks5vQqAFgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUg5aJZJ2D7s3NblA0z5zYlzHBvyydks5vQqAFgaJpZM4bHaSu.gif>
|
I had to change it just to get it to compile - trying not to change anything at all if I can help it. One thing I am doing is pulling the espmissingincludes.h header as they have fixed all that up now. But the rest is just missing headers and definitions. I also have to get used to rBoot and its link map too |
Hi. |
Even with new partition data and pre init I've still not managed a
successful compile higher than sdk 2.1
…On 28 February 2019 14:01:17 Fernando Vilmar Palha ***@***.***> wrote:
Hi.
Someone have a simple example with rboot in SKD 3.1.0 ?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I compiled in SDK 3.1.0 after add the code:
But my code does not run after burn the ESP8266. |
Doesn’t work??? Not a lot of point in copying that, then? Mine is slightly different anyway as my code sdoesn’t fit in 521k, I’m up to about 800k…
If you get it to work, please do let me know.
From: Fernando Vilmar Palha [mailto:[email protected]]
Sent: 28 February 2019 16:52
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Mention <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
I compiled in SDK 3.1.0 after add the code:
#include "user_interface.h"
#define SDK_RF_CAL_ADDR 0x3FB000
#define SDK_PHY_DATA_ADDR 0x3FC000
#define SDK_PARAM_ADDR 0x3FD000
#define SPI_FLASH_SIZE_MAP FLASH_SIZE_32M_MAP_512_512 // 4
#define SDK_PRIV_PARAM_ADDR 0x7C000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM SYSTEM_PARTITION_CUSTOMER_BEGIN
static const partition_item_t p_table[] = {
{ SYSTEM_PARTITION_BOOTLOADER, 0x0, 0x1000 },
{ SYSTEM_PARTITION_RF_CAL, SDK_RF_CAL_ADDR, 0x1000 },
{ SYSTEM_PARTITION_PHY_DATA, SDK_PHY_DATA_ADDR, 0x1000 },
{ SYSTEM_PARTITION_SYSTEM_PARAMETER, SDK_PARAM_ADDR, 0x3000 },
{ SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM, SDK_PRIV_PARAM_ADDR, 0x1000 },
};
void user_pre_init(void)
{
if(!system_partition_table_regist(p_table, sizeof(p_table)/sizeof(p_table[0]), SPI_FLASH_SIZE_MAP)) {
os_printf("system_partition_table_regist fail\r\n");
while(1);
}
}
But my code does not run after burn the ESP8266.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgyqxeC4eUG1nwq3fYnylmId2PiHWks5vSAlJgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUgxs3rQVEItMcvci4m985dEJKLWXJks5vSAlJgaJpZM4bHaSu.gif>
|
@davydnorris and @someburner , can you share the Makefile and the main file of the project than works with rBoot in SDK 3.1.0 ? I do not understand why the rom does not run. Thank you. |
The latest (not officially released) commits from the SDK (master/HEAD) free up a LOT of IRAM. Definitely worth a try. If you're using rboot, I don't think it's wise to mark it's flash regions as "well-known" SDK partition, like OTA_1 and OTA_2 etc. The SDK code will make assumptions about it, which may not hold. RBOOT is not the same as the SDK OTA mechanism. This is my partition table (for use with either rboot or without), as an example for use with rboot:
The actual values are supplied from the Makefile using -D... |
Eriksl - you have me confused - up to now I've ben working on the asumption that this was required and nothing else. Clealry below is not QUITE right as it won't compile - the usual "won't fit IRAM" message. but now you've introduced something called partition_items[] - care to elaborate for non-Linux tpyes like me?
|
That's the name of the array!? In your example it is called p_table. BTW, have you tried ditching rboot completely? |
I would not know whwre to start ditching RBOOT and the learing curve would detract from what I’m actually making with all of this. RBOOT has worked perfectly for a long time.
So do I take it you can call the array anything…. Indicating that pre-init is the only place that refers to it by name?
From: kriegste [mailto:[email protected]]
Sent: 03 March 2019 20:11
To: espressif/ESP8266_NONOS_SDK <[email protected]>
Cc: Peter Scargill <[email protected]>; Mention <[email protected]>
Subject: Re: [espressif/ESP8266_NONOS_SDK] Upgrading to nonos SDK 3.10 (#212)
That's the name of the array!? In your example it is called p_table.
BTW, have you tried ditching rboot completely?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#212 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABzUgyCIvPpCy0iOJoKBw4K2TUx6z6NAks5vTCxpgaJpZM4bHaSu> . <https://github.com/notifications/beacon/ABzUg5hnj5EMK5i0OJFhF0fd3bMXeIjhks5vTCxpgaJpZM4bHaSu.gif>
|
BTW I also have a script in the makefile to produce a top-X of IRAM using source files (unfortunately not on function level). I appears, I see now, to only work when link time optimisation is off, otherwise all subsections are renamed to .ltrans.ltrans.o which isn't at all that informative. Interest? |
+1. And best try to keep it that way. I ended up with just 3-4 functions from libc being used. Some of them I could implement myself very easily and some of them I just copied the source from a "light" version, e.g. from BSD. The versions from libc are always huge and bloated (due to a.o. locale and backward compatibility), so they fill up IRAM or IROM (when using libcirom) quite easily. That's a real good place to start optimising IRAM.
SoftUART? Something like an emulator? Or a bit-banging software implementation? While there are two hardware UARTs?
I think the same goes for libm ;-) I am using powf because I can't replace it (I need to calculate "something" to the power 1.2, quite hard to emulate). The powf function does not end iup in IRAM so I think Espressif or the esp-open-sdk / crosstool-ng already take care of that? |
Talking of strings. Very soon after I started with the ESP8266 I realised there is so much memory (I came from ATmel ATmega with just 2kbytes of RAM), which is nice, but also means it should be used sensibly and, more important, using char arrays as strings will open up the same traps we all know have fell into more than once. So I created a struct called "string_t" which includes the size of the string, the current length of the string and a pointer to the actual storage. This it can hold anything and is not limited to zero-terminated data. And then I made quite a few string manipulating functions, all in IROM of course. It's a bit like the C++ std::string class. That way you can be sure you won't be bitten by buffer overflows, never. As a nice side-effect I had to make my own string-to-numeric and v.v. functions which are very lightweight and do not rely on Espressif code (important to me). So I don't need strto(u)l etc. or str(n)cat etc. Also I tried using pvPortMalloc and pvPortFree (aka os_malloc and os_free) one time and very quickly reverted it. I got all sorts of random memory corruption, while having been using malloc() and free() on Unix for about 25 years, so I do grasp the concept ;-) So now I just allocate everything as static and that works well. Some large blocks of memory I re-use internally, no need to alloc-free-alloc-free there, with risk on fragmentation. |
Yeah I have rolled my own fixed point routines for everything I need. You can also do a fixed point version of powf pretty easily, and for your case powf(x,1.2) = x * powf(x, 0.2) and that last term will converge very quickly as a series. I have completely removed any floating point from my code - all the data from sensors is fixed point so I just work with it as fixed point. Initially I started by reporting the data up to my platform as floating point strings, but now I have adopted the approach used by IIO and have defined each measurement as a channel, and the channel definition describes the size, precision, and divisor for each value. I then send a 1-8 byte value depending on the size, and the platform uses the the device metadata to do the conversion. I can also just send the processed floating point string data if required. I've also abstracted the sensors from the devices, and have built a bus/driver/device framework similar to IIO/Linux Kernel drivers so that I can quickly swap in boards with more or less sensor chips, or upgraded sensor chips, and the sensors adapt to the new devices automatically. All I do is add new driver code for new devices as needed |
That's very cool. I have #define'd all my strings and I do a lot of string concatenation in the define itself. Then I use the optimised os_printf, and I've done same for os_sprintf as well so all the strings automatically get turned into RO data. I do use the os_*alloc functions all the time though and I haven't had any problems that weren't of my own creation :-). One thing I have just recently done is to go through all my functions that are part of any callback chains, and juggled things around so I use as few function local variables as possible (to minimise stack), and release/dispose of as much as I can before calling the callback. I've found this to be a very valuable exercise in helping manage memory and stack |
Hi. Please @scargill, do you resolved the problem? Your code does not use the "partition_item_t". Thank you. |
Takes me back to maths classes a long time ago :-) I don't see the harm in using floating point. On my ATmel ATmega I wouldn't dream of it, takes too much RAM and too much cpu cycles, but the lx106 seems to have no problem with it whatsoever. So I gave in here. Great advantage of floating point is that you can put in very large and very small values, it always fits. Or more important, you don't have to worry about intermediate values overflowing (or underflowing) the end result.
I opted for a simple text based interface, very easy to debug. It now supports 29 distinct I2C sensors. That's all I can find on eBay ;-) If anyone has suggestions for sensors that have an I2C interface, are affordable and can be hand-soldered (i.e. DIP or break-out) I am interested. It looks like this (that's one of 12 ESP8266's in/around my house):
|
I wanted to see a single code working with rboot in SDK 3.1.0. |
Maybe it was a bug that has been resolved now. Anywyway, if we're this tight on memory, I don't like to waste it with a scheme that will cause fragmentation.
I don't think you need to be that careful using the stack. I've tried and tried to get information about the stack from Espressif, but no answer. So I made my own stack painting mechanism and found out that there is no less than 5 kb (!) stack space. Of that 5 kb, my code uses 2500 bytes at max, and I am not using stack sparingly (exactly to prevent having to use os_malloc/os_free). I absolutely loathe #define so you won't them much in my code. Almost all strings go into flash automatically using this construct, which looks somewhat ugly but makes great code in the program itself:
And then you can simply do Last summer someone said that os_printf (which now points to os_printf_plus or something like that) could handle strings from flash. I tried it (ets_vsnprintf, in my case) and immediately got an alignment exception on the first try. So I stayed with my own "solution", copying the format string to DRAM and then calling ets_vsnprintf to do the real work. The ets_vsnprintf function is pretty complete but sadly does not understand floating point numbers. |
Yes, for example my "esp8266-universial-io-bridge", here: https://github.com/eriksl/esp8266-universal-io-bridge rboot combined with NONOS SDK git HEAD. It's really simple if you follow the advice I gave here and in other threads as well. |
Thank you @eriksl. |
That's very weird because I set |
Yeah, weird. But no big deal, because I have my own string infrastructure anyway, I don't need to use it. Almost all of my strings are already in flash. And as said, I don't trust code from Espressif anyway. Most of it is closed and whatever is not closed, makes me shiver. See for example the I2C code. Next project is trying to ditch the espconnect code and call lwip directly. That doesn't seem exactly that easy though, documentation about the lwip api is very sparse. |
I have not (yet) been agreed to add a subforum for "us" on esp8266.com, let's wait a while and see. In the meantime I have a few questions about LWIP that may be interesting to others as well. IIRC @davydnorris has become quite knowledgeable about the topic, maybe others too. Can you please visit https://www.esp8266.com/viewtopic.php?f=6&t=19428 and check my questions? |
|
That's using espconn emulation. I just finished ditching epsconn :-) |
espconn uses lwIP(v1, v2), not the opposite way :) |
Yes I know... You're referring (afaik) to a project where lwip is replaced and an espconn emulation layer is added to be able to keep using espconn in the application. I don't need that, I only want a newer lwip and compile it myself. |
In that project, full lwIP is replaced by the newest available version. You have to compile it yourself. espconn (which is probably an espressif version of lwIP's netconn) has just been ported to it for those who need it. |
I'll have a look. It's not a trivial task to add an external LWIP version, especially another version, because of the Espressif hooks in it for the ESP8266 wlan interface. They didn't always follow the standard low-level LWIP device interface, it seems. So that's why I am a bit careful. The espconn code is, as far as I'm am concerned, a misguided attempt to cover up that they we're using lwip. It came out very soon and after that, Espressif gave up the secrecy and also most of the support for this interface. |
Please @eriksl, can you help me? I changed the main.c, but does not work yet. |
I am so totally not an expert on lwIP! @d-a-v is the genius here big time, not me. But I am very interested in using the latest lwIP and it's in my list of things to do after I push my release. Right now I just want to be able to change or add to DNS routines to allow me to get the TTL of a query as part of the result. I've implemented a DNS cache that survives deep sleep by using RTC storage and I'm just guessing at the TTL for my entries, which can be dangerous, especially for Cloud based back ends where the IP may change a lot. |
Tell me about it!
Well that makes lots of me, thanks but this isn't true. Work is in progress for esp-open-sdk (and hopefully nonos-sdk). |
Hi guys, the "advanced developer" subforum has been honoured! Can we continue the talk there? https://www.esp8266.com/viewforum.php?f=166 I have many questions regarding lwip and I don't think it takes an expert to answer some of them, at least I already very curious about all of your experiences, either succesful or unsuccessful. |
What does the UART output say? |
File main.c
Console: picocom 74880 /dev/ttyUSB0
|
Isn't FLASH_SIZE_32M_MAP_512_512 a bit small for 0xF0000 images? |
I changed the Makefile (6 to 4).
and:
Now, the ESP is working. |
main.c
Makefile
Console: picocom 74880 /dev/ttyUSB0
Everything is working. Thank you @kriegste. |
I've not upgraded since NONOS SDK 2.1 due to not enough IRAM in later versions. I use RBOOT by Richard Burton - virtually all my functions are in Flash - my code works perfectly in SDK 2.1 - . I've not kept up with the need to define a partition table. Does the latest version (today - 21/02/2019) free up more space and do the docs now simply explain partition table information?
The text was updated successfully, but these errors were encountered: