1# Copyright 2022 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15include($ENV{PW_ROOT}/pw_build/pigweed.cmake) 16 17# WARNING: Many of the dependencies in this file are missing and need to be 18# added/updated. This is provided as a starting point, but currently does not 19# work. 20 21pw_add_module_library(pw_system.config 22 HEADERS 23 public/pw_system/config.h 24) 25 26pw_add_module_library(pw_system.log 27 PUBLIC_DEPS 28 pw_log_rpc.log_service 29 pw_log_rpc.rpc_log_drain_thread 30 pw_multisink 31 PRIVATE_DEPS 32 pw_system.config 33 pw_system.rpc_server 34 pw_log_rpc.rpc_log_drain 35 pw_sync.lock_annotations 36 pw_sync.mutex 37 HEADERS 38 pw_system_private/log.h 39 SOURCES 40 log.cc 41) 42 43pw_add_module_library(pw_system.log_backend 44 PRIVATE_DEPS 45 pw_system.config 46 pw_system.log 47 pw_bytes 48 pw_chrono.system_clock 49 pw_log.facade 50 pw_log.proto_utils 51 pw_log_string.handler.facade 52 pw_log_tokenized.metadata 53 pw_multisink 54 pw_result 55 pw_sync.interrupt_spin_lock 56 pw_sync.lock_annotations 57 pw_tokenizer 58 pw_tokenizer.global_handler_with_payload.facade 59 SOURCES 60 log_backend.cc 61) 62 63pw_add_facade(pw_system.rpc_server 64 PUBLIC_DEPS 65 pw_system.config 66 pw_thread.thread_core 67 HEADERS 68 public/pw_system/rpc_server.h 69) 70 71pw_add_module_library(pw_system.hdlc_rpc_server 72 PRIVATE_DEPS 73 pw_assert 74 pw_hdlc.pw_rpc 75 pw_hdlc.rpc_channel_output 76 pw_sync.mutex 77 pw_system.config 78 pw_system.io 79 pw_system.rpc_server.facade 80 pw_system.target_io 81 pw_thread.thread_core 82 SOURCES 83 hdlc_rpc_server.cc 84) 85 86pw_add_module_library(pw_system.io 87 HEADERS 88 public/pw_system/io.h 89 PUBLIC_DEPS 90 pw_stream 91) 92 93pw_add_module_library(pw_system.init 94 PRIVATE_DEPS 95 pw_system.log 96 pw_system.rpc_server 97 pw_rpc.nanopb.echo_service 98 pw_thread.thread 99 SOURCES 100 init.cc 101 HEADERS 102 public/pw_system/init.h 103) 104 105pw_add_module_library(pw_system.work_queue 106 PRIVATE_DEPS 107 pw_work_queue 108 SOURCES 109 work_queue.cc 110 HEADERS 111 public/pw_system/work_queue.h 112) 113 114pw_add_module_library(pw_system.target_io 115 PRIVATE_DEPS 116 pw_system.io 117 pw_stream 118 pw_stream.sys_io_stream 119 SOURCES 120 target_io.cc 121) 122 123pw_add_module_library(pw_system.target_hooks 124 PUBLIC_DEPS 125 pw_thread 126 HEADERS 127 public/pw_system/target_hooks.h 128) 129 130pw_add_module_library(pw_system.stl_target_hooks 131 PRIVATE_DEPS 132 pw_thread.sleep 133 pw_thread.thread 134 pw_thread_stl.thread 135 136 SOURCES 137 stl_target_hooks.cc 138) 139 140pw_add_module_library(pw_system.freertos_target_hooks 141 SOURCES 142 freertos_target_hooks.cc 143 PRIVATE_DEPS 144 pw_thread.thread 145 pw_thread_freertos.thread 146 # TODO(pwbug/317): This should depend on FreeRTOS but our third parties 147 # currently do not have CMake support. 148) 149 150pw_add_module_library(pw_system.system_example 151 PRIVATE_DEPS 152 pw_system.init 153 pw_system.io 154 pw_system.target_hooks 155 pw_stream 156 pw_stream.sys_io_stream 157 SOURCES 158 example_user_app_init.cc 159) 160