Closed xiaodingding closed 4 years ago
@xiaodingding Thanks for reporting the issue. Would you please help provide more details as suggested in the issue template? Thanks.
esp这边修改了gcc toolchains,导致都不是标准的gcc语法,太不标准了。rt-thread最初有过一个版本,但是跟得太累
您好,@BernardXiong
请问能否告知移植 RT-Thread 时遇到了哪些困难,需要我们提供哪些支持?
ESP32 和ARM Cortex M系列的芯片确实有差别(比如支持多种存储器,包括IRAM、Flash等等)
ESP-IDF最新使用的gcc8工具链已经集成了libc的代码(之前gcc5版本还需要依赖IDF中的newlib组件),这或许可以减轻移植esp32到RT-Thread的困难
我的仓库中有个版本:
https://github.com/BernardXiong/rtthread-esp-idf
可以clone下来,以scons + 你们原来工具链的方式试试(Windows/Linux环境都可以)。整体系统,组件,wifi网络都是可以正常工作的。然后你们可以换换不同的工具链(代码不改动),然后就编译错误了
When building with GCC 8.2, we no longer use the newlib header files from $IDF_PATH/components/newlib/include, instead the version of newlib bundled with the toolchain is used. I think you need to remove this one line from Sconscript_idf: https://github.com/BernardXiong/rtthread-esp-idf/blob/c67b3ef4f0b57f8e885bd92043e6240042caafe6/esp-idf-port/SConscript_idf#L135
There are also a few changes to the way the libraries are linked, please check the relevant cmakelists (https://github.com/espressif/esp-idf/blob/39f090a4f1dee4e325f8109d880bf3627034d839/components/newlib/CMakeLists.txt#L19-L28, https://github.com/espressif/esp-idf/blob/39f090a4f1dee4e325f8109d880bf3627034d839/components/newlib/CMakeLists.txt#L54-L58) or GNU Make equivalents (https://github.com/espressif/esp-idf/blob/39f090a4f1dee4e325f8109d880bf3627034d839/components/newlib/component.mk#L3-L23).
@igrr Thank you for your reply. We will try it with latest IDF and RT-Thread.
I'm going to close this since there isn't anything actionable from IDF project side left. @BernardXiong If you run into any other problem, please open a new issue and we will look into it. Thanks!
你好,请问,贵公司有考虑对rtthread 嵌入式系统的支持吗?