Page 1 of 2

Compiling rtos sdk idf project with CMake

Posted: Fri Feb 15, 2019 12:56 am
by Deous
I am not sure if anyone tried that but I was able to compile and flash nodeMCU under Windows 10 using VSC IDE and CMake tools supplied with rtos sdk for esp-idf. Anyways looked good except code does nothing. Blue led is on and that's it.
Any thoughts or advices how to fix it ?
Thanks

Re: Compiling rtos sdk idf project with CMake

Posted: Wed Dec 18, 2019 5:00 pm
by flynnpayne
How did you fix it?

Re: Compiling rtos sdk idf project with CMake

Posted: Tue Mar 03, 2020 11:33 pm
by Deous
OK just to let anybody know - ESP8266_FREERTOS_SDK IDF style can compile esp32 code 8-)
I tested it and works fine. No flash tool needed or Arduino hassle.
I tested esp-01 and esp8285 all works very nice and compiles with CMake
Just download sdk and new toolchain
Cheers

Re: Compiling rtos sdk idf project with CMake

Posted: Wed Mar 11, 2020 4:13 pm
by mriksman
So you managed to set up a CMake system that can compile code to ESP8266 RTOS SDK and ESP-IDF (ESP32) devices? Same code?

Re: Compiling rtos sdk idf project with CMake

Posted: Fri Mar 13, 2020 11:31 pm
by Deous
It is incomplete answer but - YES. You compile code with same idf.py command but you need to switch IDF_PATH to your SDK
The code is not entirely identical but uses same esp-idf style and it is ridiculously easy to modify for esp8266.

Re: Compiling rtos sdk idf project with CMake

Posted: Fri Mar 13, 2020 11:41 pm
by mriksman
Thanks. I finally downloaded both SDKs and Toolchains and configured VSCode. SO much better than PlatformIO (which uses ESP8266 RTOS 1.5). It's great being able to have code that can be (almost) reused on both chips.
The sooner Espressif roll BOTH ESP8266 and ESP32 into a single IDF, the better!

Re: Compiling rtos sdk idf project with CMake

Posted: Sun Mar 15, 2020 3:47 am
by Deous
Which version of IDF did you use?

Re: Compiling rtos sdk idf project with CMake

Posted: Sun Mar 15, 2020 1:07 pm
by mriksman
The master git version.
A `git describe` in the sdk directory shows 3.2-405 for ESP8266 RTOS SDK and 4.2-dev-662 for ESP-IDF.

Re: Compiling rtos sdk idf project with CMake

Posted: Mon Mar 16, 2020 4:47 am
by Deous
So you are running idf.py on Python 3+ ?
I was able to use only toolchain 1.0 (Windows 10) with Python 2.7

Re: Compiling rtos sdk idf project with CMake

Posted: Mon Mar 16, 2020 5:38 am
by mriksman
Windows 10 and Python 3.8 and idf.py works fine. I saw a reference to issues with ESP-IDF and Python 3.x on Espressif’s documents, but so far I haven’t had any issues.
What issues are you facing?