Forum > Embedded

ESP8266 Compiling with xtensa-freertos

<< < (6/7) > >>

ccrause:

--- Quote from: af0815 on January 08, 2022, 04:36:53 pm ---According https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html#get-started-get-esp-idf it is cloned from git and in ESP8266_RTOS_SDK/make/version.mkit is coded as

--- Quote ---IDF_VERSION_MAJOR := 4
IDF_VERSION_MINOR := 0
IDF_VERSION_PATCH := 0
--- End quote ---
this is IMHO 4.0.

This is not a standard parameter of fpcupdeluxe.

Edit:
If it is not the absolute latest version of FPC, it can be my fault. I have fight against the wrong detection of the tollset at building the cross compiler, so it can be the basic fpc is few days old. I am correcting this yet.

--- Quote ---fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC was at revision/hash: 3.3.1-9835-g3cf00af48d
fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC is now at revision/hash: 3.3.1-9884-g307c284f6a

--- End quote ---

--- End quote ---

OK, seems like you are on the trunk version of esp8266-rtos-sdk which is not tested with fpc to check the build requirements. Using - WP4.0 in fpc should then fall back to the v3. 4 SDK settings.

af0815:
This is the 'official' way of installing the sdk according the website.

ccrause:

--- Quote from: af0815 on January 08, 2022, 07:30:45 pm ---This is the 'official' way of installing the sdk according the website.

--- End quote ---
Yes, I see. The problem is that the current esp8266 Get Started link results in installing the latest master branch, which is updated weekly.  This presents a shifting support target, my preference would be to only support release versions.  But this doesn't appear to be the cause of your compilation problems.

ccrause:

--- Quote from: af0815 on January 08, 2022, 02:14:52 pm ---compiling with windows: i patched fpcupdeluxe to work with the correct tools and adapted the fpc.cfg for the correct type. And build the crosscompiler. this well done (says fpcupdeluxe)

Now i use the following script to make the steps more transparent

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---@echo onset IDF_PATH=D:\data\msys32\home\andi\esp\ESP8266_RTOS_SDKcd D:\data\lazdev\xtensa\projects\helloworldD:\data\lazdev\xtensa\fpc\bin\i386-win32\ppcrossxtensa -sh -Furtl/units/xtensa-freertos/ -Tfreertos -XPxtensa-lx106-elf- -O- -Wpesp8266 -WP4.0 HelloWorld2.lpr -FlD:\data\msys32\home\andi\esp\xtensa-lx106-elf-libs -FlD:\data\msys32\home\andi\esp\ESP8266_RTOS_SDK\components/esp8266/lib -FED:\data\lazdev\xtensa\projects\helloworldpause after this i get a ppas.bat. if i start this i get

--- Quote ---Assembling helloworld2
Linking D:\data\lazdev\xtensa\projects\helloworld\HelloWorld2
D:\data\xtensa-lx106-elf\bin\xtensa-lx106-elf-ld.exe: cannot find libc_fnano.a
D:\data\xtensa-lx106-elf\bin\xtensa-lx106-elf-ld.exe: cannot find libstdc++.a
An error occurred while linking D:\data\lazdev\xtensa\projects\helloworld\HelloWorld2
Drücken Sie eine beliebige Taste . . .
--- End quote ---
it will correct because c_fnano and libstdc++ are not built for this target.

--- End quote ---

If -WP is larger than 3.3 fpc should load unit esp8266rtos_30400, which only links to libc_nano, not libc_fnano.  Your attached build log does not show a unit esp8266_30300 or esp8266_30400 being build, so something is funny with the version of the cross fpc as downloaded and/or build by fpcupdeluxe. 

Can you verify that esp8266_30300.pp and esp8266_30400.pp do exist in D:/data/lazdev/xtensa/fpcsrc/rtl/freertos/xtensa and also that these units are referenced in /fpcsrc/rtl/freertos/MakeFile?  These changes were implemented in this commit, but was included before commit 307c284f6a which is your latest fpc revision.  So this is a bit puzzling...

Then there remains a problem with locating libstdc++.  In the latest bin tools this library should be located in D:\data\xtensa-lx106-elf\xtensa-lx106-elf\lib, together with libc_nano.  You either have to copy the libraries in this folder to your overall library folder (D:\data\msys32\home\andi\esp\xtensa-lx106-elf-lib) if these libraries are not already there, or add another -FlD:\data\xtensa-lx106-elf\xtensa-lx106-elf\lib statement to your project's compile command to add this path to fpc's library search list.

Disclaimer: I'm translating from Linux paths to what I assume is equivalent to your Windows folder structures, but the exact paths I mention above may not be correct.

af0815:
I have changed to the 3.4 version (with git no problem). And rebuild the example and copy the produced files to xtensa-lx106-elf-libs like int the Xtensa - FPC wiki described

Ok, now the problem with libc_nano and  libstdc++.a are gone.

Actual i have

--- Quote ---Assembling blink
Linking D:\data\lazdev\xtensa\projects\blink\blink
Linking D:\data\lazdev\xtensa\projects\blink\blink
Traceback (most recent call last):
  File "D:\data\msys32\home\andi\esp\ESP8266_RTOS_SDK/components/esptool_py/esptool/esptool.py", line 35, in <module>
    import serial.tools.list_ports as list_ports
ModuleNotFoundError: No module named 'serial'
An error occurred while linking D:\data\lazdev\xtensa\projects\blink\blink
Drücken Sie eine beliebige Taste . . .

--- End quote ---
But this looks python specific problem and i must handle this.

it is a bit tricky :-)

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---python -m pip install --upgrade pippip uninstall serialpip uninstall pyserialpip install pyserial you must first upgrade to the last pip version, then uninstall serial and pyserial, because there is maybe an internal naming conflict, after this you can reinstall pyserial (only)
Now i get a blink.bin
 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version