esp-open-sdk
esp-open-sdk copied to clipboard
Add support for vendor SDK 2.2.0/3.0.0
I've added support for Espressif's SDK v2.2.0. I've tested this on Ubuntu 16.04 and 18.04.
Thanks for the patches!
To reply something: Recently, I didn't have a chance to work ESP8266 any longer. This project was always set up in conservative manner, i.e. I personally tested all the changes work as expected before making them the default. It's also my assumption that there're project which rely on such treatment. So:
- Once again, thanks for sharing with the community! Definitely please use your changes, and anyone interested can merge this patchset to get newer SDK versions too. (So, please don't close thsi PR!)
- I however won't be merging it soon, as I don't have resources to test it. I do hope to get back to esp8266 eventually.
If you have any feedback/suggestions, please share it.
@pfalcon could you share how you plan to test those changes? maybe somebody else can fill in the testing bit. It'd be a shame to not have support for the later SDKs which have a nice set of bugfixes and new features.
My default testcase is MicroPython esp8266 port, see e.g. discussion here: https://github.com/micropython/micropython/issues/4295
I tested it on Debian 9, works OK.
git fetch origin pull/344/head
git commit
git checkout -b pullrequest FETCH_HEAD
git submodule update --init
make clean-sdk clean-sysroot all
I'm able to build my project and all works OK.
Not work on Ubuntu 19.10
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=19.10 DISTRIB_CODENAME=eoan DISTRIB_DESCRIPTION="Ubuntu 19.10"
/xxx/Espruino/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function user_uart_wait_tx_fifo_empty': (.irom0.text+0x6b8): undefined reference to
user_pre_init'
/xxx/Espruino/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function flash_data_check': (.irom0.text+0x724): undefined reference to
user_pre_init'
collect2: error: ld returned 1 exit status
make: *** [make/targets/ESP8266.make:62: espruino_esp8266_user1.elf] Error 1
make: *** Waiting for unfinished jobs....
/xxx/Espruino/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function user_uart_wait_tx_fifo_empty': (.irom0.text+0x6b8): undefined reference to
user_pre_init'
/xxx/Espruino/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function flash_data_check': (.irom0.text+0x724): undefined reference to
user_pre_init'
collect2: error: ld returned 1 exit status
make: *** [make/targets/ESP8266.make:70: espruino_esp8266_user2.elf] Error 1
@goodkiller starting from SDK 3.0 user has to initialize partition table inside user_pre_init()
.
So, in your program you have to define user_pre_init()
function, and call system_partition_table_regist(...)
from it. Refer to SDK3.x.x documentation.
Alternately, a fork with the minimal set of changes to get a clean build on Ubuntu 21.10 of an apparently working toolchain can be found here:
https://github.com/pfalcon/esp-open-sdk/pull/391 https://github.com/ChrisMacGregor/esp-open-sdk/tree/builds-on-Ubuntu-21.10 Tarball of built toolchain: https://github.com/ChrisMacGregor/esp-open-sdk/releases/tag/builds-on-Ubuntu-21.10
A maintained fork with more-current versions of things, such as https://github.com/esp-open-sdk/esp-open-sdk or https://github.com/someburner/esp-open-sdk, may be a better option. I'm offering a minimally-tweaked option for those who prefer that, or for comparison purposes if for some reason the newer tools don't work for you, or whatever. If your code doesn't work with either the updated toolchain or the minimally-tweaked one, then the problem is more likely in your code, rather than the toolchain...