Compiling rtos sdk idf project with CMake

Deous
Posts: 7
Joined: Thu Feb 14, 2019 8:54 pm

Compiling rtos sdk idf project with CMake

Postby Deous » Fri Feb 15, 2019 12:56 am

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

flynnpayne

Re: Compiling rtos sdk idf project with CMake

Postby flynnpayne » Wed Dec 18, 2019 5:00 pm

How did you fix it?

Deous
Posts: 7
Joined: Thu Feb 14, 2019 8:54 pm

Re: Compiling rtos sdk idf project with CMake

Postby Deous » Tue Mar 03, 2020 11:33 pm

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

mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

Re: Compiling rtos sdk idf project with CMake

Postby mriksman » Wed Mar 11, 2020 4:13 pm

So you managed to set up a CMake system that can compile code to ESP8266 RTOS SDK and ESP-IDF (ESP32) devices? Same code?

Deous
Posts: 7
Joined: Thu Feb 14, 2019 8:54 pm

Re: Compiling rtos sdk idf project with CMake

Postby Deous » Fri Mar 13, 2020 11:31 pm

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.

mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

Re: Compiling rtos sdk idf project with CMake

Postby mriksman » Fri Mar 13, 2020 11:41 pm

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!

Deous
Posts: 7
Joined: Thu Feb 14, 2019 8:54 pm

Re: Compiling rtos sdk idf project with CMake

Postby Deous » Sun Mar 15, 2020 3:47 am

Which version of IDF did you use?

mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

Re: Compiling rtos sdk idf project with CMake

Postby mriksman » Sun Mar 15, 2020 1:07 pm

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.

Deous
Posts: 7
Joined: Thu Feb 14, 2019 8:54 pm

Re: Compiling rtos sdk idf project with CMake

Postby Deous » Mon Mar 16, 2020 4:47 am

So you are running idf.py on Python 3+ ?
I was able to use only toolchain 1.0 (Windows 10) with Python 2.7

mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

Re: Compiling rtos sdk idf project with CMake

Postby mriksman » Mon Mar 16, 2020 5:38 am

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?

Who is online

Users browsing this forum: No registered users and 7 guests