diff --git a/scripts/cmake/platforms/mps3/sse-310/mps3-sse-310.gnu.ld b/scripts/cmake/platforms/mps3/sse-310/mps3-sse-310.gnu.ld index 0b6ad79ffa312833a8ae1301558be49c90cc57df..ca4914ac952fbbec77b1eb62e6541d6f905edbc6 100644 --- a/scripts/cmake/platforms/mps3/sse-310/mps3-sse-310.gnu.ld +++ b/scripts/cmake/platforms/mps3/sse-310/mps3-sse-310.gnu.ld @@ -1,5 +1,6 @@ /* - * SPDX-FileCopyrightText: Copyright 2021, 2023-2024 Arm Limited and/or its affiliates + * SPDX-FileCopyrightText: Copyright 2021, 2023-2025 Arm Limited and/or + * its affiliates * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -135,6 +136,14 @@ SECTIONS } > BRAM __exidx_end = .; + /* Dedicated section for global offset table */ + .got.at_bram : + { + . = ALIGN(8); + *(.got*) + . = ALIGN(8); + } > BRAM AT > BRAM + .sram : { . = ALIGN(16); diff --git a/scripts/cmake/platforms/mps4/sse-315/mps4-sse-315.gnu.ld b/scripts/cmake/platforms/mps4/sse-315/mps4-sse-315.gnu.ld index a5647f9480b08383edcf0d82faff7a67d95f7db6..08c65acd9897d7aa22d0035433bddb616c05d4f9 100644 --- a/scripts/cmake/platforms/mps4/sse-315/mps4-sse-315.gnu.ld +++ b/scripts/cmake/platforms/mps4/sse-315/mps4-sse-315.gnu.ld @@ -1,5 +1,6 @@ /* - * SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + * SPDX-FileCopyrightText: Copyright 2024-2025 Arm Limited and/or + * its affiliates * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -140,6 +141,14 @@ SECTIONS } > BRAM __exidx_end = .; + /* Dedicated section for global offset table */ + .got.at_bram : + { + . = ALIGN(8); + *(.got*) + . = ALIGN(8); + } > BRAM AT > BRAM + .sram : { . = ALIGN(16); diff --git a/scripts/cmake/platforms/mps4/sse-320/mps4-sse-320.gnu.ld b/scripts/cmake/platforms/mps4/sse-320/mps4-sse-320.gnu.ld index a5647f9480b08383edcf0d82faff7a67d95f7db6..08c65acd9897d7aa22d0035433bddb616c05d4f9 100644 --- a/scripts/cmake/platforms/mps4/sse-320/mps4-sse-320.gnu.ld +++ b/scripts/cmake/platforms/mps4/sse-320/mps4-sse-320.gnu.ld @@ -1,5 +1,6 @@ /* - * SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + * SPDX-FileCopyrightText: Copyright 2024-2025 Arm Limited and/or + * its affiliates * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -140,6 +141,14 @@ SECTIONS } > BRAM __exidx_end = .; + /* Dedicated section for global offset table */ + .got.at_bram : + { + . = ALIGN(8); + *(.got*) + . = ALIGN(8); + } > BRAM AT > BRAM + .sram : { . = ALIGN(16); diff --git a/source/application/api/fwk/executorch/CMakeLists.txt b/source/application/api/fwk/executorch/CMakeLists.txt index c784099a855a8f8c1e253df6347edac866953bf4..f7edb9a56ca95fa56f0eec3361297ba134e453e7 100644 --- a/source/application/api/fwk/executorch/CMakeLists.txt +++ b/source/application/api/fwk/executorch/CMakeLists.txt @@ -41,6 +41,9 @@ add_library(${ML_FWK_ET_TARGET} STATIC source/EtModel.cc ) +target_sources(${ML_FWK_ET_TARGET} PUBLIC + source/EtPal.cc) + # Include directories - public target_include_directories(${ML_FWK_ET_TARGET} PUBLIC include) diff --git a/source/application/api/fwk/executorch/source/EtPal.cc b/source/application/api/fwk/executorch/source/EtPal.cc new file mode 100644 index 0000000000000000000000000000000000000000..d2cf5a280a3ef30a8aadcb549d018b1d746663a7 --- /dev/null +++ b/source/application/api/fwk/executorch/source/EtPal.cc @@ -0,0 +1,35 @@ +/* + * SPDX-FileCopyrightText: Copyright 2025 Arm Limited and/or its affiliates + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ +#include "ExecuTorch.hpp" + +/* For ExecuTorch logging the et_pal_emit_log_message needs to be overridden. */ +void et_pal_emit_log_message( + ET_UNUSED et_timestamp_t timestamp, + et_pal_log_level_t level, + const char* filename, + ET_UNUSED const char* function, + size_t line, + const char* message, + ET_UNUSED size_t length) +{ + printf("%c [ExecuTorch: %s:%zu %s()] %s\n", + level, + filename, + line, + function, + message); +}