cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.48k stars 430 forks source link

esp32-c3 build fails with `unknown CMake command "add_prebuilt_library"` #605

Closed nliviu closed 1 year ago

nliviu commented 1 year ago

After the latest commit as of 22/02/2023 build for esp32c3 fails

CMake Error at /mongoose-os/platforms/esp32xx/esp32xx.cmake:11 (add_prebuilt_library):
  Unknown CMake command "add_prebuilt_library".

It looks like /mongoose-os/platforms/esp32c3/CMakeLists.txt is missing

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
rojer commented 1 year ago

@a2800276 can you check and put up a fix please?

a2800276 commented 1 year ago

Ah yes, didn't copy over to esp32c3, sorry. Let me try to set up a mini project to build for both plattforms.

a2800276 commented 1 year ago

Ok, I've copied the CMakeFiles.txt and tested it: https://github.com/cesanta/mongoose-os/pull/606

I'm not sure how you guys typically go about testing the build. I tried building demojs app for esp32 and esp32c3 before and after, before esp32 worked and c3 failed, after both build suceeded.

nliviu commented 1 year ago

Thank you!

a2800276 commented 1 year ago

No worries, I should have tested the PR before submitting. Sorry about being the elephant in the china shop in the first place :)