diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index dd9ded4eb..97773147e 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -28,6 +28,11 @@ add_subdirectory(etest/src) add_subdirectory(esp32boot) add_subdirectory(esp32devmode/src) +# platform libraries +add_subdirectory(emscriptenlib/src) +add_subdirectory(esp32lib/src) +add_subdirectory(picolib/src) + if (Elixir_FOUND) add_subdirectory(exavmlib/lib) else() diff --git a/libs/eavmlib/src/CMakeLists.txt b/libs/eavmlib/src/CMakeLists.txt index cccedb72c..8b9ace1b8 100644 --- a/libs/eavmlib/src/CMakeLists.txt +++ b/libs/eavmlib/src/CMakeLists.txt @@ -27,7 +27,6 @@ set(ERLANG_MODULES atomvm avm_pubsub console - emscripten esp gpio i2c @@ -37,7 +36,6 @@ set(ERLANG_MODULES logger_manager network network_fsm - pico port spi timer_manager diff --git a/libs/eavmlib/src/emscripten.erl b/libs/emscriptenlib/src/emscripten.erl similarity index 100% rename from libs/eavmlib/src/emscripten.erl rename to libs/emscriptenlib/src/emscripten.erl diff --git a/libs/esp32lib/src/CMakeLists.txt b/libs/esp32lib/src/CMakeLists.txt new file mode 100644 index 000000000..061743be6 --- /dev/null +++ b/libs/esp32lib/src/CMakeLists.txt @@ -0,0 +1,29 @@ +# +# This file is part of AtomVM. +# +# Copyright 2024 Davide Bettio +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later +# + +project(esp32lib) + +include(BuildErlang) + +set(ERLANG_MODULES + esp +) + +pack_archive(esp32lib ${ERLANG_MODULES}) diff --git a/libs/eavmlib/src/esp.erl b/libs/esp32lib/src/esp.erl similarity index 100% rename from libs/eavmlib/src/esp.erl rename to libs/esp32lib/src/esp.erl diff --git a/libs/eavmlib/src/pico.erl b/libs/picolib/src/pico.erl similarity index 100% rename from libs/eavmlib/src/pico.erl rename to libs/picolib/src/pico.erl