Forum > Embedded
Setting up Xtensa-FreeRTOS for ESP8266
botster:
I am trying to set up FPC to use the Xtensa-FreeRTOS for ESP8266 by following the instructions at the Xtensa Wiki page.
I have installed the ESP8266-RTOS-SDK and successfully compiled and executed the hello_world example.
But, I get to the Build FPC section and read, "Change into the fpc directory [..]" What fpc directory? I don't see anywhere in the instructions where I was told to create one.
Reading further, in the Compile and run test program section, I read, "Create a hello world program [...]" How do I do that? Is there an example somewhere? Would it be something as simple as:
--- Code: Pascal [+][-]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";}};} ---program Hello;begin writeln ('Hello, world.');end. ?
Or, how would I translate the FreeRTOS example (main program attached) to FreePascal? Is there an API reference?
Maybe I'm just dense because I find the instructions quite confusing.
ccrause:
--- Quote from: botster on January 04, 2022, 02:46:46 am ---I am trying to set up FPC to use the Xtensa-FreeRTOS for ESP8266 by following the instructions at the Xtensa Wiki page.
I have installed the ESP8266-RTOS-SDK and successfully compiled and executed the hello_world example.
But, I get to the Build FPC section and read, "Change into the fpc directory [..]" What fpc directory? I don't see anywhere in the instructions where I was told to create one.
--- End quote ---
Indeed not clear, I agree. Xtensa is only supported in the development version of fpc, so a recent copy of the main branch is required. See https://www.freepascal.org/develop.html for different ways to get the development version source - I suggest using git as this way updating the source is relatively easy once configured. Or use fpcupdeluxe which automates the whole process of downloading fpc source and building the cross compiler.
--- Quote ---
Reading further, in the Compile and run test program section, I read, "Create a hello world program [...]" How do I do that? Is there an example somewhere? Would it be something as simple as:
--- Code: Pascal [+][-]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";}};} ---program Hello;begin writeln ('Hello, world.');end. ?
--- End quote ---
Yes, as easy as that.
--- Quote ---
Or, how would I translate the FreeRTOS example (main program attached) to FreePascal? Is there an API reference?
Maybe I'm just dense because I find the instructions quite confusing.
--- End quote ---
Some of the SDK has been translated in this project. Have a look at the examples to see what is possible at the moment. Not fully updated, so feel free to post issues against the project.
af0815:
We have here a similar sounding thread https://forum.lazarus.freepascal.org/index.php/topic,57704.msg429396.html#msg429396
Actual i can compile with fpc on Windows 10 but not linking.
Edit:
--- Quote ---Or use fpcupdeluxe which automates the whole process of downloading fpc source and building the cross compiler.
--- End quote ---
fpcupdeluxe load his own (older ?) toolchain and this have some problems with the esp8266. It looks it is more tested for the stm32, not for esp8266. Because it will use the stm32 crosscompiler (lx6) instead of the lx106 crosscompiler.
DonAlfredo:
I can confirm this issue for lx106. Will look into it.
DonAlfredo:
Update.
This issue cannot be resolved for Windows at the moment unfortunately.
Precompiled tools from GitHub are used: https://github.com/michael-ring/espsdk4fpc/releases
And these tools are not available for Windows [yet].
However. It should be possible to install the xtensa tools yourself from the appropriate sources on the Web.
And point FPC to use these tools.
https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/windows-setup.html
Navigation
[0] Message Index
[#] Next page