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

User avatar
By cal
#20890
pvvx wrote:
cal wrote:Do you know if 16k is the smallest block size?
Do you know if that memory is fixed for "code" or can it be used to cache flash as "data", too?
IRAM 4x16k blocks = 64k.
block = Code, R/W, ALIGN(2(?))... https://github.com/pvvx/esp8266web/blob ... ash.c#L274


Yes, I saw that c-version of yours when you posted the link to the source in another thread and noticed that I wanted
to compare your de-compiled with mine.
What you called "DPORT_BASE[3]" I called "CACHE_CTRL" and find that more readable.

Information about
Code: Select allblock = Code, R/W, ALIGN(2(?)

I hoped to find in my de-compilation but can't identify it.
For me it looks like some etch-triggered registers.
Maybe organized in two levels where one register gets set a value
and the second controls what to use if for or.
In extensa CPU world "code" would imply alignment of 2^2 so it may not be present at all.

Hmm now I notice you added 2 comments.
Maybe "DPORT_BASE[3]" / "DPORT_BASE[9]" something like CACHE_CTRL/CACHE_SELECT?

Cal
User avatar
By cal
#21091
pvvx wrote:Full:
UDK: http://esp8266.ru/forum/threads/anonsy- ... sp8266.32/
+ nodemcu: https://github.com/nodemcu/nodemcu-firmware
+ ESP8266 SDK (esp_iot_sdk_v1.1.1_15_06_05): http://bbs.espressif.com/viewtopic.php?f=5&t=554
+ Patch: AddNdMCU111.zip: https://yadi.sk/d/bRhaFIChhEH9Z

Compiled... and ...


I tried to reproduce your build based on nodemcu master and your patch but failed.

I fixed the wrong case of one "Include" dir.

Your information seems to be incomplete because the following symbols are missing:

Code: Select allextern void *strcat(void *p1, void *p2);

void *ets_strcat(void *p1, void *p2) {
   return strcat(p1, p2);
}

void r_rand() {
   *((int*)0x05) = 0xdeadbeaf;
}


You didn't said what you did with original lib files so I replaced the whole lib dir with your patched one and added the SDK libs to library PATH.

Looks like you didn't compiled with sdk 1.1 includes but used the SDK 0.9 ones of nodemcu.
I ignore that.

I am not able to rebuild a firmware to validate that SDK 1.1 was used to some useful degree.

I was able to burn the bin files and got a firmware rebooting constantly as you wrote.
You didn't provide the elf image of those and I didn't want to take the effort to re-elf them before analyzing.

If you provide an elf image of your firmware I would take another look at that but otherwise I don't
see that I can make any use of your stuff.

Cal
User avatar
By pvvx
#21866 https://github.com/pvvx/EspLua SDK1.1.2 + 3 of.Patch (Patch for modem sleep based on SDK_v1.1.2 + Patch for scan issue based on SDK_v1.1.2) http://bbs.espressif.com/viewforum.php?f=5
All modules of NodeMCU + ...
Supported options 48 kbytes IRAM. ( Free RAM : 27784. Free IRam : 4066+16384 = Startup free RAM 48234 bytes :) )
Supported 16Mbytes Flash & ...
Remaking the code is not yet finished... Basic functions are working.

Deb.Log:
SDK version: 1.1.2
Heap size: 27448 bytes.
Found free IRAM: base:0x40107030, size:20432 bytes
Real Flash size: 524288 bytes.
User avatar
By cal
#21870
pvvx wrote:https://github.com/pvvx/EspLua SDK1.1.2 + 3 of.Patch (Patch for modem sleep based on SDK_v1.1.2 + Patch for scan issue based on SDK_v1.1.2) http://bbs.espressif.com/viewforum.php?f=5
All modules of NodeMCU + ...
Supported options 48 kbytes IRAM. ( Free RAM : 27784. Free IRam : 4066+16384 = Startup free RAM 48234 bytes :) )


Moin Victor,

Impressive work.
I was able to build a running firmware with only minor tweaks.

2 small windows related bugs:
Code: Select alldiff --git a/Makefile b/Makefile
index 9abb8cd..f8e21c9 100644
--- a/Makefile
+++ b/Makefile
@@ -204,7 +204,7 @@ progr: all
 ifndef PDIR
        $(MAKE) -C ./app flash
 else
-       $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(FIRMWAREDIR)0x00000.bin 0x0C000 $(FIRMWAREDIR)0x0C000.bin 0x7c000 $(FIRMWAREDIR)esp_init_data_defa
+       $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(FIRMWAREDIR)0x00000.bin 0x0c000 $(FIRMWAREDIR)0x0C000.bin 0x7c000 $(FIRMWAREDIR)esp_init_data_defa
 endif


Code: Select allmv app/main/Include app/main/include


The included esptool command does not work at with my esp01. I used just my standard values and got it burned.

What version of nodemcu did you base your work on?

Cal